2011-09-03 114 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迁移出去,所以我无法轻松获得代码。我一直怀疑这是图书馆的一个问题,但他们一直都是他们所属的,我甚至向安装人员看了看,确保他们在那里,而他们是。 –