11

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>
Angelo Fuchs
  • 9,825
  • 1
  • 35
  • 72
  • Please check this answer, it has a list of possible causes and solutions: http://stackoverflow.com/questions/33419830/izpack-create-shortcut-on-windows-7/35627201#35627201 –  Feb 25 '16 at 13:14

2 Answers2

10

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).

IzPack shortcut panel

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
Juan Mellado
  • 14,973
  • 5
  • 47
  • 54
  • Thank you, could you post additional information for all binaries you use (a link)? The main problem the bounty should solve is having a template solution that one has to put no further thought into. – Angelo Fuchs Apr 09 '12 at 04:01
  • Also, please write how you got that nice gui from. I just installed izpack 4.3.5 and could not locate a program within it. – Angelo Fuchs Apr 09 '12 at 04:21
  • @AngeloNeuschitzer Hmmm... I did **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` – Juan Mellado Apr 09 '12 at 09:44
-2

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"/>
TheKaptain
  • 1,011
  • 9
  • 10
  • 1
    Are you running on 32 or 64 bit, as the dll is different for 64 bit? – TheKaptain Mar 05 '12 at 06:37
  • both and I tried both sets of libraries. Unfortunately the project has already migrated away from izpack so I can't get the code easily anymore. I always suspected it to be a problem with the libraries, but they were always were they belonged to, I even looked inside the installer to ensure they were there, and they were. – Angelo Fuchs Mar 06 '12 at 12:44