11

我使用 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>
4

2 回答 2

10

我创建了这个(虚拟)安装文件只是为了测试快捷面板:

<?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>

您的问题在哪里shortcutSpec.xml显示了完全相同的内容。

我在 Ubuntu(左)中使用 IzPack 4.3.5 构建它,并在 Windows 7 64 位(右)上进行了测试。

IzPack 快捷面板

快捷面板在这里和那里打开。

一步步:

  1. 下载IzPack-install-4.3.5.jar
  2. 安装 IzPack:java -jar IzPack-install-4.3.5.jar
  3. 生成安装程序:/usr/local/IzPack/bin/compile ./test.xml
  4. 测试安装程序(Linux):java -jar test.jar
  5. test.jar测试安装程序(Windows):从 Linux复制、启动cmd、设置path=C:\Program Files (x86)\Java\jdk1.6.0_26\bin和执行java -jar test.jar
于 2012-04-06T15:33:22.660 回答
-2

根据 IzPack 文档,您是否在安装程序中包含所需的 .dll? http://izpack.org/documentation/desktop-shortcuts.html

<native type="izpack" name="ShellLink.dll"/>
于 2012-02-24T00:48:13.210 回答