Windows 7 如何让IzPack将我的应用程序添加到“开始”菜单?

Windows 7 如何让IzPack将我的应用程序添加到“开始”菜单?,windows-7,izpack,Windows 7,Izpack,现在我已经阅读了整个手册两遍,并设置了XML构建文件,这样它就可以在Windows(我的测试机器恰好是Windows 7,但我想问题也会发生在Vista)机器上执行所有操作,除了将程序插入开始菜单之外。我忽略了什么选择 shortcutSpec.xml <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <shortcuts> <skipIfNotSupported/> <progr

现在我已经阅读了整个手册两遍,并设置了XML构建文件,这样它就可以在Windows(我的测试机器恰好是Windows 7,但我想问题也会发生在Vista)机器上执行所有操作,除了将程序插入开始菜单之外。我忽略了什么选择

shortcutSpec.xml

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

<shortcuts>
<skipIfNotSupported/>
    <programGroup defaultName="myapp" location="applications"/>
    <shortcut
        name="myapp"
        programGroup="yes"
        desktop="no"
        applications="yes"
        startMenu="yes"
        startup="no"
        target="$INSTALL_PATH\myapp.jar"
        commandLine=""
        description="myapp"
        iconFile="%SystemRoot%\system32\SHELL32.dll"
        iconIndex="3">
        <createForPack name="Base"/>
    </shortcut>
    <shortcut
        name="myapp Documentation"
        programGroup="yes"
        desktop="no"
        applications="yes"
        startMenu="yes"
        startup="no"
        target="$INSTALL_PATH\myappMan.pdf"
        commandLine=""
        iconFile="%SystemRoot%\system32\SHELL32.dll"
        iconIndex="30"
        description="myapp docs">
        <createForPack name="Manual"/>
    </shortcut>                
    <shortcut
        name="myapp Uninstaller"
        programGroup="yes"
        desktop="no"
        applications="yes"
        startMenu="yes"
        startup="no"
        target="$INSTALL_PATH\Uninstaller\uninstaller.jar"
        commandLine=""
        iconFile="%SystemRoot%\system32\SHELL32.dll"
        iconIndex="31"
        description="Uninstall myapp">
        <createForPack name="Base"/>
    </shortcut>
</shortcuts>

来自IzPack文档:

是shortcutSpec.xml中的标记

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

<shortcuts>
<skipIfNotSupported/>
    <programGroup defaultName="myapp" location="applications"/>
    <shortcut
        name="myapp"
        programGroup="yes"
        desktop="no"
        applications="yes"
        startMenu="yes"
        startup="no"
        target="$INSTALL_PATH\myapp.jar"
        commandLine=""
        description="myapp"
        iconFile="%SystemRoot%\system32\SHELL32.dll"
        iconIndex="3">
        <createForPack name="Base"/>
    </shortcut>
    <shortcut
        name="myapp Documentation"
        programGroup="yes"
        desktop="no"
        applications="yes"
        startMenu="yes"
        startup="no"
        target="$INSTALL_PATH\myappMan.pdf"
        commandLine=""
        iconFile="%SystemRoot%\system32\SHELL32.dll"
        iconIndex="30"
        description="myapp docs">
        <createForPack name="Manual"/>
    </shortcut>                
    <shortcut
        name="myapp Uninstaller"
        programGroup="yes"
        desktop="no"
        applications="yes"
        startMenu="yes"
        startup="no"
        target="$INSTALL_PATH\Uninstaller\uninstaller.jar"
        commandLine=""
        iconFile="%SystemRoot%\system32\SHELL32.dll"
        iconIndex="31"
        description="Uninstall myapp">
        <createForPack name="Base"/>
    </shortcut>
</shortcuts>
标记允许您指定菜单的名称,或者更准确地说,指定快捷方式将在其中分组的文件夹。程序组的确切位置和外观取决于安装应用程序的特定目标系统,但您可以部分控制它。请注意,
在规范中只能出现一次。如果出现多个实例,则只使用第一个实例。
此标记需要两个属性:
defaultName
location
<代码>默认名称指定组菜单在目标系统上应具有的名称。您应该知道,
ShortcutPanel
会将此名称作为一个选项呈现给用户。然后,用户可以编辑此名称或选择已存在的组。因此,无法保证目标系统上程序组的实际名称与您的规范相同<代码>位置指定组菜单应显示的位置。有两种选择:
应用程序
开始菜单
。如果使用
应用程序
,则菜单将置于通常用于应用程序快捷方式的菜单中。建议将应用程序用于Unix快捷方式。
如果使用
startmenus
,则组菜单将位于目标系统上可用的最顶层菜单。根据目标系统的不同,可能无法完全遵守此规范。在这种情况下,
ShortcutPanel
会将选择映射到与您的选择最相似的位置。Unix快捷方式不需要支持startMenu,因为应用程序菜单已经处于最高级别。这意味着这对SSS平台没有影响

查看IzPack文档中shortcutSpec.xml的工作示例:

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

<shortcuts>
<skipIfNotSupported/>
    <programGroup defaultName="myapp" location="applications"/>
    <shortcut
        name="myapp"
        programGroup="yes"
        desktop="no"
        applications="yes"
        startMenu="yes"
        startup="no"
        target="$INSTALL_PATH\myapp.jar"
        commandLine=""
        description="myapp"
        iconFile="%SystemRoot%\system32\SHELL32.dll"
        iconIndex="3">
        <createForPack name="Base"/>
    </shortcut>
    <shortcut
        name="myapp Documentation"
        programGroup="yes"
        desktop="no"
        applications="yes"
        startMenu="yes"
        startup="no"
        target="$INSTALL_PATH\myappMan.pdf"
        commandLine=""
        iconFile="%SystemRoot%\system32\SHELL32.dll"
        iconIndex="30"
        description="myapp docs">
        <createForPack name="Manual"/>
    </shortcut>                
    <shortcut
        name="myapp Uninstaller"
        programGroup="yes"
        desktop="no"
        applications="yes"
        startMenu="yes"
        startup="no"
        target="$INSTALL_PATH\Uninstaller\uninstaller.jar"
        commandLine=""
        iconFile="%SystemRoot%\system32\SHELL32.dll"
        iconIndex="31"
        description="Uninstall myapp">
        <createForPack name="Base"/>
    </shortcut>
</shortcuts>
是shortcutSpec.xml中的标记

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

<shortcuts>
<skipIfNotSupported/>
    <programGroup defaultName="myapp" location="applications"/>
    <shortcut
        name="myapp"
        programGroup="yes"
        desktop="no"
        applications="yes"
        startMenu="yes"
        startup="no"
        target="$INSTALL_PATH\myapp.jar"
        commandLine=""
        description="myapp"
        iconFile="%SystemRoot%\system32\SHELL32.dll"
        iconIndex="3">
        <createForPack name="Base"/>
    </shortcut>
    <shortcut
        name="myapp Documentation"
        programGroup="yes"
        desktop="no"
        applications="yes"
        startMenu="yes"
        startup="no"
        target="$INSTALL_PATH\myappMan.pdf"
        commandLine=""
        iconFile="%SystemRoot%\system32\SHELL32.dll"
        iconIndex="30"
        description="myapp docs">
        <createForPack name="Manual"/>
    </shortcut>                
    <shortcut
        name="myapp Uninstaller"
        programGroup="yes"
        desktop="no"
        applications="yes"
        startMenu="yes"
        startup="no"
        target="$INSTALL_PATH\Uninstaller\uninstaller.jar"
        commandLine=""
        iconFile="%SystemRoot%\system32\SHELL32.dll"
        iconIndex="31"
        description="Uninstall myapp">
        <createForPack name="Base"/>
    </shortcut>
</shortcuts>
标记允许您指定菜单的名称,或者更准确地说,指定快捷方式将在其中分组的文件夹。程序组的确切位置和外观取决于安装应用程序的特定目标系统,但您可以部分控制它。请注意,
在规范中只能出现一次。如果出现多个实例,则只使用第一个实例。
此标记需要两个属性:
defaultName
location
<代码>默认名称指定组菜单在目标系统上应具有的名称。您应该知道,
ShortcutPanel
会将此名称作为一个选项呈现给用户。然后,用户可以编辑此名称或选择已存在的组。因此,无法保证目标系统上程序组的实际名称与您的规范相同<代码>位置指定组菜单应显示的位置。有两种选择:
应用程序
开始菜单
。如果使用
应用程序
,则菜单将置于通常用于应用程序快捷方式的菜单中。建议将应用程序用于Unix快捷方式。
如果使用
startmenus
,则组菜单将位于目标系统上可用的最顶层菜单。根据目标系统的不同,可能无法完全遵守此规范。在这种情况下,
ShortcutPanel
会将选择映射到与您的选择最相似的位置。Unix快捷方式不需要支持startMenu,因为应用程序菜单已经处于最高级别。这意味着这对SSS平台没有影响


检查shortcutSpec.xml的工作示例

您应该发布
shortcutSpec.xml
代码。我的第一个问题是我甚至没有shortcutSpec.xml文件!虽然我在谷歌上搜索了一些文档,并且能够构建一个并重新编译安装程序,但没有任何更改。安装后仍然没有显示文件夹和链接。您应该发布
shortcutSpec.xml
代码。我的第一个问题是,我甚至没有shortcutSpec.xml文件!虽然我在谷歌上搜索了一些文档,并且能够构建一个并重新编译安装程序,但没有任何更改。安装后仍然不会显示文件夹和链接。
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

<shortcuts>
<skipIfNotSupported/>
    <programGroup defaultName="myapp" location="applications"/>
    <shortcut
        name="myapp"
        programGroup="yes"
        desktop="no"
        applications="yes"
        startMenu="yes"
        startup="no"
        target="$INSTALL_PATH\myapp.jar"
        commandLine=""
        description="myapp"
        iconFile="%SystemRoot%\system32\SHELL32.dll"
        iconIndex="3">
        <createForPack name="Base"/>
    </shortcut>
    <shortcut
        name="myapp Documentation"
        programGroup="yes"
        desktop="no"
        applications="yes"
        startMenu="yes"
        startup="no"
        target="$INSTALL_PATH\myappMan.pdf"
        commandLine=""
        iconFile="%SystemRoot%\system32\SHELL32.dll"
        iconIndex="30"
        description="myapp docs">
        <createForPack name="Manual"/>
    </shortcut>                
    <shortcut
        name="myapp Uninstaller"
        programGroup="yes"
        desktop="no"
        applications="yes"
        startMenu="yes"
        startup="no"
        target="$INSTALL_PATH\Uninstaller\uninstaller.jar"
        commandLine=""
        iconFile="%SystemRoot%\system32\SHELL32.dll"
        iconIndex="31"
        description="Uninstall myapp">
        <createForPack name="Base"/>
    </shortcut>
</shortcuts>