使用Inno Setup和maven创建原生javafx应用程序 [英] Create a native javafx app with Inno Setup and maven
问题描述
我有一个小的JavaFX应用程序,我使用Maven来管理依赖项,这要归功于 javafx- maven-plugin 。
I've a little JavaFX app and I use Maven for managing the dependencies thanks to the javafx-maven-plugin.
这个插件有一个选项,可以根据设置(mvn jfx:build-native)使用InnoSetup构建本机安装程序(在Windows)
This plugin have an option who will build a native installer based on the settings (mvn jfx:build-native) using InnoSetup (on windows)
这项工作相当不错,但我无法找到所有可以指定所有Inno设置选项的地方(如可见这里)。我必须在我的pom上添加一些东西吗?我必须创建一个.iss文件吗?如果是,如何指定此文件的链接?
That's work pretty well but I can't find where I can specify all the Inno Setup options (like those visible here). Did I have to add something on my pom ? Did I have to create a .iss file ? If yes, how to specify the link to this file ?
任何想法?
推荐答案
在哪里放Inno Setup文件(* .iss)?
Where to put "Inno Setup" file (*.iss)?
使用javafx-maven-plugin,您可以将inno安装文件添加到:
When using javafx-maven-plugin you can add inno setup file into:
src/main/deploy/package/windows/project-name.iss
引用iss中的文件
如果你需要在设置文件中引用一些文件,你的root将会打开:
If you need to reference some files in setup file your root will be on:
target/jfx/native/bundles
例如,打包整个项目使用:
So for example to pack whole project use:
...
[Files]
Source: "project-name\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
...
这将包装所有文件:
target/jfx/native/bundles/project-name/*
添加应用程序图标
对于简单的图标,您只需将其放入:
For simple icon you can just put it in:
src/main/deploy/package/windows/project-name.ico
并且在发布时:
...
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
...
并且不要忘记定义:MyAppExeName和MyAppName 。
And don`t forget to define: MyAppExeName and MyAppName.
这篇关于使用Inno Setup和maven创建原生javafx应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!