IZPack无法在Windows 7和Windows 10上创建桌面快捷方式

时间:2018-11-22 11:08:44

标签: java shortcut izpack

大家好,我目前正在尝试使用Izypack版本5.1.3创建桌面应用程序安装程序,该安装程序将在桌面上创建应用程序的快捷方式。

在我的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>application</appname>
        <appversion>1.0</appversion>
        <appsubpath>application</appsubpath>
        <javaversion>1.8</javaversion>
    </info>

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

    <guiprefs width="800" height="600" resizable="no">
        <splash>images/peas_load.gif</splash>
        <modifier key="useHeadingPanel" value="yes"/>
    </guiprefs>

    <resources>
        <res id="userInputSpec.xml" src="installer/userInputSpecv5.xml"/>
        <res id="userInputLang.xml_eng" src="/installer/userInputLangV5.xml_eng"/>
        <res id="shortcutSpec.xml" src="/installer/default_shortcut_specification.xml"/>
    </resources>
    <natives>
        <native type="izpack" name="ShellLink.dll"/>
        <native type="izpack" name="ShellLink_x64.dll"/>
    </natives>

    <panels>
        <panel classname="TargetPanel"/>
        <panel classname="UserInputPanel" id="uip">
            <validator classname="com.application.installer.Validator"/>
        </panel>
        <panel classname="InstallPanel"/>
        <panel classname="ShortcutPanel" id="my_shortcutpanel">
            <skipIfNotSupported/>
        </panel>
        <panel classname="FinishPanel"/>
    </panels>

    <packs>
        <pack name="Config" required="yes">
            <description>The core files needed for the application</description>
            <file src="installer/application-app.properties" targetdir="$INSTALL_PATH/server"/>
            <parsable targetfile="$INSTALL_PATH/server/application-app.properties"
                      parsable="yes"/>
        </pack>

        <pack name="Database" required="yes" preselected="yes">
            <description>Database</description>
            <fileset dir="build/distributions/uberjar/" targetdir="$INSTALL_PATH/server">

            </fileset>
        </pack>
        <pack name="Desktop App" required="yes" preselected="yes">
            <description>Desktop GUI</description>
            <fileset dir="deploy/app-desktop/" targetdir="$INSTALL_PATH/app-desktop">
            </fileset>
            <file src="installer/Readme.txt" targetdir="$INSTALL_PATH"/>
            <file src="installer/Licence.txt" targetdir="$INSTALL_PATH"/>
        </pack>


        <pack name="Execute File" required="yes" preselected="yes">
            <description>Exe</description>
            <fileset dir="bin" targetdir="$INSTALL_PATH/server">

            </fileset>

        </pack>
    </packs>

</izpack:installation>

在我的shortCutSpecification.xml下面

<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">
    <shortcuts>
        <skipIfNotSupported/>
        <programGroup defaultName="application\applicationDesktop"
                    location="desktop"/>
        <shortcut
                name="application test"
                target="$INSTALL_PATH\app-desktop\bin\app-desktop.bat"
                workingDirectory="$INSTALL_PATH\app-desktop\bin"
                description="This starts MyApplication"
                initialState="minimized"
                programGroup="yes"
                desktop="yes"
                applications="no"
                startMenu="yes"
                startup="no">
        </shortcut>
    </shortcuts>
</izpack:shortcuts>

我还使用IZpack 5.0.6版进行了编译,但是快捷方式未出现在Windows桌面上。因此结果与5.0.6和5.1.3相同。

0 个答案:

没有答案