[GH-ISSUE #283] How to package application #195

Closed
opened 2026-05-05 11:54:09 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @actuallyabhi on GitHub (Apr 27, 2020).
Original GitHub issue: https://github.com/kusti8/proton-native/issues/283

How to package application

Like creteing a .deb or .tar.gz file so user can install this .how to do this ?

Originally created by @actuallyabhi on GitHub (Apr 27, 2020). Original GitHub issue: https://github.com/kusti8/proton-native/issues/283 # How to package application Like creteing a .deb or .tar.gz file so user can install this .how to do this ?
gitea-mirror 2026-05-05 11:54:09 -06:00
Author
Owner

@IngwiePhoenix commented on GitHub (May 4, 2020):

Since this depends on Node, I assume that you'd have to package this with a NodeJS executable. Luckily, Node is statically compiled - just dropping a NodeJS binary to the output of your webpack command should do.

On windows, a super basic C program where WinMain(...) just calls and runs the NodeJS executable and passes it the entry point of the webpack output should do. On MacOS, Modify Info.plist and make sure the executable name matches the name of a basic shell script within your.app/Contents/MacOS and that said script is given the executable flag (chmod +x file). Said script may do something like this:

#!/bin/sh
RESROOT="$(dirname $0)/../Resources/"
exec "$RESROOT/node" "$RESROOT/yourentry.js"

On linux, something like the above script should do - just modify it for your app structure.

Now - this is just the basic idea of how it could be done. The output of WebPack + a NodeJS binary should do. If you intend to deploy through package managers, you can leave out the NodeJS binary and instead call for it as a dependency.

<!-- gh-comment-id:623318109 --> @IngwiePhoenix commented on GitHub (May 4, 2020): Since this depends on Node, I assume that you'd have to package this with a NodeJS executable. Luckily, Node is statically compiled - just dropping a NodeJS binary to the output of your webpack command should do. On windows, a super basic C program where `WinMain(...)` just calls and runs the NodeJS executable and passes it the entry point of the webpack output should do. On MacOS, Modify `Info.plist` and make sure the executable name matches the name of a basic shell script within `your.app/Contents/MacOS` and that said script is given the executable flag (`chmod +x file`). Said script may do something like this: ```shell #!/bin/sh RESROOT="$(dirname $0)/../Resources/" exec "$RESROOT/node" "$RESROOT/yourentry.js" ``` On linux, something like the above script should do - just modify it for your app structure. Now - this is just the basic idea of how it *could* be done. The output of WebPack + a NodeJS binary should do. If you intend to deploy through package managers, you can leave out the NodeJS binary and instead call for it as a dependency.
Author
Owner

@actuallyabhi commented on GitHub (May 4, 2020):

Thanks a lot Brother You made a lot things clear :)

<!-- gh-comment-id:623635243 --> @actuallyabhi commented on GitHub (May 4, 2020): Thanks a lot Brother You made a lot things clear :)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/proton-native#195
No description provided.