简体   繁体   English

如何在Netbeans本机包装中为Java SE应用程序添加其他文件/文件夹

[英]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.

相关问题 Netbeans Java(JavaFX)本机打包以及其他文件和文件夹 - Netbeans Java (JavaFX) Native Packaging with additional files and folders 将带有焊接的 Java SE 应用程序打包到可执行 Jar 中 - Packaging Java SE application with weld into executable Jar 在Netbeans8中部署Java SE应用程序 - deploying a java SE application in Netbeans8 Java SE应用程序中是否有图片框(使用netbeans) - is there picturebox in java SE application(using netbeans) 在netbeans中使用Java DB打包和部署Java应用程序 - packaging and deploying a java application with java DB in netbeans 如何在java netbeans中添加本机库.so文件 - How to add native library .so file in java netbeans NetBeans中的Java本机打包:如何设置.exe程序的初始屏幕和ico映像? - Java native packaging in NetBeans: How can I set the splash screen and ico image of .exe program? 如何将本机库文件夹添加到Netbeans中的现有项目 - How to add native library folder to existing project in Netbeans 如何在netbeans中的Java应用程序项目的“ / dist”文件夹中导入.JAR文件以进行蚀 - how to import a .JAR file in the “/dist” folder of a Java Application project in netbeans to eclipse 在NetBeans中使用可更新的derby数据库将Java应用程序打包为exe安装程序 - Packaging a java application as exe installer with an updatable derby database in netbeans
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM