!61 feat: #I7X2YR 使用gluonfx打包
Merge pull request !61 from songdragon/feature-I7X2YR
This commit is contained in:
commit
e418d8b239
20
pom.xml
20
pom.xml
@ -9,9 +9,11 @@
|
|||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
<name>JNotepad</name>
|
<name>JNotepad</name>
|
||||||
|
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<junit.version>5.9.2</junit.version>
|
<junit.version>5.9.2</junit.version>
|
||||||
|
<javafx.version>17.0.1</javafx.version>
|
||||||
</properties>
|
</properties>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -22,7 +24,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.openjfx</groupId>
|
<groupId>org.openjfx</groupId>
|
||||||
<artifactId>javafx-fxml</artifactId>
|
<artifactId>javafx-fxml</artifactId>
|
||||||
<version>17.0.1</version>
|
<version>${javafx.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.junit.jupiter</groupId>
|
<groupId>org.junit.jupiter</groupId>
|
||||||
@ -95,6 +97,22 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>com.gluonhq</groupId>
|
||||||
|
<artifactId>gluonfx-maven-plugin</artifactId>
|
||||||
|
<version>1.0.19</version>
|
||||||
|
<configuration>
|
||||||
|
<mainClass>org.jcnc.jnotepad/org.jcnc.jnotepad.LunchApp</mainClass>
|
||||||
|
<reflectionList>
|
||||||
|
org.jcnc.jnotepad.app.config.AppConfig,org.jcnc.jnotepad.app.config.AppConfig$ShortcutKey
|
||||||
|
</reflectionList>
|
||||||
|
<bundlesList>
|
||||||
|
i18n/i18n
|
||||||
|
</bundlesList>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
3
tool/build.bat
Normal file
3
tool/build.bat
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
cd ..
|
||||||
|
mvn clean gluonfx:build
|
||||||
|
cd tool
|
||||||
3
tool/build.sh
Normal file
3
tool/build.sh
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
mvn clean javafx:jlink gluonfx:build
|
||||||
|
|
||||||
BIN
tool/images/env.png
Normal file
BIN
tool/images/env.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
BIN
tool/images/path.png
Normal file
BIN
tool/images/path.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
30
tool/package.md
Normal file
30
tool/package.md
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
# 打包
|
||||||
|
## 准备
|
||||||
|
1. 下载maven 3.8.8, [Download](https://dlcdn.apache.org/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.zip)
|
||||||
|
2. 下载GraalVM。在[GraalVM下载页](https://www.graalvm.org/downloads/#)选择Java17,操作系统后,点击Download下载。
|
||||||
|
|
||||||
|
# Windows下基于GraalVM的打包
|
||||||
|
## 配置maven和GraalVM
|
||||||
|
1. 将下载的压缩包解压到目录,例如:d:\tools\maven,D:\tools\graalvm-17\graalvm-jdk-17.0.8+9.1
|
||||||
|
2. 配置环境变量
|
||||||
|
```
|
||||||
|
GRAALVM_HOME=D:\tools\graalvm-17\graalvm-jdk-17.0.8+9.1
|
||||||
|
M2_HOME=d:\tools\maven
|
||||||
|
```
|
||||||
|

|
||||||
|
3. 配置PATH环境变量
|
||||||
|

|
||||||
|
4. 安装visual studio build tools
|
||||||
|
安装说明:https://www.graalvm.org/latest/docs/getting-started/windows/
|
||||||
|
a) 下载安装程序:https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16
|
||||||
|
b) 参考网页中的安装步骤
|
||||||
|
5. 验证安装成功
|
||||||
|
使用下面命令启动编译环境
|
||||||
|
```
|
||||||
|
cmd.exe /k F:\vs\ide\VC\Auxiliary\Build\vcvars64.bat
|
||||||
|
```
|
||||||
|
需要把F:\vs\ide替换为本地的visual stuido安装路径。
|
||||||
|
6. 进入项目tool目录,执行build.bat进行打包,生成可执行文件。
|
||||||
|
```
|
||||||
|
build.bat
|
||||||
|
```
|
||||||
Loading…
x
Reference in New Issue
Block a user