Izpack 5.0& Maven - 构建成功,但快捷方式不显示在桌面上

时间:2016-05-26 12:44:05

标签: windows maven installer shortcut izpack

我一直在使用Izpack 5.0和Maven开发安装程序。它已创建并正常工作,我可以在程序目录中为卸载程序创建快捷方式,但我无法在桌面上获得快捷方式。

这是我的shortcutSpec.xml(实际应用程序名称替换为隐私的程序名称):

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

<izpack:shortcuts version="5.0"
              xmlns:izpack="http://izpack.org/schema/shortcuts"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://izpack.org/schema/shortcuts        
              http://izpack.org/schema/5.0/izpack-shortcuts-5.0.xsd">

<programGroup defaultName="Program Name" location="applications"/>

<shortcut
        name="Uninstaller"
        programGroup="yes"
        desktop="yes"
        applications="no"
        startMenu="no"
        startup="no"
        target="$INSTALL_PATH\Uninstaller\uninstaller.jar"
        commandLine=""
        iconFile="%SystemRoot%\system32\SHELL32.dll"
        iconIndex="31"
        description="This uninstalls the test">

    <createForPack name="Core"/>
</shortcut>

</izpack:shortcuts>

这是我的install.xml:

<izpack:installation version="5.0"
                 xmlns:izpack="http://izpack.org/schema/installation"
                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                 xsi:schemaLocation="http://izpack.org/schema/installation      
                 http://izpack.org/schema/5.0/izpack-installation-5.0.xsd">

 <info>
     <appname>Program Name </appname>
     <appversion>1.0</appversion>
     <javaversion>1.8</javaversion>
 </info>

<locale>
    <langpack iso3="eng"/>
</locale>

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

<res src="shortcutSpec.xml" id="shortcutSpec.xml"/>

<guiprefs height="400" resizable="no" width="640">
    <modifier key="useButtonIcons" value="yes"/>
    <modifier key="useLabelIcons" value="no"/>
    <modifier key="labelGap" value="2"/>
    <modifier key="layoutAnchor" value="NORTHWEST"/>
    <modifier key="useHeadingPanel" value="no"/>
    <modifier key="headingImageOnLeft" value="yes"/>
    <modifier key="headingLineCount" value="1"/>
    <modifier key="headingFontSize" value="1.5"/>
    <modifier key="headingBackgroundColor" value="0x00ffffff"/>
    <modifier key="headingPanelCounter" value="progressbar"/>
    <modifier key="headingPanelCounterPos" value="inNavigationPanel"/>
</guiprefs>

<panels>
    <panel classname="TargetPanel"/>
    <panel classname="PacksPanel"/>
    <panel classname="InstallPanel"/>
    <panel classname="FinishPanel"/>
 </panels>

 <packs>
    <pack name="Core" required="yes">
        <description>Core installation files</description>
        <file src="..\ProgramName.jar" targetdir="$INSTALL_PATH" unpack="false" />
    </pack>
 </packs>

</izpack:installation>

非常感谢任何帮助!

2 个答案:

答案 0 :(得分:0)

  1. 从shortcutSpec xml中删除 izpack:快捷方式元素。这是我在shortcutSpec xml中的内容,效果很好。我已经尝试在 izpack:快捷方式中包装快捷方式元素,但它从未奏效。
  2. 快捷方式

    中包裹快捷方式

    &#13;
    &#13;
    [NAME]
    &#13;
    &#13;
    &#13;

答案 1 :(得分:0)

您需要将以下本机库添加到install.xml:

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

这些负责在安装过程中创建快捷方式。

IzPack Shortcut Panel Documentation

中也对此进行了详细说明