JAL-4409 Add jalviewhttp and jalviewhttps schemes to register in install4j. Recognis...
authorBen Soares <b.soares@dundee.ac.uk>
Fri, 10 May 2024 11:14:27 +0000 (12:14 +0100)
committerBen Soares <b.soares@dundee.ac.uk>
Fri, 10 May 2024 11:14:27 +0000 (12:14 +0100)
14 files changed:
getdown/lib/FJVL_VERSION
getdown/lib/JVL_VERSION
getdown/lib/getdown-core.jar
getdown/lib/getdown-launcher-local.jar
getdown/lib/getdown-launcher.jar
getdown/src/getdown/ant/pom.xml
getdown/src/getdown/core/pom.xml
getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/Application.java
getdown/src/getdown/launcher/pom.xml
getdown/src/getdown/mvn_cmd
getdown/src/getdown/pom.xml
j11lib/getdown-core.jar
j8lib/getdown-core.jar
utils/install4j/install4j10_template.install4j

index 2d83e61..21df89d 100644 (file)
@@ -1 +1 @@
-1.8.3-1.3.1_FJVL
+1.8.3-1.4.0_FJVL
index 7d618e2..2d02e7a 100644 (file)
@@ -1 +1 @@
-1.8.3-1.3.1_JVL
+1.8.3-1.4.0_JVL
index 3fc97b5..bd6924d 100644 (file)
Binary files a/getdown/lib/getdown-core.jar and b/getdown/lib/getdown-core.jar differ
index 6ba0a6d..02c4711 100644 (file)
Binary files a/getdown/lib/getdown-launcher-local.jar and b/getdown/lib/getdown-launcher-local.jar differ
index 7c75a34..b8801ac 100644 (file)
Binary files a/getdown/lib/getdown-launcher.jar and b/getdown/lib/getdown-launcher.jar differ
index 4c91f74..ce84058 100644 (file)
@@ -4,7 +4,7 @@
   <parent>
     <groupId>com.threerings.getdown</groupId>
     <artifactId>getdown</artifactId>
-    <version>1.8.3-1.3.1_FJVL</version>
+    <version>1.8.3-1.4.0_FJVL</version>
   </parent>
 
   <artifactId>getdown-ant</artifactId>
index 2e43522..c926ab2 100644 (file)
@@ -4,7 +4,7 @@
   <parent>
     <groupId>com.threerings.getdown</groupId>
     <artifactId>getdown</artifactId>
-    <version>1.8.3-1.3.1_FJVL</version>
+    <version>1.8.3-1.4.0_FJVL</version>
   </parent>
 
   <artifactId>getdown-core</artifactId>
index 435ebbd..cfc8d97 100644 (file)
@@ -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);
           }
         }
index c6b9ff3..876efd2 100644 (file)
@@ -4,7 +4,7 @@
   <parent>
     <groupId>com.threerings.getdown</groupId>
     <artifactId>getdown</artifactId>
-    <version>1.8.3-1.3.1_FJVL</version>
+    <version>1.8.3-1.4.0_FJVL</version>
   </parent>
 
   <artifactId>getdown-launcher</artifactId>
index 10942f8..59cb761 100755 (executable)
@@ -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
index cf32333..c3c6fc3 100644 (file)
@@ -10,7 +10,7 @@
   <groupId>com.threerings.getdown</groupId>
   <artifactId>getdown</artifactId>
   <packaging>pom</packaging>
-  <version>1.8.3-1.3.1_FJVL</version>
+  <version>1.8.3-1.4.0_FJVL</version>
 
   <name>getdown</name>
   <description>An application installer and updater.</description>
index 3fc97b5..bd6924d 100644 (file)
Binary files a/j11lib/getdown-core.jar and b/j11lib/getdown-core.jar differ
index 3fc97b5..bd6924d 100644 (file)
Binary files a/j8lib/getdown-core.jar and b/j8lib/getdown-core.jar differ
index b0887e3..bf57307 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<install4j version="10.0.6" transformSequenceNumber="10">
+<install4j version="10.0.7" transformSequenceNumber="10">
   <directoryPresets config="bin/Jalview" />
   <application name="${compiler:JALVIEW_APPLICATION_NAME}" applicationId="${compiler:WINDOWS_APPLICATION_ID}" mediaDir="${compiler:BUILD_DIR}" lzmaCompression="true" shortName="${compiler:INTERNAL_ID}" publisher="University of Dundee" publisherWeb="https://www.jalview.org/" version="${compiler:JALVIEW_VERSION}" allPathsRelative="true" macVolumeId="5aac4968c304f65" javaMinVersion="${compiler:JAVA_MIN_VERSION}" javaMaxVersion="${compiler:JAVA_MAX_VERSION}" allowBetaVM="true" jdkMode="jdk" jdkName="JDK 11.0">
     <searchSequence>
       <macStaticAssociations>
         <urlHandler scheme="jalview" />
         <urlHandler scheme="jalviews" />
+        <urlHandler scheme="jalviewhttp" />
+        <urlHandler scheme="jalviewhttps" />
         <urlHandler scheme="${compiler:EXTRA_SCHEME}" />
       </macStaticAssociations>
     </launcher>
@@ -568,16 +570,28 @@ return console.askOkCancel(message, true);
               </group>
               <action id="2350" beanClass="com.install4j.runtime.beans.actions.desktop.UrlHandlerAction" actionElevationType="elevated" rollbackBarrierExitCode="0">
                 <serializedBean>
-                  <property name="launcherId" type="string">JALVIEW</property>
+                  <property name="launcherId" type="string">737</property>
                   <property name="scheme" type="string">jalview</property>
                 </serializedBean>
               </action>
-              <action id="2450" beanClass="com.install4j.runtime.beans.actions.desktop.UrlHandlerAction" actionElevationType="elevated" rollbackBarrierExitCode="0">
+              <action id="2822" beanClass="com.install4j.runtime.beans.actions.desktop.UrlHandlerAction" actionElevationType="elevated" rollbackBarrierExitCode="0">
                 <serializedBean>
-                  <property name="launcherId" type="string">JALVIEW</property>
+                  <property name="launcherId" type="string">737</property>
                   <property name="scheme" type="string">jalviews</property>
                 </serializedBean>
               </action>
+              <action id="2819" beanClass="com.install4j.runtime.beans.actions.desktop.UrlHandlerAction" actionElevationType="elevated" rollbackBarrierExitCode="0">
+                <serializedBean>
+                  <property name="launcherId" type="string">737</property>
+                  <property name="scheme" type="string">jalviewhttp</property>
+                </serializedBean>
+              </action>
+              <action id="2820" beanClass="com.install4j.runtime.beans.actions.desktop.UrlHandlerAction" actionElevationType="elevated" rollbackBarrierExitCode="0">
+                <serializedBean>
+                  <property name="launcherId" type="string">737</property>
+                  <property name="scheme" type="string">jalviewhttps</property>
+                </serializedBean>
+              </action>
               <action id="2641" beanClass="com.install4j.runtime.beans.actions.desktop.UrlHandlerAction" actionElevationType="elevated" rollbackBarrierExitCode="0">
                 <serializedBean>
                   <property name="launcherId" type="string">JALVIEW</property>