Tôi đang cố gắng sử dụng IzPack để cài đặt chương trình của mình và tôi muốn thêm Lối tắt trên màn hình vào trình cài đặt, đây là tài liệu/hướng dẫn từ trang web của IzPack.IzPack - Phím tắt trên Windows - Không hoạt động
http://izpack.org/documentation/desktop-shortcuts.html
Tuy nhiên, các tập tin XML dưới đây, khi biên soạn, chỉ tạo ra một màn hình trống trong trình cài đặt bị treo khi bạn cố gắng nhấp "Next" để đi qua nó. Đây là những gì màn hình trông giống như khi chạy trên Windows 7 - 64 bit.
Đây là tệp install.xml và shortcutSpec.xml của tôi.
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>
Và 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>
Ghi chú thêm:
Tôi nhận được lỗi biên dịch không.
Nếu không có nội dung phím tắt được thêm vào, trình cài đặt hoạt động tốt.
Chương trình của tôi là một tệp thực thi, để chạy tự động tôi đã tạo tập lệnh lô trong Windows có tên autorun-win.bat, đó là những gì mà lối tắt trên màn hình sẽ được liên kết đến.
EDIT:
Tôi đã cố gắng nhập khẩu này cũng như 32-bit hương vị. Không có bất kỳ ảnh hưởng nào đến kết quả trên. Bất kỳ đóng góp nhiều hơn sẽ được đánh giá rất nhiều.
<native type="izpack" name="ShellLink_x64.dll" />
Hãy xem xét điều này: http://stackoverflow.com/questions/33419830/izpack-create-shortcut-on-windows-7/35627201#35627201 – Pickle