miketheprogrammer / go-thrust

Cross Platform UI Kit powered by Blink/V8/Chromium Content Lib
MIT License
445 stars 34 forks source link

is it possible to avoid downloading thrust (again and again)? #18

Closed fyears closed 9 years ago

fyears commented 9 years ago

I am using Windows 88 (64 bit). I installed go-thrust only using these command:

go get -d github.com/miketheprogrammer/go-thrust
go get -v github.com/alexcesaro/log

Then

go build -o tutorial/bin/basic_webserver_app.exe tutorial/basic_webserver_app.go
#./tutorial/bin/basic_webserver_app.exe

(To my surprise,) after I double clicked basic_webserver_app.exe, a prompt came out telling me that "thrust-...-ia32.zip is downloading".

Is it possible to download and embed thrust into the generated executable file while compiling the .go file?

tehbilly commented 9 years ago

The download doesn't need to be embedded, it needs to check for the existence of the executable and assets before provisioning. This is absolutely a good change for us to make.

miketheprogrammer commented 9 years ago

Yes, the SetBaseDirectory method of the spawn package should do just this. However I admit, we need to and are currently working on normalizing where the tutorials and examples look for this executable.

Ideally in the future, the Thrust executable would be installed via installer somewhere in the $PATH, and we would use Go's path finding mechanisms to locate thrust.

miketheprogrammer commented 9 years ago

@fyears also, no it is not possible to compile thrust into a go-thrust exe. I wish it were, however thrust contains many years of C/C++/Objective-C code that will not just easily bind in go. For the time being the Thrust way is to create a client app and use the exe over stdin stdout.

This means that you can download applications written in different languages and they will all use the same Thrust as long as the version is compatible

miketheprogrammer commented 9 years ago

Reopening this till we rewrite the tutorials and examples to use the same directory.

miketheprogrammer commented 9 years ago

Closing, @fyears Please use spawn.SetBaseDirectory(). Or create your own ThrustProvisioner, that sets the base directory, and does nothing else. Just make sure you have the exe available.