Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

xml - izpack: Create shortcut on windows 7

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 6bits) 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:

<shortcuts>
<programGroup defaultName="SteamNet" location="applications"/>
<shortcut
    name = "One Click Wonder"
    target = "$INSTALL_PATHoneclickwonder.bat"
    commandLine = ""
    workingDirectory= "$INSTALL_PATH"
    description="Minimal Desktop Timer"
    iconFile="$INSTALL_PATHimageswindows_icon.ico"
    iconIndex="0"
    initialState="noShow"
    programGroup="yes"
    desktop="yes"
    applications="yes"
    startMenu="yes"
    startup="yes"/>
</shortcuts>

And this is my install.xml file:

<?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>
  <natives>
    <native type="izpack" name="ShellLink_x64.dll"/>
</natives>
</installation>

But i can't display the shortcut panel in my installer ... !

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I compared this to a working installer file here which in contrast contains the following <natives> setting:

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

When using a 32-Bit Java Runtime the 32-Bit ShellLink.dll will be used which is missing in your setup.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...