2014-01-10 49 views
2

我明白这个问题之前已经被问过,但是在那里和IzPack文档中提供的“解决方案”实际上并没有工作。此外,我没有在这个网站上发表评论或任何其他问题或解决方案的声誉,所以我不得不再次提出这个问题。我有一个可以添加快捷方式的工作安装程序,并且我已经遵循了很多示例来查找我的错误无济于事。伊兹帕克是一个记录不完善,兽性极强的野兽。我如何获得IzPack将我的程序添加到Windows注册表?

一切正常,程序放在正确的目录和开始菜单组,我可以运行它。唯一没有发生的部分是注册表编辑。

我在学习获取快捷方式面板时必须手动将Shelllink Dll添加到%JAVA_HOME%\bin目录中。由于这不是在文档中明确说明,并且这些文件不包含在IzPack安装中,所以我认为它不是必需的,但那是我终于使用它的唯一方法。我将COIOSHelper Dll添加到相同的位置,但没有任何改变。我怀疑它与实际将Dll包含到最终jar安装程序中有关,但没有关于如何确保正确发生的文档。

INSTALL.XML

<installation version="1.0"> 

    <info> 
    <appname>MyApp</appname> 
    <appversion>1.0.0</appversion> 
    <appsubpath>MyApp</appsubpath> 
    <javaversion>1.7</javaversion> 
    <authors> 
    <author name="ME" email="[email protected]"/> 
    </authors> 
    <url>http://www.me.com</url> 
    <run-privileged/> 
    </info> 

    <guiprefs resizable="no" width="480" height="360"> 
    <laf name="looks"> 
     <param name="variant" value="windows" /> 
     <os family="windows" /> 
    </laf> 
    </guiprefs> 

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

    <resources> 
    <res id="shortcutSpec.xml" src="shortcutSpec.xml"/> 
    <res src="MyApp.ico" id="MyApp.ico"/> 
    <res src="MyLicense.txt" id="LicencePanel.licence"/> 

    </resources> 

    <natives> 
    <native type="izpack" name="ShellLink.dll"/> 
    <native type="izpack" name="ShellLink_x64.dll"/> 
    <native type="3rdparty" name="COIOSHelper.dll" stage="both"> 
     <os family="windows"/> 
    </native> 
    <native type="3rdparty" name="COIOSHelper_x64.dll" stage="both"> 
     <os family="windows"/> 
    </native> 
    </natives> 

    <listeners> 
    <listener classname="RegistryInstallerListener" stage="install"/> 
    <listener classname="RegistryUninstallerListener" stage="uninstall"/> 
    </listeners> 

    <panels> 
    <panel classname="CheckedHelloPanel" /> 
    <panel classname="LicencePanel" /> 
    <panel classname="TargetPanel" /> 
    <panel classname="InstallPanel" /> 
    <panel classname="ShortcutPanel" id="shortcutpanel" /> 
    <panel classname="SimpleFinishPanel" /> 
    </panels> 

    <packs> 
    <pack name="Core" required="yes" preselected="yes"> 
     <description>The core files needed for correct operation of the MyApp Application</description> 
     <file src="myapp-1.0.0.jar" targetdir="$INSTALL_PATH"/> 
     <file src="MyApp.ico" targetdir="$INSTALL_PATH\images"/> 
    </pack> 
    </packs> 


</installation> 

回答

0

你从哪里得到的COIOSHelper的DLL?这些似乎并未包含在我的IzPack安装中。我不必为ShellLink DLL做任何事情,他们只是在那里工作。另外值得注意的是,我发现ShellLink DLL的“native”条目不能位于“natives”标签内。如果我把它们放在那里,安装程序会中断。他们必须在“安装”标签下正确。

+1

不幸的是,花时间来弄清楚这一点使我们决定朝不同的方向前进。我不积极,但我相信我从codehaus网站获得了他们。 – Bebop

+1

IzPack 5.0+现在包含这些DLL – Pickle

相关问题