see http://bmeck.github.io/ for prebuilt binaries
Last active
August 29, 2015 13:57
-
-
Save bmeck/9358766 to your computer and use it in GitHub Desktop.
Can't say how long I wanted to do this
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Still a lot to do, but it works! | |
# Been looking at how to do this for a long time | |
# | |
# Todo: good quality ecryption | |
# Todo: in memory resources (right now it is self extracting) | |
# Todo: check windows, should work but probably needs some tweaking | |
# | |
# Many thanks to node-webkit for examples and zlib for including minizip | |
# | |
# --extracting sets up node to check if it is a self-extracting zip archive | |
./configure --extracting | |
make | |
# path to a module, main field in package.json will be executed on start | |
zip -r bundle.zip $PATH_TO_MODULE | |
cat node bundle.zip > bundled_node | |
chmod +x bundle_node | |
# run our bundled app | |
# respects the $TMPDIR convention | |
TMPDIR=$WHERE_TO_EXTRACT ./bundled_node |
Author
bmeck
commented
Mar 5, 2014
- NODE_CHANNEL_FD existing will prevent re-extraction
- spawn(process.execPath) is going to cause re-extraction, use fork or set NODE_CHANNEL_FD instead
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment