Skip to content

Commit 9d35bae

Browse files
committed
1.修改打包脚本
1 parent 48423c9 commit 9d35bae

4 files changed

Lines changed: 55 additions & 86 deletions

File tree

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@
44

55
**腾讯云开发平台地址:**[xJavaFxTool](https://dev.tencent.com/u/xwintop/p/xJavaFxTool)
66

7-
![](https://img.shields.io/:license-apache-blue.svg) ![](https://img.shields.io/badge/JDK-1.8+-green.svg) ![](https://gitee.com/xwintop/xJavaFxTool/badge/star.svg?theme=dark) ![](https://img.shields.io/github/stars/864381832/xJavaFxTool.svg?style=social)
7+
[![](https://img.shields.io/:license-apache-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)
8+
[![](https://img.shields.io/badge/JDK-17+-green.svg)](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
9+
[![](https://img.shields.io/badge/maven-v3.6.3-blue)](https://maven.apache.org)
10+
[![](https://gitee.com/xwintop/xJavaFxTool/badge/star.svg?theme=dark)](https://gitee.com/xwintop/xJavaFxTool/stargazers)
11+
[![](https://img.shields.io/github/stars/864381832/xJavaFxTool.svg?style=social)](https://github.com/864381832/xJavaFxTool)
812
[![](https://img.shields.io/badge/IntelliJ%20IDEA-提供支持-blue.svg)](https://www.jetbrains.com/?from=xJavaFxTool)
13+
![系统](https://img.shields.io/badge/系统-win%20%7C%20mac%20%7C%20linux-007EC6)
914

1015
[英文说明/English Documentation](README_EN.md)
1116

@@ -18,7 +23,7 @@ xJavaFxTool是使用javaFx开发的实用小工具集,利用业余时间把工
1823
由于SpringBoot的火热,项目已经出SpringBoot-javafx版本,[xJavaFxTool-spring](https://gitee.com/xwintop/xJavaFxTool-spring) 欢迎参考,谢谢。
1924

2025
#### 下载试用地址:
21-
- 可直接运行的jar包(本地需要有jdk11环境)[xJavaFxTool-0.2.3-jdk11.jar](https://xwintop.gitee.io/maven/package/xJavaFxTool/xJavaFxTool-0.2.3-jdk11.jar)
26+
- 可直接运行的jar包(本地需要有jdk17环境)[xJavaFxTool-0.2.3-jdk11.jar](https://xwintop.gitee.io/maven/package/xJavaFxTool/xJavaFxTool-0.2.3-jdk11.jar)
2227
- Windows x86安装包(兼容xp、windows7、8、10等系统)(请在下面网盘中下载)
2328
- Windows x64安装包(兼容xp、windows7、8、10等系统)[xJavaFxTool-0.2.3-windows-x64.exe](https://xwintop.gitee.io/maven/package/xJavaFxTool/xJavaFxTool-0.2.3-windows-x64.exe)
2429
- Linux x64 (请在下面网盘中下载)
@@ -35,12 +40,11 @@ xJavaFxTool是使用javaFx开发的实用小工具集,利用业余时间把工
3540
- [相关小游戏](https://gitee.com/xwintop/xJavaFxTool-Games)
3641

3742
#### 环境搭建说明:
38-
- 开发环境为jdk11,基于maven构建
39-
- 使用eclipase或Intellij Idea开发,推荐使用[Intellij Idea](https://www.jetbrains.com/idea/)
43+
- 开发环境为jdk17,基于maven3.6.3构建
44+
- 使用eclipase或Intellij Idea开发,推荐使用[Intellij Idea](https://www.jetbrains.com/idea/?from=xJavaFxTool)
4045
- 本项目使用了[lombok](https://projectlombok.org/),在查看本项目时如果您没有下载lombok 插件,请先安装,不然找不到get/set等方法
4146
- 依赖的[xcore包](https://gitee.com/xwintop/xcore)已上传至git托管的maven平台,git托管maven可参考教程(若无法下载请拉取项目自行编译)。[教程地址:点击进入](http://blog.csdn.net/u011747754/article/details/78574026)
42-
- 使用[javafx-maven-plugin](https://github.com/javafx-maven-plugin/javafx-maven-plugin)插件进行打包操作(可打包windows、Linux、Mac安装包)
43-
- 使用[exe4j](https://www.ej-technologies.com/download/exe4j/files)将jar包转成exe执行文件(仅供参考,可使用其它程序打包)
47+
- 使用[javapackager](https://github.com/fvarrui/JavaPackager)插件进行打包操作(可打包windows、Linux、Mac安装包)
4448
- 使用[InnoSetup](http://www.jrsoftware.org/)可进行制作windows安装包
4549
- jdk11启动需添加参数java --add-opens java.base/jdk.internal.loader=ALL-UNNAMED --add-opens jdk.zipfs/jdk.nio.zipfs=ALL-UNNAMED -jar xJavaFxTool.jar [参考](https://blog.csdn.net/fighting_boss/article/details/91043555)
4650

README_EN.md

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,12 @@
44

55
**Tencent Cloud Development Platform Address:**[xJavaFxTool](https://dev.tencent.com/u/xwintop/p/xJavaFxTool)
66

7-
<p align="center">
8-
<a target="_blank" href="https://www.apache.org/licenses/LICENSE-2.0.html">
9-
<img src="https://img.shields.io/:license-apache-blue.svg" ></img>
10-
</a>
11-
<a target="_blank" href="https://www.oracle.com/technetwork/java/javase/downloads/index.html">
12-
<img src="https://img.shields.io/badge/JDK-1.8+-green.svg" ></img>
13-
</a>
14-
<a target="_blank" href="https://gitee.com/xwintop/xJavaFxTool/stargazers">
15-
<img src='https://gitee.com/xwintop/xJavaFxTool/badge/star.svg?theme=dark' alt='gitee star'></img>
16-
</a>
17-
<a target="_blank" href='https://github.com/864381832/xJavaFxTool'>
18-
<img src="https://img.shields.io/github/stars/864381832/xJavaFxTool.svg?style=social" alt="github star"></img>
19-
</a>
20-
</p>
7+
[![](https://img.shields.io/:license-apache-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)
8+
[![](https://img.shields.io/badge/JDK-17+-green.svg)](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
9+
[![](https://img.shields.io/badge/maven-v3.6.3-blue)](https://maven.apache.org)
10+
[![](https://gitee.com/xwintop/xJavaFxTool/badge/star.svg?theme=dark)](https://gitee.com/xwintop/xJavaFxTool/stargazers)
11+
[![](https://img.shields.io/github/stars/864381832/xJavaFxTool.svg?style=social)](https://github.com/864381832/xJavaFxTool)
12+
[![](https://img.shields.io/badge/IntelliJ%20IDEA-提供支持-blue.svg)](https://www.jetbrains.com/?from=xJavaFxTool)
2113

2214
[中文说明/Chinese Documentation](README.md)
2315

@@ -40,7 +32,7 @@ Due to the hot SpringBoot, the project has been released SpringBoot-javafx versi
4032
the plug-in jar package can be automatically loaded under the root directory libs (see the open source project [xJavaFxTool-plugin](https://gitee.com/xwintop/xJavaFxTool-plugin) for plug-in development examples , and the next step is to split the gadget into each plug-in and load it as needed. Currently, the plug-in function is not perfect, follow-up Split each function into modules and load them as needed to reduce the size of the jar package);
4133

4234
#### Environmental construction instructions:
43-
- The development environment is jdk1.8, based on maven build
35+
- The development environment is jdk17, based on maven3.6.3 build
4436
- Developed with eclipase or Intellij Idea (Recommended to use [Intellij Idea](https://www.jetbrains.com/idea/) )
4537
- This project uses [lombok](https://projectlombok.org/) . If you have not downloaded the lombok plugin when viewing this project, please install it first, otherwise you can't find the get/set method.
4638
- The dependent [xcore](https://gitee.com/xwintop/xcore) package has been uploaded to the git-hosted maven platform. The git hosting maven can refer to the tutorial (if you can't download it, please pull the project to compile it yourself ). Tutorial address: Click to enter

pom.xml

Lines changed: 35 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44

55
<groupId>com.xwintop</groupId>
66
<artifactId>xJavaFxTool</artifactId>
7-
<version>0.2.3-jdk17</version>
7+
<version>0.3.1</version>
88
<packaging>jar</packaging>
99
<name>xJavaFxTool</name>
1010
<description>基于JavaFx搭建的实用小工具集合</description>
11+
<organization>
12+
<name>xwintop</name>
13+
<url>https://gitee.com/xwintop</url>
14+
</organization>
1115
<url>https://gitee.com/xwintop/xJavaFxTool</url>
1216

1317
<properties>
@@ -85,34 +89,14 @@
8589
</execution>
8690
</executions>
8791
</plugin>
88-
<plugin>
89-
<groupId>org.openjfx</groupId>
90-
<artifactId>javafx-maven-plugin</artifactId>
91-
<version>0.0.8</version>
92-
<configuration>
93-
<mainClass>com.xwintop.xJavaFxTool.XJavaFxToolMain</mainClass>
94-
</configuration>
95-
</plugin>
96-
<!-- <plugin>-->
97-
<!-- <groupId>org.panteleyev</groupId>-->
98-
<!-- <artifactId>jpackage-maven-plugin</artifactId>-->
99-
<!-- <version>1.4.0</version>-->
100-
<!-- <configuration>-->
101-
<!-- <name>xJavaFxTool</name>-->
102-
<!-- <appVersion>1.0.0</appVersion>-->
103-
<!-- <vendor>com.xwintop</vendor>-->
104-
<!-- <destination>target/dist</destination>-->
105-
<!-- <module>xJavaFxTool/com.xwintop.xJavaFxTool.XJavaFxToolMain</module>-->
106-
<!-- <runtimeImage>target</runtimeImage>-->
107-
<!-- <linuxShortcut>true</linuxShortcut>-->
108-
<!-- <linuxPackageName>xJavaFxTool</linuxPackageName>-->
109-
<!-- <linuxAppCategory>xwintop</linuxAppCategory>-->
110-
<!-- <linuxMenuGroup>xwintop</linuxMenuGroup>-->
111-
<!-- <javaOptions>-->
112-
<!-- <option>-Dfile.encoding=UTF-8</option>-->
113-
<!-- </javaOptions>-->
114-
<!-- </configuration>-->
115-
<!-- </plugin>-->
92+
<!-- <plugin>-->
93+
<!-- <groupId>org.openjfx</groupId>-->
94+
<!-- <artifactId>javafx-maven-plugin</artifactId>-->
95+
<!-- <version>0.0.8</version>-->
96+
<!-- <configuration>-->
97+
<!-- <mainClass>com.xwintop.xJavaFxTool.XJavaFxToolMain</mainClass>-->
98+
<!-- </configuration>-->
99+
<!-- </plugin>-->
116100
<plugin>
117101
<groupId>io.github.fvarrui</groupId>
118102
<artifactId>javapackager</artifactId>
@@ -121,37 +105,29 @@
121105
<bundleJre>true</bundleJre>
122106
<mainClass>com.xwintop.xJavaFxTool.XJavaFxToolMain</mainClass>
123107
<generateInstaller>true</generateInstaller>
108+
<platform>auto</platform>
109+
<createZipball>true</createZipball>
110+
<administratorRequired>true</administratorRequired>
111+
<winConfig>
112+
<!-- general properties -->
113+
<generateSetup>true</generateSetup>
114+
<generateMsi>false</generateMsi>
115+
<!-- setup generation properties -->
116+
<setupMode>installForAllUsers</setupMode>
117+
<createDesktopIconTask>true</createDesktopIconTask>
118+
<disableDirPage>false</disableDirPage>
119+
<disableFinishedPage>false</disableFinishedPage>
120+
<disableRunAfterInstall>false</disableRunAfterInstall>
121+
<disableWelcomePage>false</disableWelcomePage>
122+
<createDesktopIconTask>false</createDesktopIconTask>
123+
<setupLanguages>
124+
<chinesesimp>compiler:Default.isl</chinesesimp>
125+
<english>compiler:Languages\English.isl</english>
126+
</setupLanguages>
127+
</winConfig>
124128
<!-- 这行不能被格式化为多行,否则会出错-->
125-
<vmArgs>--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</vmArgs>
129+
<!-- <vmArgs>&#45;&#45;add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED &#45;&#45;add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED &#45;&#45;add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED &#45;&#45;add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED &#45;&#45;add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</vmArgs>-->
126130
</configuration>
127-
<executions>
128-
<execution>
129-
<id>bundling-for-windows</id>
130-
<phase>package</phase>
131-
<goals>
132-
<goal>package</goal>
133-
</goals>
134-
<configuration>
135-
<platform>windows</platform>
136-
<createZipball>true</createZipball>
137-
<administratorRequired>true</administratorRequired>
138-
<winConfig>
139-
<!-- general properties -->
140-
<generateSetup>true</generateSetup>
141-
<generateMsi>true</generateMsi>
142-
<generateMsm>true</generateMsm>
143-
<!-- setup generation properties -->
144-
<setupMode>installForAllUsers</setupMode>
145-
<createDesktopIconTask>true</createDesktopIconTask>
146-
<disableDirPage>false</disableDirPage>
147-
<disableFinishedPage>false</disableFinishedPage>
148-
<setupLanguages>
149-
<english>compiler:Default.isl</english>
150-
</setupLanguages>
151-
</winConfig>
152-
</configuration>
153-
</execution>
154-
</executions>
155131
</plugin>
156132
</plugins>
157133
</build>

src/main/java/com/xwintop/xJavaFxTool/XJavaFxToolApplication.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.xwintop.xJavaFxTool;
22

3-
import cn.hutool.system.SystemUtil;
43
import com.xwintop.xJavaFxTool.controller.IndexController;
54
import com.xwintop.xJavaFxTool.utils.Config;
65
import com.xwintop.xJavaFxTool.utils.Config.Keys;
@@ -17,8 +16,6 @@
1716
import javafx.stage.Stage;
1817
import lombok.extern.slf4j.Slf4j;
1918

20-
import javax.imageio.ImageIO;
21-
import java.awt.*;
2219
import java.io.IOException;
2320
import java.util.ResourceBundle;
2421

@@ -42,10 +39,10 @@ public void start(Stage primaryStage) throws Exception {
4239
FxApp.init(primaryStage, LOGO_PATH);
4340
FxApp.styleSheets.add(XJavaFxToolApplication.class.getResource("/css/jfoenix-main.css").toExternalForm());
4441

45-
if (SystemUtil.getOsInfo().isMac()) {
42+
// if (SystemUtil.getOsInfo().isMac()) {
4643
//Mac下设置dock栏图标
47-
Taskbar.getTaskbar().setIconImage(ImageIO.read(XJavaFxToolApplication.class.getResourceAsStream(LOGO_PATH)));
48-
}
44+
// Taskbar.getTaskbar().setIconImage(ImageIO.read(XJavaFxToolApplication.class.getResourceAsStream(LOGO_PATH)));
45+
// }
4946

5047
primaryStage.setResizable(true);
5148
primaryStage.setTitle(RESOURCE_BUNDLE.getString("Title") + Config.xJavaFxToolVersions);

0 commit comments

Comments
 (0)