Closed jerbaroo closed 7 years ago
This looks very useful, thank you!
However, there is one small problem: If I understand this correctly, when using the Electron packager to generate an application package, the package will still depend on a precise location of the executable via the relBin
variable in electron.js
.
Could you change your pull request so that the executable is automatically built and copied to the right location when building a package?
I have done something like this in my HyperHaskell project, you can probably just adapt the Makefile
and provide a new one in doc/electron/Makefile
.
Yep, I'll have a look at that in the next few days
Just an update that I've been a bit busy but have some free time to tackle this shortly
I know the feeling. 😉 I'd be happy to include this in the upcoming 0.8 release if you can find the time, but no worries if not, there's always a next release.
relBin
is a relative path from electron.js
to the Haskell application binary (which is copied to the application bundle). I've added instructions for Stack users on how to build the Haskell application binary to an explicit location (e.g. stack install --local-bin-path bins
instead of stack build
), such that relBin
can be set to something consistent like ./bins/your-app-exe
.
The previous electron-packager instructions would copy the entire directory (including the Haskell application binary) to the packaged app. Added instructions on ignoring things like app/
, src/
, and .stack-work/
.
Also added a link to a minimal full working example.
Thanks a lot for this! I will highlight this in the README.
relates to #111 and #52
I recommend reading the instructions as rendered markdown rather than in the "Files changed" menu
docs/electron.md
package.json
andelectron.js
files