Skip to content

Commit 0045143

Browse files
committed
1.修改版本号为0.3.2;2.添加手动检查版本菜单
1 parent e11e9a0 commit 0045143

10 files changed

Lines changed: 42 additions & 263 deletions

File tree

README_EN.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ xJavaFxTool is a practical gadget set developed by javaFx. It uses some time to
2121
Due to the hot SpringBoot, the project has been released SpringBoot-javafx version, [xJavaFxTool-spring](https://gitee.com/xwintop/xJavaFxTool-spring) welcome reference, thank you.
2222

2323
#### Download trial address:
24-
- Jar package that can be run directly (local need to have jdk1.8 environment)[xJavaFxTool-0.2.3.jar](https://xwintop.gitee.io/maven/package/xJavaFxTool/xJavaFxTool-0.2.3.jar)
25-
- Windows x64 installation package (compatible with xp, windows7, 8, 10, etc.)[xJavaFxTool-0.2.3-windows-x64.exe](https://xwintop.gitee.io/maven/package/xJavaFxTool/xJavaFxTool-0.2.3-windows-x64.exe)
26-
- Mac OS X x64 [xJavaFxTool-0.2.3-macosx-x64.pkg](https://xwintop.gitee.io/maven/package/xJavaFxTool/xJavaFxTool-0.2.3-macosx-x64.pkg)
24+
- Jar package that can be run directly (local need to have jdk1.8 environment)[xJavaFxTool-0.3.1.jar](https://github.com/864381832/xJavaFxTool/releases/download/0.3.1/xJavaFxTool-0.3.1.jar)
25+
- Windows x64 installation package (compatible with xp, windows7, 8, 10, etc.)[xJavaFxTool-0.3.1-windows-x64.exe](https://github.com/864381832/xJavaFxTool/releases/download/0.3.1/xJavaFxTool-0.3.1-windows-x64.exe)
26+
- Mac OS x64 [xJavaFxTool-0.3.1-macos.pkg](https://github.com/864381832/xJavaFxTool/releases/download/0.3.1/xJavaFxTool-0.3.1-macos.pkg)
27+
- Linux x64 [xJavaFxTool-0.3.1-linux-x64.zip](https://github.com/864381832/xJavaFxTool/releases/download/0.3.1/xJavaFxTool-0.3.1-linux-x64.zip)
2728
#### If the above link fails, use the download link below:
2829
- Baidu cloud link: [https://pan.baidu.com/s/193fhGnJL4dDWcqDnFJcHbA](https://pan.baidu.com/s/193fhGnJL4dDWcqDnFJcHbA) extraction code: mokl
2930
- Tencent micro cloud link: [https://share.weiyun.com/5T6FPLW](https://share.weiyun.com/5T6FPLW) extraction code: java
@@ -36,8 +37,7 @@ the plug-in jar package can be automatically loaded under the root directory lib
3637
- Developed with eclipase or Intellij Idea (Recommended to use [Intellij Idea](https://www.jetbrains.com/idea/) )
3738
- 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.
3839
- 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
39-
- Package using the [javafx-maven-plugin](https://github.com/javafx-maven-plugin/javafx-maven-plugin) (can be packaged for windows, Linux, Mac installation packages)
40-
- Use [exe4j](https://www.ej-technologies.com/download/exe4j/files) to convert the jar package into an exe executable file (for reference only, you can use other programs to package)
40+
- Package using the [javapackager](https://github.com/fvarrui/JavaPackager) (can be packaged for windows, Linux, Mac installation packages)
4141
- Use [InnoSetup](http://www.jrsoftware.org/) to make windows installation packages
4242

4343
#### The currently integrated gadgets are:

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.xwintop</groupId>
66
<artifactId>xJavaFxTool</artifactId>
7-
<version>0.3.1</version>
7+
<version>0.3.2</version>
88
<packaging>jar</packaging>
99
<name>xJavaFxTool</name>
1010
<description>基于JavaFx搭建的实用小工具集合</description>

src/main/java/com/xwintop/xJavaFxTool/controller/IndexController.java

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@
1212
import com.xwintop.xJavaFxTool.services.IndexService;
1313
import com.xwintop.xJavaFxTool.services.index.SystemSettingService;
1414
import com.xwintop.xJavaFxTool.utils.Config;
15+
import com.xwintop.xJavaFxTool.utils.VersionChecker;
1516
import com.xwintop.xJavaFxTool.view.IndexView;
1617
import com.xwintop.xcore.javafx.FxApp;
18+
import com.xwintop.xcore.javafx.dialog.FxAlerts;
1719
import com.xwintop.xcore.javafx.dialog.FxDialog;
1820
import com.xwintop.xcore.util.ConfigureUtil;
1921
import com.xwintop.xcore.util.HttpClientUtil;
@@ -164,24 +166,24 @@ private void addCategory(PluginCategoryController category) {
164166
}
165167

166168
private void addMenu(PluginJarInfo jarInfo) {
167-
MenuItem menu = moreToolsMenu.getItems().stream().filter(menuItem1 -> jarInfo.getMenuParentId().equals(menuItem1.getId())).findAny().orElse(null);
168-
if (menu == null) {
169-
menu = new Menu(XJavaFxToolApplication.RESOURCE_BUNDLE.getString(jarInfo.getMenuParentTitle()));
170-
menu.setId(jarInfo.getMenuParentId());
171-
moreToolsMenu.getItems().add(menu);
172-
}
173-
MenuItem menuItem = new MenuItem(jarInfo.getTitle());
174-
if (StringUtils.isNotEmpty(jarInfo.getIconPath())) {
175-
ImageView imageView = new ImageView(new Image(jarInfo.getIconPath()));
176-
imageView.setFitHeight(18);
177-
imageView.setFitWidth(18);
178-
menuItem.setGraphic(imageView);
179-
}
180-
menuItem.setOnAction((ActionEvent event) -> {
181-
indexService.loadPlugin(jarInfo);
182-
});
183-
((Menu)menu).getItems().add(menuItem);
184-
menuItemMap.put(menuItem.getText(), menuItem);
169+
MenuItem menu = moreToolsMenu.getItems().stream().filter(menuItem1 -> jarInfo.getMenuParentId().equals(menuItem1.getId())).findAny().orElse(null);
170+
if (menu == null) {
171+
menu = new Menu(XJavaFxToolApplication.RESOURCE_BUNDLE.getString(jarInfo.getMenuParentTitle()));
172+
menu.setId(jarInfo.getMenuParentId());
173+
moreToolsMenu.getItems().add(menu);
174+
}
175+
MenuItem menuItem = new MenuItem(jarInfo.getTitle());
176+
if (StringUtils.isNotEmpty(jarInfo.getIconPath())) {
177+
ImageView imageView = new ImageView(new Image(jarInfo.getIconPath()));
178+
imageView.setFitHeight(18);
179+
imageView.setFitWidth(18);
180+
menuItem.setGraphic(imageView);
181+
}
182+
menuItem.setOnAction((ActionEvent event) -> {
183+
indexService.loadPlugin(jarInfo);
184+
});
185+
((Menu) menu).getItems().add(menuItem);
186+
menuItemMap.put(menuItem.getText(), menuItem);
185187
}
186188

187189
public void selectAction(String selectText) {
@@ -239,6 +241,13 @@ private void SettingAction() {
239241
SystemSettingService.openSystemSettings(bundle.getString("Setting"));
240242
}
241243

244+
@FXML
245+
private void checkerVersionAction() {
246+
if (!VersionChecker.checkNewVersion()) {
247+
FxAlerts.info("提示", "已经是新版本");
248+
}
249+
}
250+
242251
@FXML
243252
private void aboutAction() {
244253
AlertUtil.showInfoAlert(bundle.getString("aboutText") + Config.xJavaFxToolVersions);

src/main/java/com/xwintop/xJavaFxTool/newui/NewLauncherController.java

Lines changed: 0 additions & 188 deletions
This file was deleted.

src/main/java/com/xwintop/xJavaFxTool/utils/Config.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class Config {
1616

1717
public static Locale defaultLocale = Locale.getDefault();// 设置系统语言
1818

19-
public static final String xJavaFxToolVersions = "V0.3.1";// xJavaFxTool版本信息
19+
public static final String xJavaFxToolVersions = "V0.3.2";// xJavaFxTool版本信息
2020

2121
///////////////////////////////////////////////////////////////
2222

src/main/java/com/xwintop/xJavaFxTool/utils/VersionChecker.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616

1717
@Slf4j
1818
public class VersionChecker {
19-
public static void checkNewVersion() {
19+
public static boolean checkNewVersion() {
2020
try {
21-
String json = HttpUtil.get("https://gitee.com/api/v5/repos/xwintop/xJavaFxTool/releases/latest?access_token=d0486279db39a5996eca48c620abeee1");
21+
String json = HttpUtil.get("https://gitee.com/api/v5/repos/xwintop/xJavaFxTool/releases/latest");
2222
log.info("检查新版本:" + json);
2323
JSONObject node = JSON.parseObject(json);
2424
final String latestVersion = node.getString("tag_name");
@@ -31,10 +31,13 @@ public static void checkNewVersion() {
3131
if (FxAlerts.confirmOkCancel("发现新版本 " + latestVersion, content)) {
3232
HttpClientUtil.openBrowseURLThrowsException("https://gitee.com/xwintop/xJavaFxTool/releases");
3333
}
34+
} else {
35+
return false;
3436
}
3537
} catch (Exception e) {
3638
log.error("检查新版本失败!", e);
3739
}
40+
return true;
3841
}
3942

4043
private static Boolean isLargerThanCurrent(String remoteVersion) {

src/main/resources/com/xwintop/xJavaFxTool/fxmlView/Index.fxml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
<MenuItem mnemonicParsing="false" onAction="#userSupportAction"
5858
text="%userSupport"/>
5959
<MenuItem mnemonicParsing="false" onAction="#SettingAction" text="%Setting"/>
60+
<MenuItem mnemonicParsing="false" onAction="#checkerVersionAction" text="%checkerVersion"/>
6061
<MenuItem mnemonicParsing="false" onAction="#aboutAction" text="%About"/>
6162
</Menu>
6263
</MenuBar>

src/main/resources/com/xwintop/xJavaFxTool/fxmlView/newui/main.fxml

Lines changed: 0 additions & 48 deletions
This file was deleted.

src/main/resources/locale/Menu.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ openLogFolder = \u6253\u5F00\u65E5\u5FD7\u76EE\u5F55
2121
openConfigFolder = \u6253\u5F00\u914D\u7F6E\u76EE\u5F55
2222
openPluginFolder = \u6253\u5F00\u63D2\u4EF6\u76EE\u5F55
2323
userSupport = \u7528\u6237\u8BBA\u575B
24+
checkerVersion = \u68C0\u67E5\u7248\u672C
2425

2526
aboutText = \u6B22\u8FCE\u4F7F\u7528JavaFx\u5DE5\u5177\u96C6\u5408\u3002\ngit\u5730\u5740\uFF1Ahttps://gitee.com/xwintop/xJavaFxTool\n\u4F5C\u8005\uFF1A\u8FFD\u98CE\n\u535A\u5BA2\uFF1Awww.xwintop.com\n\u6B22\u8FCE\u524D\u6765\u63D0\u51FA\u610F\u89C1\uFF0C\u4E00\u8D77\u5B8C\u5584\u8BE5\u5DE5\u5177\uFF0C\u8C22\u8C22\uFF01\uFF01\n\u5F53\u524D\u7248\u672C\uFF1A
2627
SetLanguageText = \u8BED\u8A00\u9009\u62E9\u8BBE\u7F6E\u6210\u529F\uFF0C\u91CD\u542F\u540E\u751F\u6548\u3002

src/main/resources/locale/Menu_en_US.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ openLogFolder = open Log Folder
2121
openConfigFolder = open Config Folder
2222
openPluginFolder = open Plugin Folder
2323
userSupport = user Support
24+
checkerVersion = CheckerVersion
2425

2526
aboutText = Welcome to the JavaFx tool set.\ngitUrl:https://gitee.com/xwintop/xJavaFxTool\nAuthor:xwintop\nblog:www.xwintop.com\nWelcome to make comments and improve the tool together. Thank you!!\ncurrent version:
2627
SetLanguageText = The language selection settings have been successful and will take effect after reboot.

0 commit comments

Comments
 (0)