我使用 izpack 为我的应用程序创建安装程序。到目前为止,我已经能够创建安装程序,并且在我的 Linux 机器上一切都很好。
问题是,在我测试的 Windows 机器上(Win7 和 WinXP),安装程序没有显示快捷方式面板。
我确实阅读了文档故障排除部分,并注意我的安装程序中有本机。
快捷方式 xml 文件也是如此,它们位于安装程序的资源路径中。
我还读到,很可能是区分大小写的拼写错误或类似的简单错误,但无法弄清楚。
这是我的快捷方式 xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
This is the shortcut specification for windows. Its considered default so on
Systems that are not shortcut compatible the information is taken from here.
-->
<shortcuts>
<programGroup defaultName="SteamNet" location="applications"/>
<shortcut
name = "One Click Wonder"
target = "$INSTALL_PATH\oneclickwonder.bat"
commandLine = ""
workingDirectory= "$INSTALL_PATH"
description="Minimal Desktop Timer"
iconFile="$INSTALL_PATH\images\windows_icon.ico"
iconIndex="0"
initialState="noShow"
programGroup="yes"
desktop="yes"
applications="yes"
startMenu="yes"
startup="yes"/>
</shortcuts>
我创建了这个(虚拟)安装文件只是为了测试快捷方式面板:
<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
<installation version="1.0">
<info>
<appname>Test</appname>
<appversion>1</appversion>
</info>
<guiprefs width="600" height="480" resizable="no">
</guiprefs>
<locale>
<langpack iso3="eng"/>
</locale>
<panels>
<panel classname="ShortcutPanel"/>
</panels>
<packs>
<pack name="Test" required="yes">
<description>Description</description>
</pack>
</packs>
<resources>
<res src="shortcutSpec.xml" id="shortcutSpec.xml"/>
</resources>
<native type="izpack" name="ShellLink.dll"/>
</installation>
Where shortcutSpec.xml
与您的问题显示的内容完全相同。
我在 Ubuntu 中使用 IzPack 4.3.5 构建它(左),并在 Windows 7 64 位(右)上进行测试。
快捷方式面板到处打开。
一步步:
- 下载
IzPack-install-4.3.5.jar
- 安装 IzPack:
java -jar IzPack-install-4.3.5.jar
- 生成安装程序:
/usr/local/IzPack/bin/compile ./test.xml
- 测试安装程序(Linux):
java -jar test.jar
- 测试安装程序 (Windows):复制
test.jar
从 Linux 开始cmd
, set path=C:\Program Files (x86)\Java\jdk1.6.0_26\bin
并执行java -jar test.jar
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)