miketheprogrammer / go-thrust

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

Bundle thrust dependencies in binary #57

Closed sharpner closed 9 years ago

sharpner commented 9 years ago

Hi!

Is there a way to create an application that bundles thrust within the binary?

Currently when I build a binary and start them on a different pc it downloads Downloading https://github.com/breach/thrust/releases/download/v0.7.6/thrust-v0.7.6-darwin-x64.zip

gwoo commented 9 years ago

Great question. I have not found the answer yet either. Would be great to get some information into the README.

miketheprogrammer commented 9 years ago

You need to use your own ThrustProvisioner class.I'll provide more details as soon as I can. On Jul 17, 2015 2:06 PM, "GWoo" notifications@github.com wrote:

Great question. I have not found the answer yet either. Would be great to get some information into the README.

— Reply to this email directly or view it on GitHub https://github.com/miketheprogrammer/go-thrust/issues/57#issuecomment-122360742 .

sharpner commented 9 years ago

Awesome! Thank you, I'll be looking forward to it =)

miketheprogrammer commented 9 years ago

Ah, so you question was about, within the binary. Unfortunately that is not possible. Not unless you create your own linking process and somehow start two processes from the same binary.

Anyway, the best way to handle distribution is an installer of some sort, and to create a custom provisioner with the code that you distribute.

For example, in pretty much any of the tutorials i use a custom tutorial provisioner which sets the base directory as the home directory.

thrust.SetProvisioner(tutorial.NewTutorialProvisioner())

Inside the implementation of the provisioner is

spawn.SetBaseDirectory("") // Means use the users home directory
return spawn.Bootstrap()

So now the steps are

  1. Create your OS specific bundles a. Cross Compile GoThrust Application. b. Download Thrust Binaries from Thrust releases on GitHub c. tar.gz together with an install.md or something, or create an installer. i.e. bash, or windows installer, or mac pkg
  2. Distribute to your friends for testing, and then the world.
sharpner commented 9 years ago

ok thank you. That's a shame, love the whole single binary distribution ;)