【问题标题】:izpack: create shortcut on windowsizpack:在 Windows 上创建快捷方式
【发布时间】:2011-11-09 20:48:02
【问题描述】:

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

【问题讨论】:

标签: windows shortcut izpack


【解决方案1】:

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

<native type="izpack" name="ShellLink.dll"/>

【讨论】:

  • 您是在 32 位还是 64 位上运行,因为 64 位的 dll 不同?
  • 我和我都尝试了两组库。不幸的是,该项目已经从 izpack 迁移出去,所以我不能再轻松地获取代码了。我一直怀疑这是库的问题,但它们始终属于它们,我什至查看了安装程序内部以确保它们在那里,它们确实存在。
【解决方案2】:

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

<?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 位(右)上进行了测试。

快捷面板随处打开。

一步一步:

  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. 测试安装程序(Windows):从Linux复制test.jar,启动cmd,设置path=C:\Program Files (x86)\Java\jdk1.6.0_26\bin并执行java -jar test.jar

【讨论】:

  • 谢谢,您能否发布有关您使用的所有二进制文件的附加信息(链接)?赏金应该解决的主要问题是拥有一个无需进一步考虑的模板解决方案。
  • 另外,请写下你是如何得到那个漂亮的 gui 的。我刚刚安装了 izpack 4.3.5,但在其中找不到程序。
  • @AngeloNeuschitzer 嗯...我做了 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) 测试安装程序 (Windows):从 Linux 复制 test.jar,启动cmd,设置path=C:\Program Files (x86)\Java\jdk1.6.0_26\bin并执行java -jar test.jar
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-10-04
  • 1970-01-01
  • 2018-11-06
  • 1970-01-01
  • 2022-10-14
  • 1970-01-01
相关资源
最近更新 更多