2011-09-03 65 views
10

我使用izpack爲我的應用程序創建安裝程序。到目前爲止,我能夠創建安裝程序,並在我的Linux機器上一切都很好。 問題是,在我測試過的Windows機器上(Win7和WinXP),安裝程序沒有顯示快捷面板。 我沒有閱讀文檔疑難解答部分,並注意我在我的安裝程序中有本地文件。 同樣適用於快捷方式xml文件,它們位於資源路徑中的安裝程序中。 我也讀過,很可能它是一個區分大小寫的錯字或類似的簡單但無法弄清楚。 這裏是我的快捷方式XML:izpack:在窗口上創建快捷方式

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
<!-- 
This is the shortcut specification for windows. Its considered default so on 
Systems that are not shortcut compatible the information is taken from here. 
--> 
<shortcuts> 
<programGroup defaultName="SteamNet" location="applications"/> 
<shortcut 
    name = "One Click Wonder" 
    target = "$INSTALL_PATH\oneclickwonder.bat" 
    commandLine = "" 
    workingDirectory= "$INSTALL_PATH" 
    description="Minimal Desktop Timer" 
    iconFile="$INSTALL_PATH\images\windows_icon.ico" 
    iconIndex="0" 
    initialState="noShow" 
    programGroup="yes" 
    desktop="yes" 
    applications="yes" 
    startMenu="yes" 
    startup="yes"/> 
</shortcuts> 
+0

請檢查這個答案,它有可能的原因和解決方案的列表:http://stackoverflow.com/questions/33419830/izpack-create-shortcut-on-windows-7/35627201#35627201 – Pickle

回答

9

我創造了這個(虛擬)安裝文件只是用於測試的快捷面板:

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

shortcutSpec.xml具有完全相同的內容表現出對你的問題。

我在Ubuntu(左)使用IzPack 4.3.5構建它,並在Windows 7 64位(右)上進行測試。

IzPack shortcut panel

快捷面板開在這裏和那裏。

循序漸進:

  1. 下載IzPack-install-4.3.5.jar
  2. 安裝的IzPack:java -jar IzPack-install-4.3.5.jar
  3. 生成安裝程序:/usr/local/IzPack/bin/compile ./test.xml
  4. 測試安裝程序(Linux)的:java -jar test.jar
  5. 測試安裝程序(Windows)中:複製來自Linux的test.jar,啓動cmd,設置爲path=C:\Program Files (x86)\Java\jdk1.6.0_26\bin並執行java -jar test.jar
+0

謝謝,您能否發佈您使用的所有二進制文件的附加信息(鏈接)?賞金應該解決的主要問題是有一個模板解決方案,人們不得不進一步考慮。 –

+0

另外,請寫下你是如何得到這個不錯的gui的。我剛剛安裝了izpack 4.3.5,並找不到它中的程序。 –

+0

@AngeloNeuschitzer嗯......我** 1)**下載'的IzPack安裝-4.3.5.jar' ** 2)**安裝的IzPack:'Java的罐子的IzPack安裝,4.3.5.jar' ** 3)**生成安裝程序:'的/ usr /本地/的IzPack/bin中/編譯/ test.xml' ** 4)**測試安裝程序(Linux)的:'Java的罐子test.jar' ** 5) **測試安裝程序(Windows):複製'測試。jar'從Linux啓動'cmd',設置'path = C:\ Program Files(x86)\ Java \ jdk1.6.0_26 \ bin'並執行'java -jar test.jar' –

-2

按照該文件的IzPack,你包括在安裝程序中所需的.dll? http://izpack.org/documentation/desktop-shortcuts.html

<native type="izpack" name="ShellLink.dll"/> 
+0

是。我當然做了。 (我甚至在我的問題中提到它。) –

+1

你在32位或64位上運行,因爲dll與64位不同? – TheKaptain

+0

兩者,我試了兩套庫。不幸的是,該項目已經從izpack遷移出去,所以我無法輕鬆獲得代碼。我一直懷疑這是圖書館的一個問題,但他們一直都是他們所屬的,我甚至向安裝人員看了看,確保他們在那裏,而他們是。 –