Packaging a node-webkit application into an exe file

时间:2015-07-28 23:34:11

标签: macos windows-installer exe node-webkit pc

I'm very new to building a node-webkit application. So I took a job to reverse engineer an already built application and re-bundle it up.

Here are my app files:

http://www.eric-winchester.com/images/ss1.png

I figured out how to repackage the app into app.nw and then into the package files for a Mac so that it runs MyApp.app and even create MyApp.dmg.

http://www.eric-winchester.com/images/ss2.png

So I'm not having any problems making the application on a Mac. However, Now I need to bundle the "app" folder into an exe file so when a CD is entered into the users PC an AUTORUN file (which I'm not having a problem with) will open up an installer exe and install the application.

I've tried a bunch of different compiler programs but I cannot get the files and folders into an executable file. Am I way off here in what I'm trying to do? And if so, can someone direct me to a place that will show me how to do it correctly?

2 个答案:

答案 0 :(得分:0)

首先,将app.nw文件复制到存在nw.exe的文件夹中。 然后,您可以在cmd中尝试以下命令:

  

path_to_folder_which_contains_nw.exe>复制nw.exe + app.nw app.exe

您将收到消息" 1个文件被复制"成功创建app.exe后。 它将创建一个可执行文件,但不会在该文件夹外运行。 然后你可以使用windows安装程序,如iexplore.exe(defualt windows安装程序)来创建安装程序exe。

答案 1 :(得分:0)

您可以按照How to package and distribute your apps上的说明进行操作,它很好地说明了如何使用exe path the exewhich files should be shipped

我的建议是你不会手动完成。而是使用grunt来构建exe文件。要开始使用,请使用yeomangenerator-node-webkit作为基本项目布局和构建脚本。

然后,使win可执行(或mac)很容易:

grunt dist-mac
grunt dist-win