Skip to content
This repository has been archived by the owner on Feb 25, 2022. It is now read-only.

Not building on windows #20

Closed
matrixik opened this issue Feb 15, 2014 · 6 comments
Closed

Not building on windows #20

matrixik opened this issue Feb 15, 2014 · 6 comments
Labels

Comments

@matrixik
Copy link
Contributor

Hello,

I would like to play with templates and I need to build alpaca on Windows but Makefile is a little cryptic to me.

Can you provide some simple step by step way of building alpaca on Windows (without compiling templates into it)?
Or maybe can you provide alpaca binary without templates compiled in?

Best regards,
Dobrosław Żybort

@pksunkara
Copy link
Owner

I am using go-bindata to compile the templates. Basically for every template, the makefile creates a go file in alpaca/templates package which will be used by alpaca when running. The makefile contains a few tricks to make sure the generated filenames are unique and a hash map is filled with all the metadata so that the main program can use it easily.

That said, I think the binary wont work if templates are not compiled with it. You can probably look at this to find out what exactly is happening with the templates and repeat the steps on windows. https://github.com/pksunkara/alpaca/blob/1f8493fc0cafffa66c6fe34956a54a2d02b3859e/make

@matrixik
Copy link
Contributor Author

Well, it would work if you not put it in another map and would be easier to work with templates
https://github.com/jteeuwen/go-bindata#debug-vs-release-builds

I will check this make file and will try to recreate it. Thank you.

@matrixik
Copy link
Contributor Author

Maybe it would be posible to make alpaca go getable with go.rice?
https://github.com/GeertJohan/go.rice#what-does-it-do

@pksunkara
Copy link
Owner

I always used make templates && make install when developing.

I will look into go-rice.

@matrixik
Copy link
Contributor Author

It was easier than I thought:
https://github.com/matrixik/alpaca/blob/master/alpaca/template.go#L10
but
go.rice can't embed resources if it's called from package and not main program... I raised an issue for that: GeertJohan/go.rice#4

@pksunkara
Copy link
Owner

Fixed by #22

@pksunkara pksunkara added the bug label Apr 3, 2014
@pksunkara pksunkara changed the title Question: how to build on Windows Not building on windows Apr 3, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants