我在安装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时,它会挂在shortcutPanel上,说它找不到库。当我将.dll复制到同一目录时,它就可以了。
知道如何指定文件包含在最终的jar中吗?
答案 0 :(得分:3)
对于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已更改为您在上面使用的语法。
答案 1 :(得分: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>