2012-01-31 71 views
0

我使用izpack maven插件org.codehaus.izpack 1.0-alpha-5創建了一個項目。創建快捷鍵wilth izpack maven插件

問題是我無法爲我的應用程序(窗口)創建快捷方式,快捷方式面板顯示爲空......並且沒有錯誤。

所有文件是否存在,我試圖立足於從網絡..沒有sucesss標準的例子..

的install.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> 

在shortcutSpec.xml文件:

<?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> 

幫幫我好嗎.....

+0

請參閱http://stackoverflow.com/questions/33419830/izpack-create-shortcut-on-windows-7/35627201#35627201中的答案。它可以幫助您找到此行爲的可能原因 – Pickle 2016-02-25 13:08:05

回答

0

你在64位Windows上運行?如果是這樣,你需要的DLL的64位版本:

<native type="izpack" name="ShellLink_x64.dll"> 
    <os family="windows" /> 
</native> 

這只是一個猜測,但我知道我遇到了這個自己爲32個和64位平臺上開發。

1

快捷鍵createForPack的值必須是包裝下指定的包裝名稱之一。如果安裝時未選擇此包,則相應的快捷方式會自動省略。例如,在install.xml文件:

... 

<packs> 
    <pack name="Core" required="yes" preselected="yes">` 
... 

,並在shortcutSpec.xml文件:

​​

這名Core是在這兩個文件是相同的。