java - 使用 netbeans IDE 7.4 创建 MSI 安装程序

标签 java netbeans wix

当我尝试使用 netbeans IDE 创建 msi 安装程序时,它显示以下错误:cannot run program candle

我已经安装了 wix 3.8 并在我的路径中添加了“C:\Program Files (x86)\WiX Toolset v3.8\bin”。 IDE 仍然显示以下错误:wix not installed or not in path

如何解决问题并为我的 javaFX 应用程序创建一个 msi 安装程序?任何人请帮助.. 提前致谢。

最佳答案

这是因为 candle.exe 的输出 -?命令不再匹配 Ant Targets -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 Compiler"/>
            <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> 

这是 WiX 3.8 的输出: Windows Installer XML 工具集编译器版本 3.8.1128.0 版权所有 (c) Outercurve 基金会。保留所有权利。

所以固定条件为

<contains string="${exec-output}" substring="Windows Installer XML Toolset Compiler"/>

在 build-native.xml 中将解决这个问题。

关于java - 使用 netbeans IDE 7.4 创建 MSI 安装程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20314211/

相关文章:

java - 如何从基础应用程序访问方法?

java - 如何在 NetBeans 8.2 中设置默认的 Java 平台?

wix - "Downgraded"MS dll 在升级时消失 - Windows Installer

java - 下载 JavaHelp 库

Wix:在组件、目录、文件、注册表等上使用 KeyPath

wix - WIX 生成的 MSI 不复制可执行文件,复制其他文件,以前工作过

java - ElasticSearch 为什么在客户端或节点上调用 close()?

java - 将变量传递给Java线程(run()方法)

java - 事务注释在 Spring Boot 2.1.3 中不起作用

eclipse - 在 Eclipse 中突出显示修改的行