From 5923d7ca67a4befa4a8a7423f473587e7fc877a4 Mon Sep 17 00:00:00 2001 From: Thomas Kunze Date: Sat, 30 Sep 2023 17:25:28 +0200 Subject: [PATCH] change development mode detection --- build.gradle | 5 +++-- src/main/java/net/rptools/maptool/client/MapTool.java | 5 +---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index d4ef6de20a..31fd8cdc32 100644 --- a/build.gradle +++ b/build.gradle @@ -138,7 +138,7 @@ sourceSets { run { args = ['-v=' + appSemVer] applicationDefaultJvmArgs = ["-Xss8M", "-Dsun.java2d.d3d=false", "-Dsentry.environment=Development", "-Dfile.encoding=UTF-8", - "-Dpolyglot.engine.WarnInterpreterOnly=false", + "-Dpolyglot.engine.WarnInterpreterOnly=false","-DRUN_FROM_IDE=true", "-DMAPTOOL_DATADIR=.maptool-" + vendor.toLowerCase(), "-XX:+ShowCodeDetailsInExceptionMessages", "--add-opens=java.desktop/java.awt=ALL-UNNAMED", "--add-opens=java.desktop/java.awt.geom=ALL-UNNAMED", "--add-opens=java.desktop/sun.awt.geom=ALL-UNNAMED", "--add-opens=java.base/java.util=ALL-UNNAMED", @@ -217,7 +217,8 @@ runtime { 'jdk.unsupported.desktop', 'jdk.xml.dom', 'jdk.crypto.cryptoki', - 'jdk.crypto.ec' + 'jdk.crypto.ec', + 'jdk.zipfs' ] diff --git a/src/main/java/net/rptools/maptool/client/MapTool.java b/src/main/java/net/rptools/maptool/client/MapTool.java index 92eeeacd50..7948d8edd2 100644 --- a/src/main/java/net/rptools/maptool/client/MapTool.java +++ b/src/main/java/net/rptools/maptool/client/MapTool.java @@ -741,10 +741,7 @@ public static String getVersion() { } public static boolean isDevelopment() { - return "DEVELOPMENT".equals(version) - || "@buildNumber@".equals(version) - || "0.0.1".equals(version) - || (version != null && version.startsWith("SNAPSHOT")); + return System.getProperty("RUN_FROM_IDE") != null; } public static ServerPolicy getServerPolicy() {