问题
I have specified the standard shortcut-generating natives in my installation XML file:
<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>
However, when I run izpack:izpack and run the resultant jar, it hangs on the shortcutPanel saying it can't locate the library. When I copy the .dll's into the same directory it works.
Any idea how I can specify that the files be included into the final jar?
回答1:
for IzPack 4 you must not use a wrapper element here, just use the following:
<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"/>
This is also documented in the installation.dtd:
<!ELEMENT installation (info, packaging?, properties?,
variables?,dynamicvariables?,conditions?,installerrequirements?,
guiprefs?, locale, resources?, panels,
listeners?, packs, jar*, native*)>
For IzPack 5 the dtd has been changed to the syntax you are using above.
回答2:
try to add this in your 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>
来源:https://stackoverflow.com/questions/4179915/izpack-maven-plugin-is-not-including-native-libraries-by-default