本文介绍了将其他文件添加到Netbeans应用程序的基于Inno的设置中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Netbeans 中使用 Inno 5安装安装程序将我的Java Swing应用程序构建到可执行设置文件中。它创建一个包含所有lib(所有jar文件)和app.jar的app.exe安装文件。

I am using Inno 5 Setup Installer in Netbeans to build my Java Swing application into an executable set up file. It creates an app.exe setup file with all the lib(all jar file) and app.jar.

因此,一旦用户执行app.exe文件,它就会创建一个文件夹在C:\ users \ username \ local \ appname,其中包含app.jar文件和库。

So once user executes app.exe file, it create a folder at C:\users\username\local\appname which has the app.jar file and the libraries.

是否可以添加其他文件app.exe安装中的文本文件?所以这些文本文件在执行时也可以在appname文件夹中找到。这些是应用程序运行所必需的。

Is it possible to add additional text files in app.exe setup? so these text files will also be avaliable in "appname" folder when executed. These are required for the app to run.

感谢您的时间:)

推荐答案

在Inno Setup中有一个我建议使用的ScriptWizard。经过几个步骤后,会出现以下窗口:

In Inno Setup there is a ScriptWizard which i recommend to use. After a few steps there comes this window:

注意:我使用Inno Setup中的应用程序。我从那里得到了截图。

NOTE: I use the application from Inno Setup. I got the Screenshot from there.

如果你点击添加文件您现在可以选择文本文件,它将在您的路径中设置。

If you click on "Add files" you now can select your text file and it will be setup within your path.

如果您不想要要使用该向导,您可以将其他文件作为条目添加到部分,例如:

If you don't want to use the wizard, you can add your additional files as entries in the [Files] section, like for instance:

[Files]
Source: "C:\path\to\your\text\file\you\want\to\add\to"; DestDir: "{app}"

除了为每个文件列出一个条目外,您还可以添加例如来自给定目录的特定扩展名的所有文件。

Except listing one entry per file, you can add e.g. all files of a certain extension from a given directory.

这篇关于将其他文件添加到Netbeans应用程序的基于Inno的设置中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 21:55