Xml 创建一个快捷方式wilth-izpack-maven插件
我用izpack maven插件org.codehaus.izpack版本1.0-alpha-5创建了一个项目 问题是我无法为我的应用程序(windows)创建快捷方式,快捷方式面板显示为空。。。而且没有错误 所有的文件都存在,我试图以一个来自web的标准示例为基础。。没有成功 install.xml文件:Xml 创建一个快捷方式wilth-izpack-maven插件,xml,maven-plugin,izpack,Xml,Maven Plugin,Izpack,我用izpack maven插件org.codehaus.izpack版本1.0-alpha-5创建了一个项目 问题是我无法为我的应用程序(windows)创建快捷方式,快捷方式面板显示为空。。。而且没有错误 所有的文件都存在,我试图以一个来自web的标准示例为基础。。没有成功 install.xml文件: <resources> <res id="shortcutSpec.xml" src="./shortcutSpec.xml" /> </resourc
<resources>
<res id="shortcutSpec.xml" src="./shortcutSpec.xml" />
</resources>
<native type="izpack" name="ShellLink.dll"/>
<variables>
<variable name="DesktopShortcutCheckboxEnabled" value="true" />
</variables>
<panels>
<panel classname="HelloPanel"/>
<panel classname="InfoPanel"/>
<panel classname="LicencePanel"/>
<panel classname="TargetPanel"/>
<panel classname="PacksPanel"/>
<panel classname="InstallPanel"/>
<panel classname="ShortcutPanel"/>
</panels>
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<shortcuts>
<!--skipIfNotSupported/-->
<programGroup defaultName="company\product" location="startMenu"/>
<shortcut name="product" target="C:\Program Files\product\product.exe" description="Creating Gui Icon on the Desktop"
workingDirectory="$INSTALL_PATH" iconFile="C:\Program Files\product\icon.ico" initialState="normal" programGroup="yes" desktop="yes" applications="yes"
startMenu="yes" startup="no">
<createForPack name="product.exe"/>
</shortcut>
<shortcut
name="Documentation" target="C:\Program Files\product\doc\asdfsadfasf.docx"
workingDirectory="$INSTALL_PATH" iconFile="C:\Program Files\product\icon.ico"
description="Launch documentation" initialState="normal" programGroup="yes" desktop="yes"
applications="yes" startMenu="yes" startup="no">
<createForPack name="product.exe"/>
</shortcut>
</shortcuts>
在shortcutSpec.xml文件中:
<resources>
<res id="shortcutSpec.xml" src="./shortcutSpec.xml" />
</resources>
<native type="izpack" name="ShellLink.dll"/>
<variables>
<variable name="DesktopShortcutCheckboxEnabled" value="true" />
</variables>
<panels>
<panel classname="HelloPanel"/>
<panel classname="InfoPanel"/>
<panel classname="LicencePanel"/>
<panel classname="TargetPanel"/>
<panel classname="PacksPanel"/>
<panel classname="InstallPanel"/>
<panel classname="ShortcutPanel"/>
</panels>
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<shortcuts>
<!--skipIfNotSupported/-->
<programGroup defaultName="company\product" location="startMenu"/>
<shortcut name="product" target="C:\Program Files\product\product.exe" description="Creating Gui Icon on the Desktop"
workingDirectory="$INSTALL_PATH" iconFile="C:\Program Files\product\icon.ico" initialState="normal" programGroup="yes" desktop="yes" applications="yes"
startMenu="yes" startup="no">
<createForPack name="product.exe"/>
</shortcut>
<shortcut
name="Documentation" target="C:\Program Files\product\doc\asdfsadfasf.docx"
workingDirectory="$INSTALL_PATH" iconFile="C:\Program Files\product\icon.ico"
description="Launch documentation" initialState="normal" programGroup="yes" desktop="yes"
applications="yes" startMenu="yes" startup="no">
<createForPack name="product.exe"/>
</shortcut>
</shortcuts>
请帮帮我….您是否在64位Windows上运行?如果是,则需要64位版本的dll:
<native type="izpack" name="ShellLink_x64.dll">
<os family="windows" />
</native>
这只是一个猜测,但我知道我自己在为32位和64位平台开发时遇到了这个问题。快捷方式的
createForPack
元素的值必须是packs下指定的包名之一。如果安装时未选择此软件包,则会自动忽略相应的快捷方式。例如,在install.xml
文件中:
...
<packs>
<pack name="Core" required="yes" preselected="yes">`
...
...
<shortcut programGroup="yes"
desktop="yes"
applications="no"
startMenu="yes"
startup="no"
iconFile="$INSTALL_PATH\Icon.ico"
iconIndex="0"`
...
initialState="noShow">
<createForPack name="Core"/>
</shortcut>
这两个文件中的名称Core
相同。请查看中的答案。它可以帮助您找到这种行为的可能原因