[英]How to add additional file/folder in Netbeans native packaging for Java SE application
I am trying to make an EXE installer of my Java Swing application following instructions found here: http://netbeans.org/kb/docs/java/native_pkg.html 我正在尝试按照此处的说明对Java Swing应用程序进行EXE安装: http : //netbeans.org/kb/docs/java/native_pkg.html
my dist folder structure is like this : 我的dist文件夹结构是这样的:
-> dist
-> lib
-> application.jar
-> config folder //additional folder
-> another additional folder //additional folder
Those two additional folder listed above gets ignored after deploying native packaging. 部署本机打包后,上面列出的另外两个文件夹将被忽略。 I want to add those two inside /app folder and keep the folder structure like below:
我想在/ app文件夹中添加这两个文件夹,并保留如下文件夹结构:
-> app
-> lib
-> config folder //additional folder
-> another additional folder //additional folder
-> application.jar
-> package.cfg
-> runtime
-> jre
-> applcation.exe
-> application.ico
-> unins000.dat
-> unins000.exe
I am using ant builder and inno setup for the purpose. 我正在为此目的使用ant builder和inno设置。
After trying for last few hours I decided to post it here for help. 经过数小时的尝试,我决定将其发布在此处以寻求帮助。 Anything towards the right direction will be greatly appreciated.
任何朝着正确方向前进的事情将不胜感激。 Thanks in advance.
提前致谢。
If you uses an iss script to build your installer, you can just add a new line to the script like this in the Files section: 如果您使用iss脚本来构建安装程序,则可以在“文件”部分中向脚本添加新行,如下所示:
[Files]
Source: "config\*"; DestDir: "{app}\config"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "additional\*"; DestDir: "{app}\additional"; Flags: ignoreversion recursesubdirs createallsubdirs
This should exist in the Netbeans native packaging as well. 这也应该存在于Netbeans本机包装中。 It seems to me that the sources tab might have the same effect.
在我看来,“源”选项卡可能具有相同的效果。
Or you can try this approach , but this still requires work outside netbeans. 或者您可以尝试这种方法 ,但这仍然需要netbeans之外的工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.