我正在尝试使用IzPack来安装我的程序,我想将桌面快捷方式添加到安装程序,这里是来自IzPack网站的文档/说明.
http://izpack.org/documentation/desktop-shortcuts.html
但是,下面的XML文件在编译时,只会在安装程序中创建一个空白屏幕,当您尝试单击“下一步”以通过它时,该屏幕会挂起.这是在Windows 7 – 64位上运行时屏幕的样子.
这是我的install.xml和shortcutSpec.xml文件.
INSTALL.XML
<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?> <installation version="1.0"> <!-- The info section. --> <info> <appname>Application Name</appname> <appversion>1.0</appversion> <url>http://www.example.com/</url> <javaversion>1.6</javaversion> <run-privileged condition="izpack.macinstall|izpack.windowsinstall.vista|izpack.windowsinstall.7"/> </info> <!-- The gui preferences indication. --> <guiprefs width="640" height="480" resizable="yes"/> <!-- The locale section. --> <locale> <langpack iso3="eng"/> </locale> <!-- The resources section. --> <resources> <res id="LicencePanel.licence" src="licence.txt"/> <res id="InfoPanel.info" src="readme.txt"/> <res id="shortcutSpec.xml" src="shortcutSpec.xml"/> </resources> <native type="izpack" name="ShellLink.dll"/> <!-- The panels section. --> <panels> <panel classname="HelloPanel"/> <panel classname="InfoPanel"/> <panel classname="LicencePanel"/> <panel classname="TargetPanel"/> <panel classname="ShortcutPanel"/> <panel classname="PacksPanel"/> <panel classname="InstallPanel"/> <panel classname="SimpleFinishPanel"/> </panels> <native type="izpack" name="ShellLink.dll"/> <!-- The packs section. --> <packs> <pack name="Program and Dependencies" required="yes"> <description>Program,libraries and other dependencies</description> <file src="ExecutableJar.jar" targetdir="$INSTALL_PATH"/> <file src="lib" targetdir="$INSTALL_PATH"/> <file src="save" targetdir="$INSTALL_PATH"/> <file src="HelpContents.chm" targetdir="$INSTALL_PATH"/> <file src="icon.png" targetdir="$INSTALL_PATH"/> <file src="application.ini" targetdir="$INSTALL_PATH"/> <file src="readme.txt" targetdir="$INSTALL_PATH"/> <file src="licence.txt" targetdir="$INSTALL_PATH"/> <file src="autorun-win.bat" targetdir="$INSTALL_PATH"/> </pack> <pack name="Samples" required="no"> <description>Word Document Samples</description> <file src="samples" targetdir="$INSTALL_PATH"/> </pack> <pack name="Templates" required="no"> <description>Word Document Templates</description> <file src="templates" targetdir="$INSTALL_PATH"/> </pack> </packs>
和shortcutSpec.xml一样
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <shortcuts> <skipIfNotSupported/> <programGroup defaultName="AppGroupName" location="applications"/> <shortcut name="Application - Startup" target="$INSTALL_PATH\autorun-win.bat" workingDirectory="$INSTALL_PATH" programGroup="no" desktop="yes" applications="yes" startMenu="yes" startup="yes"/> </shortcuts>
补充说明:
>我得到零编译错误.
>如果没有添加快捷方式,安装程序工作正常.
>我的程序是一个可执行的jar,自动运行它我在Windows中创建了一个名为autorun-win.bat的批处理脚本,这是桌面快捷方式应链接到的.
编辑:
我尝试过这个导入以及32位的味道.对上述结果都没有任何影响.任何更多的贡献将不胜感激.
<native type="izpack" name="ShellLink_x64.dll" />