【发布时间】:2014-06-30 12:55:51
【问题描述】:
我正在尝试使用 IzPack 制作一个非常简单的安装程序。它应该做以下两件事 1.将dist目录的所有内容复制粘贴到UserHome/MyApp目录下。 2.执行批处理文件编辑注册表项以在用户登录时启动jar文件。
但我只停留在第一步!如果我使用以下 XML 并生成安装程序,则不会安装任何内容。生成的安装程序运行并显示 InstallPanel,但没有任何内容复制到 user_home 目录。
看起来我无法为 Install_path 变量赋值。
<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
<installation version="1.0">
<variables>
<variable name="INSTALL_PATH" value="$USER_HOME/MyApp"/>
</variables>
<info>
<appname>My App</appname>
<appversion>1.0</appversion>
<authors>
<author name="My APP Author" email="support@myapp.com"/>
</authors>
<url>http://SomeURL.net</url>
</info>
<guiprefs width="640" height="480" resizable="yes"/>
<locale>
<langpack iso3="eng"/>
</locale>
<panels>
<panel classname="InstallPanel"/>
</panels>
<packs>
<pack name="Base" required="yes">
<description>The base files</description>
<fileset dir="dist" targetdir="$INSTALL_PATH"/>
</pack>
</packs>
</installation>
更新
<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
<installation version="1.0">
<variables>
<variable name="TargetPanel.dir.windows" value="$USER_HOME\MyTeamNinja"/>
<variable name="TargetPanel.dir.mac" value="$USER_HOME/MyTeamNinja"/>
</variables>
<info>
<appname>My App</appname>
<appversion>1.0</appversion>
<authors>
<author name="MyTeamNinja" email="support@MyTeamNinja.com"/>
</authors>
<url>http://myteam.ninja</url>
</info>
<guiprefs width="640" height="480" resizable="yes"/>
<locale>
<langpack iso3="eng"/>
</locale>
<panels>
<panel classname="DefaultTargetPanel"/>
<panel classname="InstallPanel"/>
<panel classname="SimpleFinishPanel"/>
</panels>
<packs>
<pack name="Base" required="yes">
<description>The base files</description>
<fileset dir="dist" targetdir="$INSTALL_PATH"/>
</pack>
</packs>
</installation>
现在,只要我单击安装程序,它就会开始安装,但在 c:\program files\My App\
【问题讨论】:
标签: izpack