Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added instructions for packaging with Electron #169

Merged
merged 2 commits into from
Apr 24, 2017
Merged

added instructions for packaging with Electron #169

merged 2 commits into from
Apr 24, 2017

Conversation

jerbaroo
Copy link
Contributor

@jerbaroo jerbaroo commented Mar 4, 2017

relates to #111 and #52

I recommend reading the instructions as rendered markdown rather than in the "Files changed" menu

  • instructions included as docs/electron.md
    • justification for Electron
    • how to run with Electron
    • packaging with electron-packager
  • included reference package.json and electron.js files

@HeinrichApfelmus
Copy link
Owner

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.

@jerbaroo
Copy link
Contributor Author

Yep, I'll have a look at that in the next few days

@jerbaroo
Copy link
Contributor Author

Just an update that I've been a bit busy but have some free time to tackle this shortly

@HeinrichApfelmus
Copy link
Owner

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.

@jerbaroo
Copy link
Contributor Author

jerbaroo commented Apr 12, 2017

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.

@HeinrichApfelmus HeinrichApfelmus merged commit 2462028 into HeinrichApfelmus:master Apr 24, 2017
@HeinrichApfelmus
Copy link
Owner

Thanks a lot for this! I will highlight this in the README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants