diff --git a/build.gradle b/build.gradle index c59a0808..cfbb6f23 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ plugins { } group = 'org.cubewhy.celestial' -version = '1.2-pre3-SNAPSHOT' +version = '1.2-pre4-SNAPSHOT' println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch')) println('Celestial Launcher -> https://www.lunarclient.top/') diff --git a/src/main/java/org/cubewhy/celestial/Celestial.java b/src/main/java/org/cubewhy/celestial/Celestial.java index ae98e437..36e71e91 100644 --- a/src/main/java/org/cubewhy/celestial/Celestial.java +++ b/src/main/java/org/cubewhy/celestial/Celestial.java @@ -189,12 +189,9 @@ private static void checkJava() throws IOException { JOptionPane.showMessageDialog(null, f.getString("compatibility.warn.message"), f.getString("compatibility.warn.title"), JOptionPane.WARNING_MESSAGE); } - // detect the official launcher (Windows only) - if (OSEnum.getCurrent().equals(OSEnum.Windows)) { - if (sessionFile.exists() && LunarUtils.isReallyOfficial(sessionFile)) { - log.warn("Detected the official launcher"); - JOptionPane.showMessageDialog(null, f.getString("warn.official-launcher.message"), f.getString("warn.official-launcher.title"), JOptionPane.WARNING_MESSAGE); - } + if (sessionFile.exists() && LunarUtils.isReallyOfficial(sessionFile)) { + log.warn("Detected the official launcher"); + JOptionPane.showMessageDialog(null, f.getString("warn.official-launcher.message"), f.getString("warn.official-launcher.title"), JOptionPane.WARNING_MESSAGE); } } @@ -447,7 +444,8 @@ public static File launch(String version, String branch, String module) throws I // Microsoft Windows // NEW: Use CRLF (Windows 7) writer.write("@echo off\r\n"); - writer.write("@rem Generated by LunarCN (Celestial Launcher)\nrem Website: https://www.lunarclient.top/\r\n"); + writer.write("@rem Generated by LunarCN (Celestial Launcher)\r\n@rem Website: https://www.lunarclient.top/\r\n"); + writer.write(String.format("@rem Version %s\r\n", GitUtils.getBuildVersion())); writer.write("@rem Please donate to support us to continue develop https://www.lunarclient.top/donate\r\n"); writer.write("@rem You can run this script to debug your game, or share this script to developers to resolve your launch problem\r\n"); writer.write("chcp 65001\r\n"); // unicode support for Windows which uses Chinese diff --git a/src/main/java/org/cubewhy/celestial/gui/pages/GuiNews.java b/src/main/java/org/cubewhy/celestial/gui/pages/GuiNews.java index 303d21f8..7dcfc131 100644 --- a/src/main/java/org/cubewhy/celestial/gui/pages/GuiNews.java +++ b/src/main/java/org/cubewhy/celestial/gui/pages/GuiNews.java @@ -33,6 +33,7 @@ public GuiNews() throws IOException { private void initGui() { // render blogPosts + this.getVerticalScrollBar().setUnitIncrement(30); log.info("Loading blogPosts (gui)"); if (blogPosts.isJsonNull()) { log.error("Failed to load blog posts");