From: Ben Soares Date: Fri, 16 Aug 2024 11:06:50 +0000 (+0100) Subject: JAL-3631 Fix EnvConfig.getUserAppdir() in getdown when running the getdown-launcher... X-Git-Tag: Release_2_11_4_0~14^2~8^2~9 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=30246584379baffaa0d7467f4362104a7187d074;p=jalview.git JAL-3631 Fix EnvConfig.getUserAppdir() in getdown when running the getdown-launcher.jar update --- diff --git a/getdown/lib/FJVL_VERSION b/getdown/lib/FJVL_VERSION index 3f285ff..3e5faf8 100644 --- a/getdown/lib/FJVL_VERSION +++ b/getdown/lib/FJVL_VERSION @@ -1 +1 @@ -1.8.3-1.5.2_FJVL +1.8.3-1.5.3_FJVL diff --git a/getdown/lib/JVL_VERSION b/getdown/lib/JVL_VERSION index bec905f..32c1fa5 100644 --- a/getdown/lib/JVL_VERSION +++ b/getdown/lib/JVL_VERSION @@ -1 +1 @@ -1.8.3-1.5.2_JVL +1.8.3-1.5.3_JVL diff --git a/getdown/lib/getdown-core.jar b/getdown/lib/getdown-core.jar index c433ea4..62d0343 100644 Binary files a/getdown/lib/getdown-core.jar and b/getdown/lib/getdown-core.jar differ diff --git a/getdown/lib/getdown-launcher-local.jar b/getdown/lib/getdown-launcher-local.jar index 1fe31b9..82102c2 100644 Binary files a/getdown/lib/getdown-launcher-local.jar and b/getdown/lib/getdown-launcher-local.jar differ diff --git a/getdown/lib/getdown-launcher.jar b/getdown/lib/getdown-launcher.jar index 8513bf6..195c369 100644 Binary files a/getdown/lib/getdown-launcher.jar and b/getdown/lib/getdown-launcher.jar differ diff --git a/getdown/src/getdown/ant/pom.xml b/getdown/src/getdown/ant/pom.xml index fbd94c2..ff88d94 100644 --- a/getdown/src/getdown/ant/pom.xml +++ b/getdown/src/getdown/ant/pom.xml @@ -4,7 +4,7 @@ com.threerings.getdown getdown - 1.8.3-1.5.2_FJVL + 1.8.3-1.5.3_FJVL getdown-ant diff --git a/getdown/src/getdown/core/pom.xml b/getdown/src/getdown/core/pom.xml index c1236dd..8a80df5 100644 --- a/getdown/src/getdown/core/pom.xml +++ b/getdown/src/getdown/core/pom.xml @@ -4,7 +4,7 @@ com.threerings.getdown getdown - 1.8.3-1.5.2_FJVL + 1.8.3-1.5.3_FJVL getdown-core diff --git a/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/EnvConfig.java b/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/EnvConfig.java index 596dae6..dbd60cf 100644 --- a/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/EnvConfig.java +++ b/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/EnvConfig.java @@ -77,9 +77,7 @@ public final class EnvConfig { String appIdProv = null; String appBase = null; String appBaseProv = null; - applicationFolder = System.getProperty("installer.application_folder"); - installerAppdir = System.getProperty(APPLICATION_APPDIR_PROPERTY); - appName = System.getProperty("channel.app_name"); + setVarsFromProperties(); // start with bootstrap.properties config, if avaialble try { @@ -450,6 +448,12 @@ public final class EnvConfig { return appName; } + public static void setVarsFromProperties() { + applicationFolder = System.getProperty("installer.application_folder"); + installerAppdir = System.getProperty(APPLICATION_APPDIR_PROPERTY); + appName = System.getProperty("channel.app_name"); + } + private static boolean relaunched = false; private static final String USER_HOME_KEY = "${user.home}"; diff --git a/getdown/src/getdown/core/src/main/java/jalview/bin/GetdownLauncherUpdate.java b/getdown/src/getdown/core/src/main/java/jalview/bin/GetdownLauncherUpdate.java index be7862d..ec1f322 100644 --- a/getdown/src/getdown/core/src/main/java/jalview/bin/GetdownLauncherUpdate.java +++ b/getdown/src/getdown/core/src/main/java/jalview/bin/GetdownLauncherUpdate.java @@ -1,3 +1,23 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors + * + * This file is part of Jalview. + * + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ package jalview.bin; import java.io.File; @@ -9,6 +29,8 @@ public class GetdownLauncherUpdate { public static void main(String[] args) { + EnvConfig.setVarsFromProperties(); + String appdir = args.length > 0 ? args[0] : null; if (appdir == null || appdir.length() == 0) { diff --git a/getdown/src/getdown/core/src/main/java/jalview/util/ErrorLog.java b/getdown/src/getdown/core/src/main/java/jalview/util/ErrorLog.java index 4c9c5ea..651073f 100644 --- a/getdown/src/getdown/core/src/main/java/jalview/util/ErrorLog.java +++ b/getdown/src/getdown/core/src/main/java/jalview/util/ErrorLog.java @@ -1,3 +1,23 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors + * + * This file is part of Jalview. + * + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ package jalview.util; import java.lang.reflect.InvocationTargetException; diff --git a/getdown/src/getdown/core/src/main/java/jalview/util/LaunchUtils.java b/getdown/src/getdown/core/src/main/java/jalview/util/LaunchUtils.java index 186745d..ccf9992 100644 --- a/getdown/src/getdown/core/src/main/java/jalview/util/LaunchUtils.java +++ b/getdown/src/getdown/core/src/main/java/jalview/util/LaunchUtils.java @@ -621,7 +621,7 @@ public class LaunchUtils } String v0 = getJarImplementationVersion(f0); String v1 = getJarImplementationVersion(f1); - syserr(true, false, + syserr(v0 != null && !v0.equals(v1), false, "Got launcher versions '" + v0 + "' and '" + v1 + "'"); return compareGetdownLauncherJarVersions(v0, v1); } diff --git a/getdown/src/getdown/launcher/pom.xml b/getdown/src/getdown/launcher/pom.xml index 43df5b8..9c72413 100644 --- a/getdown/src/getdown/launcher/pom.xml +++ b/getdown/src/getdown/launcher/pom.xml @@ -4,7 +4,7 @@ com.threerings.getdown getdown - 1.8.3-1.5.2_FJVL + 1.8.3-1.5.3_FJVL getdown-launcher diff --git a/getdown/src/getdown/mvn_cmd b/getdown/src/getdown/mvn_cmd index 2e9e31f..cd2a39a 100755 --- a/getdown/src/getdown/mvn_cmd +++ b/getdown/src/getdown/mvn_cmd @@ -3,7 +3,7 @@ if [ x$JVLVERSION != x ]; then export VERSION=$JVLVERSION else - export VERSION=1.8.3-1.5.2_JVL + export VERSION=1.8.3-1.5.3_JVL fi if [ x${VERSION%_JVL} = x$VERSION ]; then diff --git a/getdown/src/getdown/pom.xml b/getdown/src/getdown/pom.xml index 7a05651..6f2cd69 100644 --- a/getdown/src/getdown/pom.xml +++ b/getdown/src/getdown/pom.xml @@ -10,7 +10,7 @@ com.threerings.getdown getdown pom - 1.8.3-1.5.2_FJVL + 1.8.3-1.5.3_FJVL getdown An application installer and updater. diff --git a/j11lib/getdown-core.jar b/j11lib/getdown-core.jar index c433ea4..62d0343 100644 Binary files a/j11lib/getdown-core.jar and b/j11lib/getdown-core.jar differ diff --git a/j8lib/getdown-core.jar b/j8lib/getdown-core.jar index c433ea4..62d0343 100644 Binary files a/j8lib/getdown-core.jar and b/j8lib/getdown-core.jar differ diff --git a/src/jalview/bin/GetdownLauncherUpdate.java b/src/jalview/bin/GetdownLauncherUpdate.java index 18eae7a..ec1f322 100644 --- a/src/jalview/bin/GetdownLauncherUpdate.java +++ b/src/jalview/bin/GetdownLauncherUpdate.java @@ -29,6 +29,8 @@ public class GetdownLauncherUpdate { public static void main(String[] args) { + EnvConfig.setVarsFromProperties(); + String appdir = args.length > 0 ? args[0] : null; if (appdir == null || appdir.length() == 0) { diff --git a/src/jalview/util/LaunchUtils.java b/src/jalview/util/LaunchUtils.java index 186745d..ccf9992 100644 --- a/src/jalview/util/LaunchUtils.java +++ b/src/jalview/util/LaunchUtils.java @@ -621,7 +621,7 @@ public class LaunchUtils } String v0 = getJarImplementationVersion(f0); String v1 = getJarImplementationVersion(f1); - syserr(true, false, + syserr(v0 != null && !v0.equals(v1), false, "Got launcher versions '" + v0 + "' and '" + v1 + "'"); return compareGetdownLauncherJarVersions(v0, v1); }