【问题标题】:Creating installer for java application on NetBeans在 NetBeans 上为 java 应用程序创建安装程序
【发布时间】:2014-09-26 07:53:21
【问题描述】:

最近我正在尝试使用 netbeans 为我的 java 应用程序制作安装程序 但是当我单击项目 > 包为 > 所有安装程序时

JavaFX 本机打包程序需要在 PATH 中安装并包含外部 WiX 3.0+ 工具才能创建 MSI 安装程序。见http://wix.sourceforge.net/ 构建失败(总时间:0 秒)

我很确定我已经安装了这个 WiX 3.0+ 工具,我还在环境变量中添加了它(我输入了命令 candle.exe 并得到了预期的结果......请帮助我。

谢谢,

【问题讨论】:

  • 如果您在安装 WiX 后还没有,请重新启动 NetBeans(或 Windows)。很少有正在运行的应用程序检查更新的环境变量;他们从他们的创造者那里得到他们的东西——因为它可以被定制。

标签: java netbeans wix installation


【解决方案1】:

我在安装最新版本的 WIX (3.9) 和 NetBeans 7.4 时遇到了同样的问题。

在我的情况下,这是由于 nbproject 文件夹中的文件 "jfx-impl.xml" 中的字符串比较问题。您需要做的是编辑此文件(单击 NetBeans 输出控制台中错误消息提供的链接)并将目标 "-check-WiX-presence" 更改为:

<target name="-check-WiX-presence" depends="-check-native-bundling-type" if="need.WiX.presence">
    <local name="exec-output"/>
    <local name="exec-error"/>
    <local name="exec-result"/>
    <exec executable="candle" outputproperty="exec-output" failifexecutionfails="false" errorproperty="exec-error" resultproperty="exec-result">
        <arg value="-?"/>
    </exec>
    <echo message="exec-output:${exec-output}" level="verbose"/>
    <echo message="exec-error:${exec-error}" level="verbose"/>
    <echo message="exec-result:${exec-result}" level="verbose"/>
    <condition property="missing.WiX">
        <not><and>
            <contains string="${exec-output}" substring="Windows Installer XML" casesensitive="false"/>
            <not><contains string="${exec-output}" substring="Windows Installer Xml Compiler version 1"/></not>
            <not><contains string="${exec-output}" substring="Windows Installer Xml Compiler version 2"/></not>
        </and></not>
    </condition>
</target>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-03-13
    • 2013-01-19
    • 1970-01-01
    • 1970-01-01
    • 2011-07-20
    • 1970-01-01
    相关资源
    最近更新 更多