我在 Windows 8.1+ NetBeans 8.2 中创建了一个 JavaFx 应用程序,其安装工作正常。但是,它在安装过程中没有提供任何选择目标文件夹或许可协议(protocol)屏幕的选项。我尝试在项目属性上添加 licenceheader.txt 并构建应用程序,但它仍然可以直接安装。所以我的问题是如何将这些东西添加到我的应用程序中?
编辑:使用 InnoSetup 创建 .exe 自包含安装程序。
最佳答案
在[Languages]
部分中指定您的许可证。示例:
[Languages]
Name: "English"; MessagesFile: "compiler:Default.isl"; LicenseFile: "..\..\Inno\l.eng\LicenseEnglish.rtf"; InfoAfterFile: "..\..\Inno\l.eng\InfoAfterEnglish.rtf"
确保 DisableDirPage
未设置为 no
。也许您可以展示您的脚本,以便我们可以适本地帮助您。
请注意,默认设置为自动
,如图所示,这意味着如果已安装相同的应用程序,该窗口将不显示。这是通常的行为。要强制显示,请使用如上所述的 no
值。
您可以使用 Inno Script Studio 设置这些内容。例如:
<小时/>如果您安装了 QuickStart Pack那么它就会主动提出安装这个 IDE。
<小时/>The Inno Setup QuickStart Pack includes Inno Setup itself and additionally includes an option to install the Inno Script Studio script editor. This script editor is not official and is not required for general usage, but make Inno Setup easier to use. See the Third-Party Files page for more information.
The Inno Setup QuickStart Pack also includes an option to download and install official encryption support.
澄清
根据评论,对于单语言安装程序,仅使用 LicenseFile directive到 [Setup]
部分。无需仅仅为了添加许可证而引入虚拟 [Languages]
部分。
这也可以使用 Inno Script Installer 进行设置:
关于java - 如何在 javafx 应用程序中添加许可证/安装文件夹屏幕,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49126833/