asticode / go-astilectron-bundler

Bundle your Astilectron app with ease
MIT License
129 stars 68 forks source link

Specify working_directory_path for the bundle during startup? #100

Closed olof-nord closed 2 years ago

olof-nord commented 2 years ago

Hello @asticode, thanks for your work on this.

I have been using the go-astilectron-demo+go-astilectron-bundler as a starting point for a Flatpak installer/package. Flatpak is using a sandboxed approach which by design specifies most of the filesystem available to the program as read-only.

When the astilectron-bundle first starts and tries to create/populate the vendor and resources directories, it thus fails. Is there is a way to specify for example working_directory_path to the built bundle during startup?

The writable file locations needs to be specified at startup and not at build time because it is not known at build time.

From what I understand, the bundler.json file is used during the bundling phase by astilectron-bundler, and once bundled the config is set.

Any feedback is much appreciated!

asticode commented 2 years ago

@olof-nord here you can specify astilectron.Options and the field you want to use is BaseDirectoryPath. It will tell the bootstrap where to setup vendor and disembed resources.

Let me know if that fixes your problem

olof-nord commented 2 years ago

amazing, many thanks. That does indeed answer the question, and it solves the problem I was facing!