izpack: create shortcut on windows

橙三吉。 提交于 2019-11-30 12:08:50

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>

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

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.

Step by step:

  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

As per the IzPack documentation, are you including the required .dll in the installer? http://izpack.org/documentation/desktop-shortcuts.html

<native type="izpack" name="ShellLink.dll"/>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!