izpack:在Windows上创建快捷方式 [英] izpack: create shortcut on windows

查看:119
本文介绍了izpack:在Windows上创建快捷方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用izpack为我的应用程序创建一个安装程序.到目前为止,我已经能够创建安装程序,并且在我的linux机器上,一切都很好. 问题是,在我在Windows 7计算机上对其进行过测试(Win7和WinXP)的安装程序未显示快捷方式面板. 我确实阅读了文档疑难解答部分,并确保我的安装程序中包含本机. 快捷方式xml文件也是如此,它们位于资源路径中的安装程序中. 我还读到它很可能是区分大小写的错字或类似的简单内容,但无法弄清楚. 这是我的快捷方式xml:

I use izpack to create an installer for my application. So far I was able to create the installer and on my linux machine everything is fine. The problem is that on the windows machines I tested it on (Win7 and WinXP) the installer did not show the shortcut panel. I did read the documentation troubleshooting section and took care that I have the natives in my installer. Same goes for the shortcut xml file, they are in the installer in the resources path. I also read that most likely it is a case sensitive typo or something similar simple but could not figure it out. Here is my shortcut 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>

推荐答案

我已经创建了这个(虚拟)安装文件,用于测试快捷方式面板:

I have created this (dummy) installation file just for testing the shortcut panel:

<?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的内容与您的问题显示的内容完全相同.

Where shortcutSpec.xml have the exact same content showed on your question.

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

I build it using IzPack 4.3.5 in Ubuntu (left) and tested on Windows 7 64 bits (right).

快捷方式面板在这里和那里打开.

Shortcut panel open here and there.

逐步:

  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
  1. Download IzPack-install-4.3.5.jar
  2. Install IzPack: java -jar IzPack-install-4.3.5.jar
  3. Generate installer: /usr/local/IzPack/bin/compile ./test.xml
  4. Test installer (Linux): java -jar test.jar
  5. Test installer (Windows): copy test.jar from Linux, start cmd, set path=C:\Program Files (x86)\Java\jdk1.6.0_26\bin and execute java -jar test.jar

这篇关于izpack:在Windows上创建快捷方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆