Closed actuallyabhi closed 4 years ago
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.
Thanks a lot Brother You made a lot things clear :)
How to package application
Like creteing a .deb or .tar.gz file so user can install this .how to do this ?