2

我在我的安装 XML 文件中指定了标准的快捷方式生成本机:

<natives>
    <native type="izpack" name="ShellLink.dll"/>
    <native type="izpack" name="ShellLink_x64.dll"/>
    <native type="izpack" name="WinSetupAPI.dll"/>
    <native type="izpack" name="WinSetupAPI_x64.dll"/>
</natives>

但是,当我运行 izpack:izpack 并运行生成的 jar 时,它会挂在快捷方式面板上,说它找不到库。当我将 .dll 复制到同一目录中时,它可以工作。

知道如何指定将文件包含到最终 jar 中吗?

4

2 回答 2

4

对于 IzPack 4,您不能在此处使用包装器元素,只需使用以下内容:

<native type="izpack" name="ShellLink.dll"/>
<native type="izpack" name="ShellLink_x64.dll"/>
<native type="izpack" name="WinSetupAPI.dll"/>
<native type="izpack" name="WinSetupAPI_x64.dll"/>

这也记录在installation.dtd中:

<!ELEMENT installation (info, packaging?, properties?, variables?,dynamicvariables?,conditions?,installerrequirements?, guiprefs?, locale, resources?, panels, listeners?, packs, jar*, native*)>

对于 IzPack 5,dtd 已更改为您在上面使用的语法。

于 2011-05-11T12:34:55.533 回答
0

尝试将其添加到您的 pom.xml

<!-- https://mvnrepository.com/artifact/org.codehaus.izpack/izpack-native -->
<dependency>
    <groupId>org.codehaus.izpack</groupId>
    <artifactId>izpack-native</artifactId>
    <version>5.0.9</version>
</dependency>
于 2016-08-20T15:04:32.123 回答