asticode / go-astilectron-bundler

Bundle your Astilectron app with ease
MIT License
127 stars 67 forks source link

How to bundle extrafiles? #77

Closed tpoxa closed 4 years ago

tpoxa commented 4 years ago

Thanks for the great project you did. I think I need to bundle extra binaries into my project. Like git client. What is the proper way to do it?

asticode commented 4 years ago

@tpoxa you can use this attribute to copy all your extra binaries to the resources dir so that they get bind to your final binary.

Let's imagine you want to bind 2 extra binaries located at /path/to/binary/1 and /path/to/binary/2, you'd have to add the following JSON to the resources_adapters attribute :

[
  {
    "args": ["/path/to/binary/1", "/path/to/binary/2", "."],
    "name": "cp"
  }
]

As this command will be executed in the resources dir about to be bind, your binaries will get bind to your final binary.

Let me know if you're experiencing any problem.

tpoxa commented 4 years ago

Thanks!