Packing Node.js-Scripts + node.exe into a single Executable [duplicate]

柔情痞子 提交于 2019-12-17 09:37:07

问题


Because Node.js now also available on Windows, I would like to share my scripts without including node.exe. Is it possible to pack the script (no more files) together with the node.exe into a single executable file?


回答1:


You absolutely can, and it's pretty easy with JXcore.

Once you have JXcore installed on windows, all you have to do is run:

jx package app.js "myAppName" -native

This will produce a .exe file that you can distribute and can be executed without any external dependencies whatsoever (you don't even need JXcore nor Node.js on the system).

Here's the documentation on that functionality: https://github.com/jxcore/jxcore/blob/master/doc/api/jxcore-feature-packaging-code-protection.markdown

(Duplicate of https://stackoverflow.com/a/27551233/810830)




回答2:


Have you tried WinRAR? It should give you the opportunity to create a self-extractable executable which unpacks all files to the TEMP folder. After doing this you can setup to run one exe file in the archive. Furthermore you can hide the "Unpack" dialog.




回答3:


actually I think you can use adobe air to accomplish this, no need to include node.exe

have you ever tried to develop hybrid applications with QtWebKit, which I think might be a very good direction for you., hope this helps.



来源:https://stackoverflow.com/questions/7557364/packing-node-js-scripts-node-exe-into-a-single-executable

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!