简体   繁体   English

Ant构建NSIS失败

[英]Ant build NSIS fail

I'm trying to make the installer exe of a java project using it's build.xml from eclipse but the build fails. 我正在尝试使用来自eclipse的build.xml来制作Java项目的安装程序exe,但是构建失败。

[zip] Building zip: D:\Documents and Settings\Administrator\My Documents\Workspace\JDownloader\dist\JDownloader_windows_13312.zip
[echo] Clean Windows Setup...
[nsis] java.io.IOException: Cannot run program "makensis": CreateProcess error=2, The system cannot find the file specified

This appears to be the section of build.xml that is failing: 这似乎是build.xml失败的部分:

<echo message="Clean Windows Setup..." />
  <nsis script="${exe.windows.script}" verbosity="2" />
  <echo message="Kikin Windows Setup..." / 

The message 讯息

CreateProcess error=2, The system cannot find the file specified

arises because Ant is unable to locate the script you are trying to run. 出现此问题是因为Ant无法找到您要运行的脚本。

The script name (makensis? .nsi?) and location appear to be set in the Ant property exe.windows.script . 脚本名称(makensis?.nsi?)和位置似乎是在Ant属性exe.windows.script Suggest you check that is set, set as you expect, and that the script exists and is executable at that location. 建议您检查是否已设置,是否按预期设置以及脚本是否存在并且可以在该位置执行。

edit: this is similar to an entry in the Ant FAQ : 编辑:这类似于Ant FAQ中的条目:

A common problem is not having the executable on the PATH. 一个常见的问题是PATH上没有可执行文件。 In case you get an error message Cannot run program "...":CreateProcess error=2. 如果出现错误消息,则无法运行程序“ ...”:CreateProcess error = 2。 The system cannot find the path specified. 该系统找不到指定的路径。 have a look at your PATH variable. 看一下您的PATH变量。

Just type the command directly on the command line and if Windows finds it, Ant should do it too. 只需直接在命令行上键入命令,如果Windows找到了,Ant也应该这样做。 (Otherwise ask on the user mailinglist for help.) If Windows can not execute the program add the directory of the programm to the PATH (set PATH=%PATH%;dirOfProgram) or specify the absolute path in the executable attribute in your buildfile. (否则,请向用户邮件列表寻求帮助。)如果Windows无法执行该程序,则将程序的目录添加到PATH(设置PATH =%PATH%; dirOfProgram)中,或在构建文件中的可执行文件属性中指定绝对路径。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM