2012-07-12 91 views
8

我试图使用的IzPack安装了一个程序,我想桌面快捷方式添加到安装程序,这里是文档/从的IzPack网站的说明。的IzPack - 桌面快捷方式在Windows上 - 不工作

http://izpack.org/documentation/desktop-shortcuts.html

但是,下面的XML文件,编译时,只有创建当您尝试单击“下一步”晃过它是挂在安装一个空白屏幕。这是在Windows 7 - 64位上运行时的屏幕外观。

enter image description here

这是我的INSTALL.XML和shortcutSpec.xml文件。

INSTALL.XML

<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?> 

<installation version="1.0"> 

<!-- The info section. --> 

<info> 
    <appname>Application Name</appname> 
    <appversion>1.0</appversion> 
    <url>http://www.example.com/</url> 
    <javaversion>1.6</javaversion> 
    <run-privileged condition="izpack.macinstall|izpack.windowsinstall.vista|izpack.windowsinstall.7"/> 
</info> 

<!-- The gui preferences indication. --> 

<guiprefs width="640" height="480" resizable="yes"/> 

<!-- The locale section. --> 

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

<!-- The resources section. --> 

<resources> 
    <res id="LicencePanel.licence" src="licence.txt"/> 
    <res id="InfoPanel.info" src="readme.txt"/> 
    <res id="shortcutSpec.xml" src="shortcutSpec.xml"/> 
</resources> 
<native type="izpack" name="ShellLink.dll"/> 

<!-- The panels section. --> 

<panels> 
    <panel classname="HelloPanel"/> 
    <panel classname="InfoPanel"/> 
    <panel classname="LicencePanel"/> 
    <panel classname="TargetPanel"/> 
    <panel classname="ShortcutPanel"/> 
    <panel classname="PacksPanel"/> 
    <panel classname="InstallPanel"/> 
    <panel classname="SimpleFinishPanel"/> 
</panels> 

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

<!-- The packs section. --> 

<packs> 
    <pack name="Program and Dependencies" required="yes"> 
     <description>Program, libraries and other dependencies</description> 
     <file src="ExecutableJar.jar" targetdir="$INSTALL_PATH"/> 
     <file src="lib" targetdir="$INSTALL_PATH"/> 
     <file src="save" targetdir="$INSTALL_PATH"/> 
     <file src="HelpContents.chm" targetdir="$INSTALL_PATH"/> 
     <file src="icon.png" targetdir="$INSTALL_PATH"/> 
     <file src="application.ini" targetdir="$INSTALL_PATH"/>  
     <file src="readme.txt" targetdir="$INSTALL_PATH"/> 
     <file src="licence.txt" targetdir="$INSTALL_PATH"/> 
     <file src="autorun-win.bat" targetdir="$INSTALL_PATH"/> 
    </pack> 
    <pack name="Samples" required="no"> 
     <description>Word Document Samples</description> 
     <file src="samples" targetdir="$INSTALL_PATH"/> 
    </pack> 
    <pack name="Templates" required="no"> 
     <description>Word Document Templates</description> 
     <file src="templates" targetdir="$INSTALL_PATH"/> 
    </pack> 
</packs> 

而shortcutSpec.xml

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> 

<shortcuts> 
    <skipIfNotSupported/> 
    <programGroup defaultName="AppGroupName" location="applications"/> 
    <shortcut 
     name="Application - Startup" 
     target="$INSTALL_PATH\autorun-win.bat" 
     workingDirectory="$INSTALL_PATH" 
     programGroup="no" 
     desktop="yes" 
     applications="yes" 
     startMenu="yes" 
     startup="yes"/> 
</shortcuts> 

附加注释:

  1. 我得到零个编译错误。

  2. 没有快捷方式添加的东西,安装正常工作。

  3. 我的程序是一个可执行的jar,自动运行它我在Windows中创建了一个名为autorun-win.bat的批处理脚本,它是桌面快捷方式应该链接到的内容。

编辑:

我已经尝试了这个进口,以及32位的味道。对上述结果也没有任何影响。任何更多的贡献将不胜感激。

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

看看这个:http://stackoverflow.com/questions/33419830/izpack-create-shortcut-on-windows-7/35627201#35627201 – Pickle 2016-02-25 13:17:54

回答

7

创建快捷方式取决于LIB ShellLink.dll的本地支持仅支持32个系统。对于64位Windows,您必须添加以下条目以及支持这两种口味:

<native type="izpack" name="ShellLink_x64.dll" /> 
+1

不幸的是我试过这个,它对结果没有任何影响。不过,我很欣赏这个答复。 – CODe 2012-07-22 14:21:20

+1

您可以说明您正在运行的izpack版本吗? – Torsten 2012-07-23 09:53:25

+0

当前稳定版本:IzPack 4.3.5。对于迟到的反应抱歉,我在遇到其他问题后放弃了。看起来IzPack很漂亮,总体上不可预测,对商业应用来说不是很好。你会得到绿色检查提供唯一有用的答案,希望这至少可以帮助未来的人。 – CODe 2012-08-06 16:37:40

2

我从来没有使用过这个工具,所以这可能是一个全面的红色诅咒。 在快捷方式文件,你没有CreateForPack声明。这可能是与故障有关吗?

+1

感谢您的反馈意见,但不幸的是,这不是问题。 – CODe 2012-07-22 14:22:01

0

我都经历过,其中有快捷方式创建工作的IzPack配置突然停止把图标的情况下。 原来在linux下用convert commad创建的图标文件有问题,我还原为旧图标

2

虽然这个问题很老,但我今天在IzPack 4.3.5上遇到过这个问题。这里提供了两个意见。

首先,http://docs.codehaus.org/pages/viewpage.action?pageId=230398023处的文档显示放置在“natives”标记内的本地语句。这对于v4发行版似乎不正确。

其次,ShellLink_x64 DLL必须对编译器可见。我不得不在编译器执行行中添加'-h $ {IZPACK_HOME}'来实现此目的。可悲的是,如果找不到该文件,似乎没有任何警告,但是安装程序会按照描述挂起。

解决这些问题为我解决了这个问题。

相关问题