From: Ben Soares Date: Fri, 10 May 2024 11:14:27 +0000 (+0100) Subject: JAL-4409 Add jalviewhttp and jalviewhttps schemes to register in install4j. Recognis... X-Git-Tag: Release_2_11_4_0~28^2~41 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=a7572bffcf75ddaac673cd03fb8376b933b47760;p=jalview.git JAL-4409 Add jalviewhttp and jalviewhttps schemes to register in install4j. Recognise all extra schemes in getdown. --- diff --git a/getdown/lib/FJVL_VERSION b/getdown/lib/FJVL_VERSION index 2d83e61..21df89d 100644 --- a/getdown/lib/FJVL_VERSION +++ b/getdown/lib/FJVL_VERSION @@ -1 +1 @@ -1.8.3-1.3.1_FJVL +1.8.3-1.4.0_FJVL diff --git a/getdown/lib/JVL_VERSION b/getdown/lib/JVL_VERSION index 7d618e2..2d02e7a 100644 --- a/getdown/lib/JVL_VERSION +++ b/getdown/lib/JVL_VERSION @@ -1 +1 @@ -1.8.3-1.3.1_JVL +1.8.3-1.4.0_JVL diff --git a/getdown/lib/getdown-core.jar b/getdown/lib/getdown-core.jar index 3fc97b5..bd6924d 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 6ba0a6d..02c4711 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 7c75a34..b8801ac 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 4c91f74..ce84058 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.3.1_FJVL + 1.8.3-1.4.0_FJVL getdown-ant diff --git a/getdown/src/getdown/core/pom.xml b/getdown/src/getdown/core/pom.xml index 2e43522..c926ab2 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.3.1_FJVL + 1.8.3-1.4.0_FJVL getdown-core diff --git a/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/Application.java b/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/Application.java index 435ebbd..cfc8d97 100644 --- a/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/Application.java +++ b/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/Application.java @@ -1124,51 +1124,34 @@ public class Application if (_appargs.size() > 0) { String uri = _appargs.get(0); try { - log.info("TRYING TO PARSE URL '"+uri+"'"); + log.info("Trying to parse uri '"+uri+"'"); URI jalviewUri = new URI(uri); if (jalviewUri != null) { String scheme = jalviewUri.getScheme(); - if (scheme != null && (scheme.equals("jalview") || scheme.equals("jalviews"))) { - boolean https = jalviewUri.getScheme().equals("jalviews"); - String host = jalviewUri.getHost(); - int port = jalviewUri.getPort(); - String file = jalviewUri.getPath(); - String ref = jalviewUri.getFragment(); - String query = jalviewUri.getQuery(); - + String host = jalviewUri.getHost(); + if (scheme != null && scheme.startsWith("jalview") + && (scheme.length() == 8 || scheme.equals("jalviewhttp") || scheme.equals("jalviewhttps"))) { _appargs.clear(); if (host != null && host.length() > 0) { - URL newUrl = new URL( - (https?"https":"http") - + "://" - + host - + (port > -1? String.valueOf(port) : "") - + jalviewUri.getRawPath() - + (query != null && query.length() > 0 ? "?" + jalviewUri.getRawQuery() : "") - ); - _appargs.add(newUrl.toString()); + URI newUri = new URI( + scheme.equals("jalviewhttp") ? "http" : "https", + jalviewUri.getUserInfo(), + host, + jalviewUri.getPort(), + jalviewUri.getPath(), + jalviewUri.getQuery(), + jalviewUri.getFragment() + ); + // open a URL + _appargs.add(newUri.toURL().toString()); } else { - _appargs.add(file); + // open a file + _appargs.add(jalviewUri.getPath()); } - - if (ref != null && ref.length() > 0) { - String[] refArgs = ref.split("&"); - for (String refArg : refArgs) { - if (refArg.startsWith("jvmmempc=")) { - jvmmempc = refArg.substring(9); - continue; - } - if (refArg.startsWith("jvmmemmax=")) { - jvmmemmax = refArg.substring(10); - continue; - } - _appargs.add(URLDecoder.decode(refArg, "UTF-8")); - } - } - } + } - } catch (URISyntaxException e) { + } catch (URISyntaxException | MalformedURLException e) { log.error("Malformed jalview URI", uri); } } diff --git a/getdown/src/getdown/launcher/pom.xml b/getdown/src/getdown/launcher/pom.xml index c6b9ff3..876efd2 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.3.1_FJVL + 1.8.3-1.4.0_FJVL getdown-launcher diff --git a/getdown/src/getdown/mvn_cmd b/getdown/src/getdown/mvn_cmd index 10942f8..59cb761 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.3.1_JVL + export VERSION=1.8.3-1.4.0_JVL fi if [ x${VERSION%_JVL} = x$VERSION ]; then diff --git a/getdown/src/getdown/pom.xml b/getdown/src/getdown/pom.xml index cf32333..c3c6fc3 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.3.1_FJVL + 1.8.3-1.4.0_FJVL getdown An application installer and updater. diff --git a/j11lib/getdown-core.jar b/j11lib/getdown-core.jar index 3fc97b5..bd6924d 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 3fc97b5..bd6924d 100644 Binary files a/j8lib/getdown-core.jar and b/j8lib/getdown-core.jar differ diff --git a/utils/install4j/install4j10_template.install4j b/utils/install4j/install4j10_template.install4j index b0887e3..bf57307 100644 --- a/utils/install4j/install4j10_template.install4j +++ b/utils/install4j/install4j10_template.install4j @@ -1,5 +1,5 @@ - + @@ -152,6 +152,8 @@ + + @@ -568,16 +570,28 @@ return console.askOkCancel(message, true); - JALVIEW + 737 jalview - + - JALVIEW + 737 jalviews + + + 737 + jalviewhttp + + + + + 737 + jalviewhttps + + JALVIEW