Skip to content
This repository has been archived by the owner on Jul 26, 2024. It is now read-only.

Commit

Permalink
彻底修复版本检查问题
Browse files Browse the repository at this point in the history
  • Loading branch information
KasumiNova committed Oct 13, 2022
1 parent eac99b2 commit 56d2226
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
}

group 'github.kasuminova'
version '1.3.1-STABLE'
version '1.3.2-STABLE'

repositories {
maven {
Expand Down
6 changes: 3 additions & 3 deletions exe4j_configuration.exe4j
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<exe4j version="8.0.1" transformSequenceNumber="3">
<directoryPresets config="C:/Users/Kasumi_Nova/IdeaProjects/BalloonServer" />
<application name="BalloonServer-GUI-LIB-1.3.1-STABLE" distributionSourceDir="C:/Users/Kasumi_Nova/IdeaProjects/BalloonServer/build/libs" />
<executable name="BalloonServer-1.3.1-STABLE" wrapperType="embed" iconSet="true" iconFile="C:/Users/Kasumi_Nova/IdeaProjects/BalloonServer/src/main/resources/image/icon_16x16.ico" executableDir="." redirectStderr="false" stderrFile="balloonserver.log" stdoutFile="balloonserver.log" executableMode="gui" singleInstance="true" />
<application name="BalloonServer-GUI-LIB-1.3.2-STABLE" distributionSourceDir="C:/Users/Kasumi_Nova/IdeaProjects/BalloonServer/build/libs" />
<executable name="BalloonServer-1.3.2-STABLE" wrapperType="embed" iconSet="true" iconFile="C:/Users/Kasumi_Nova/IdeaProjects/BalloonServer/src/main/resources/image/icon_16x16.ico" executableDir="." redirectStderr="false" stderrFile="balloonserver.log" stdoutFile="balloonserver.log" executableMode="gui" singleInstance="true" />
<java mainClass="github.kasuminova.balloonserver.BalloonServer" vmParameters="-Xms512m -XX:+UseStringDeduplication -XX:+UseFastAccessorMethods -XX:+UseG1GC" preferredVM="server" minVersion="17" allowBetaVM="true">
<searchSequence>
<directory location="./java17-jre" />
<registry />
</searchSequence>
<classPath>
<archive location="C:/Users/Kasumi_Nova/IdeaProjects/BalloonServer/build/libs/BalloonServer-GUI-1.3.1-STABLE.jar" />
<archive location="C:/Users/Kasumi_Nova/IdeaProjects/BalloonServer/build/libs/BalloonServer-GUI-1.3.2-STABLE.jar" />
</classPath>
</java>
</exe4j>
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public final class BalloonServer {
//设置全局主题,字体等
SetupSwing.init();
}
public static final ApplicationVersion VERSION = new ApplicationVersion("1.3.1-STABLE");
public static final ApplicationVersion VERSION = new ApplicationVersion("1.3.2-STABLE");
public static final String TITLE = "BalloonServer " + VERSION;
/*
可执行文件名称。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,8 @@ public int getBigVersion() {
public String toString() {
return String.format("%s.%s.%s-%s", bigVersion, subVersion, minorVersion, branch);
}

public int toInt() {
return (bigVersion * 100000) + (subVersion * 1000) + minorVersion;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,15 @@ public static void checkUpdates() {
if (!applicationVersion.getBranch().equals(newVersion.getBranch())) continue;

//版本更新检查
if (applicationVersion.getBigVersion() >= newVersion.getBigVersion()) {
if (applicationVersion.getSubVersion() >= newVersion.getSubVersion()) {
if (applicationVersion.getMinorVersion() >= newVersion.getMinorVersion()) {
continue;
}
}
}
if (applicationVersion.toInt() >= newVersion.toInt()) continue;

if (CONFIG.isAutoUpdate() && ARCHIVE_NAME.contains("e4j") && ARCHIVE_NAME.contains("Temp"))
{
startAutoUpdate(latestRelease);
return;
}
showUpdateConfirmDialog(latestRelease);
return;
}
}

Expand Down

0 comments on commit 56d2226

Please sign in to comment.