Extra JVL file association in the installer. Shadowed gradle-launcher.jar and classpa...
authorBen Soares <bsoares@dundee.ac.uk>
Wed, 1 May 2019 16:18:03 +0000 (17:18 +0100)
committerBen Soares <bsoares@dundee.ac.uk>
Wed, 1 May 2019 16:18:03 +0000 (17:18 +0100)
getdown/lib/getdown-launcher.jar
getdown/src/getdown/launcher/pom.xml
getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/GetdownApp.java
resources/images/JalviewVersionLocator.png [new file with mode: 0644]
utils/install4j/install4j_template.install4j

index b52deec..e93b97b 100644 (file)
Binary files a/getdown/lib/getdown-launcher.jar and b/getdown/lib/getdown-launcher.jar differ
index cf94571..10e1aa6 100644 (file)
@@ -47,7 +47,9 @@
         <executions>
          <execution>
            <phase>package</phase>
-            <goals><goal>proguard</goal></goals>
+           <goals>
+             <goal>proguard</goal>
+           </goals>
          </execution>
         </executions>
         <dependencies>
           </archive>
         </configuration>
       </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-shade-plugin</artifactId>
+        <version>3.2.1</version>
+        <configuration>
+          <!-- put your configurations here -->
+        </configuration>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>shade</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+
+
+
+
     </plugins>
   </build>
 
index fde79f3..6548fde 100644 (file)
@@ -99,6 +99,7 @@ public class GetdownApp
         log.info("-- User Name: " + System.getProperty("user.name"));
         log.info("-- User Home: " + System.getProperty("user.home"));
         log.info("-- Cur dir: " + System.getProperty("user.dir"));
+        log.info("-- JVL: " + System.getProperty("jvl"));
         log.info("---------------------------------------------");
 
         Getdown app = new Getdown(envc) {
diff --git a/resources/images/JalviewVersionLocator.png b/resources/images/JalviewVersionLocator.png
new file mode 100644 (file)
index 0000000..9441080
Binary files /dev/null and b/resources/images/JalviewVersionLocator.png differ
index 8a64055..d848567 100644 (file)
@@ -7,11 +7,12 @@
       <additionalLanguages />
     </languages>
     <searchSequence>
-      <directory location="jre" />
+      <directory location="${compiler:JRE_DIR}" />
     </searchSequence>
     <variables>
       <variable name="OSX_KEYSTORE" value="" description="" category="" />
       <variable name="JSIGN_SH" value="" description="" category="" />
+      <variable name="JRE_DIR" value="jre" description="The folder under the app folder that the JRE will be either copied or unpacked into" category="" />
     </variables>
     <mergedProjects />
     <codeSigning macEnabled="true" macPkcs12File="${compiler:OSX_KEYSTORE}" windowsEnabled="false" windowsKeySource="pkcs12" windowsPvkFile="" windowsSpcFile="" windowsPkcs12File="" windowsPkcs11Library="" windowsPkcs11Slot="">
       <dirEntry mountPoint="736" file="../../getdown/website/$$JAVA_VERSION$$" overwriteMode="4" shared="false" fileMode="644" uninstallMode="2" overrideFileMode="false" overrideOverwriteMode="true" overrideUninstallMode="true" entryMode="direct" subDirectory="files" excludeSuffixes="" dirMode="755" overrideDirMode="false">
         <exclude />
       </dirEntry>
-      <dirEntry mountPoint="884" file="$$MACOS_JAVA_VM_DIR$$" overwriteMode="4" shared="false" fileMode="755" uninstallMode="0" overrideFileMode="true" overrideOverwriteMode="false" overrideUninstallMode="true" entryMode="subdir" subDirectory="jre" excludeSuffixes="" dirMode="755" overrideDirMode="false">
+      <dirEntry mountPoint="884" file="$$MACOS_JAVA_VM_DIR$$" overwriteMode="4" shared="false" fileMode="755" uninstallMode="0" overrideFileMode="true" overrideOverwriteMode="false" overrideUninstallMode="true" entryMode="subdir" subDirectory="${compiler:JRE_DIR}" excludeSuffixes="" dirMode="755" overrideDirMode="false">
         <exclude />
       </dirEntry>
-      <dirEntry mountPoint="885" file="$$WINDOWS_JAVA_VM_DIR$$" overwriteMode="4" shared="false" fileMode="755" uninstallMode="0" overrideFileMode="true" overrideOverwriteMode="false" overrideUninstallMode="true" entryMode="subdir" subDirectory="jre" excludeSuffixes="" dirMode="755" overrideDirMode="false">
+      <dirEntry mountPoint="885" file="$$WINDOWS_JAVA_VM_DIR$$" overwriteMode="4" shared="false" fileMode="755" uninstallMode="0" overrideFileMode="true" overrideOverwriteMode="false" overrideUninstallMode="true" entryMode="subdir" subDirectory="${compiler:JRE_DIR}" excludeSuffixes="" dirMode="755" overrideDirMode="false">
         <exclude />
       </dirEntry>
     </entries>
@@ -95,7 +96,6 @@
       <java mainClass="com.threerings.getdown.launcher.GetdownApp" mainMode="1" vmParameters="" arguments="." allowVMPassthroughParameters="true" preferredVM="" bundleRuntime="true">
         <classPath>
           <archive location="getdown-launcher.jar" failOnError="true" />
-          <archive location="dist/commons-compress-1.18.jar" failOnError="true" />
         </classPath>
         <modulePath />
         <nativeLibraryDirectories />
         <content />
       </infoPlist>
       <iconImageFiles>
-        <file path="../../resources/images/Jalview_Logo.png" />
+        <file path="../../resources/images/JalviewLogo_Huge.png" />
       </iconImageFiles>
     </launcher>
     <launcher name="Network Jalview Launcher" id="1402" customizedId="" external="false" excludeFromMenu="false" unixMode="755" unixAutoStart="true" menuName="${compiler:sys.shortName}" icnsFile="../../resources/images/jalview_logos.icns" customMacBundleIdentifier="false" macBundleIdentifier="" swtApp="false" fileset="" macBundleBinary="JavaApplicationStub" addMacEntitlements="false" macEntitlementsFile="" useCustomMacosExecutableName="true" customMacosExecutableName="${compiler:sys.shortName}" useJavaMinVersionOverride="false" javaMinVersionOverride="" useJavaMaxVersionOverride="false" javaMaxVersionOverride="" checkUpdater="false" updateExecutionMode="unattendedProgress" unattendedUpdateTitle="${i18n:updater.WindowTitle(&quot;${compiler:sys.fullName}&quot;)}">
       <java mainClass="com.threerings.getdown.launcher.GetdownApp" mainMode="1" vmParameters="" arguments="." allowVMPassthroughParameters="true" preferredVM="" bundleRuntime="true">
         <classPath>
           <archive location="getdown-launcher.jar" failOnError="true" />
-          <archive location="dist/commons-compress-1.18.jar" failOnError="true" />
         </classPath>
         <modulePath />
         <nativeLibraryDirectories />
         <content />
       </infoPlist>
       <iconImageFiles>
-        <file path="../../resources/images/Jalview_Logo.png" />
+        <file path="../../resources/images/JalviewLogo_Huge.png" />
+      </iconImageFiles>
+    </launcher>
+    <launcher name="JVL Jalview Launcher" id="1608" customizedId="" external="false" excludeFromMenu="false" unixMode="755" unixAutoStart="true" menuName="${compiler:sys.shortName}" icnsFile="../../resources/images/jalview_logos.icns" customMacBundleIdentifier="false" macBundleIdentifier="" swtApp="false" fileset="" macBundleBinary="JavaApplicationStub" addMacEntitlements="false" macEntitlementsFile="" useCustomMacosExecutableName="true" customMacosExecutableName="${compiler:sys.shortName}" useJavaMinVersionOverride="false" javaMinVersionOverride="" useJavaMaxVersionOverride="false" javaMaxVersionOverride="" checkUpdater="false" updateExecutionMode="unattendedProgress" unattendedUpdateTitle="${i18n:updater.WindowTitle(&quot;${compiler:sys.fullName}&quot;)}">
+      <executable name="Jalview" type="1" iconSet="true" iconFile="../../resources/images/jalview_logos.ico" executableDir="." redirectStderr="true" stderrFile="error.log" stderrMode="overwrite" redirectStdout="true" stdoutFile="output.log" stdoutMode="overwrite" failOnStderrOutput="true" executableMode="1" changeWorkingDirectory="true" workingDirectory="." singleInstance="true" serviceStartType="2" serviceDependencies="" serviceDescription="" jreLocation="" executionLevel="asInvoker" checkConsoleParameter="true" globalSingleInstance="false" singleInstanceActivate="true" dpiAware="java9+">
+        <versionInfo include="true" fileVersion="" fileDescription="${compiler:sys.shortName}" legalCopyright="..." internalName="${compiler:sys.shortName}" productName="${compiler:sys.shortName}" />
+      </executable>
+      <splashScreen show="false" width="640" height="480" bitmapFile="../../resources/images/jalview_logo_background_fade-640x480.png" textOverlay="true">
+        <text>
+          <statusLine x="85" y="81" text="${compiler:sys.shortName}" fontSize="18" fontColor="0,0,0" bold="false" />
+          <versionLine x="85" y="109" text="version ${compiler:sys.version}" fontSize="8" fontColor="0,0,0" bold="false" />
+        </text>
+      </splashScreen>
+      <java mainClass="com.threerings.getdown.launcher.GetdownApp" mainMode="1" vmParameters="" arguments="-Djvl=true ." allowVMPassthroughParameters="true" preferredVM="" bundleRuntime="true">
+        <classPath>
+          <archive location="getdown-launcher.jar" failOnError="true" />
+        </classPath>
+        <modulePath />
+        <nativeLibraryDirectories />
+        <vmOptions />
+      </java>
+      <includedFiles />
+      <unextractableFiles />
+      <vmOptionsFile mode="template" overwriteMode="0" fileMode="644">
+        <content />
+      </vmOptionsFile>
+      <customScript mode="1" file="">
+        <content />
+      </customScript>
+      <infoPlist mode="1" file="">
+        <content />
+      </infoPlist>
+      <iconImageFiles>
+        <file path="../../resources/images/JalviewLogo_Huge.png" />
       </iconImageFiles>
     </launcher>
   </launchers>
               <action name="" id="22" customizedId="" beanClass="com.install4j.runtime.beans.actions.misc.RequestPrivilegesAction" enabled="true" commentSet="false" comment="" actionElevationType="none" rollbackBarrier="false" rollbackBarrierExitCode="0" multiExec="false" failureStrategy="1" errorMessage="">
                 <serializedBean>
                   <java class="java.beans.XMLDecoder">
-                    <object class="com.install4j.runtime.beans.actions.misc.RequestPrivilegesAction" />
+                    <object class="com.install4j.runtime.beans.actions.misc.RequestPrivilegesAction">
+                      <void property="obtainIfAdminWin">
+                        <boolean>false</boolean>
+                      </void>
+                    </object>
                   </java>
                 </serializedBean>
                 <condition />
@@ -483,17 +519,17 @@ return console.askOkCancel(message, true);
                 <initScript />
                 <visibilityScript />
                 <externalParametrizationPropertyNames>
-                  <propertyName>suggestAppDir</propertyName>
-                  <propertyName>validateApplicationId</propertyName>
-                  <propertyName>existingDirWarning</propertyName>
+                  <propertyName>allowSpacesOnUnix</propertyName>
+                  <propertyName>checkFreeSpace</propertyName>
                   <propertyName>checkWritable</propertyName>
+                  <propertyName>existingDirWarning</propertyName>
                   <propertyName>manualEntryAllowed</propertyName>
-                  <propertyName>checkFreeSpace</propertyName>
-                  <propertyName>showRequiredDiskSpace</propertyName>
                   <propertyName>showFreeDiskSpace</propertyName>
-                  <propertyName>allowSpacesOnUnix</propertyName>
-                  <propertyName>validationScript</propertyName>
+                  <propertyName>showRequiredDiskSpace</propertyName>
                   <propertyName>standardValidation</propertyName>
+                  <propertyName>suggestAppDir</propertyName>
+                  <propertyName>validateApplicationId</propertyName>
+                  <propertyName>validationScript</propertyName>
                 </externalParametrizationPropertyNames>
               </formComponent>
             </formComponents>
@@ -651,13 +687,24 @@ return console.askOkCancel(message, true);
             <preActivation />
             <postActivation />
             <actions>
-              <action name="" id="573" customizedId="" beanClass="com.install4j.runtime.beans.actions.desktop.CreateDesktopLinkAction" enabled="false" commentSet="false" comment="" actionElevationType="elevated" rollbackBarrier="false" rollbackBarrierExitCode="0" multiExec="false" failureStrategy="1" errorMessage="">
+              <action name="" id="573" customizedId="" beanClass="com.install4j.runtime.beans.actions.desktop.CreateDesktopLinkAction" enabled="true" commentSet="false" comment="" actionElevationType="elevated" rollbackBarrier="false" rollbackBarrierExitCode="0" multiExec="false" failureStrategy="1" errorMessage="">
                 <serializedBean>
                   <java class="java.beans.XMLDecoder">
                     <object class="com.install4j.runtime.beans.actions.desktop.CreateDesktopLinkAction">
+                      <void property="allUsers">
+                        <boolean>false</boolean>
+                      </void>
+                      <void property="description">
+                        <string>Jalview Desktop</string>
+                      </void>
                       <void property="name">
                         <string>${compiler:sys.fullName}</string>
                       </void>
+                      <void property="winIconFile">
+                        <object class="com.install4j.api.beans.ExternalFile">
+                          <string>../../resources/images/JalviewLogo_Huge.png</string>
+                        </object>
+                      </void>
                     </object>
                   </java>
                 </serializedBean>
@@ -713,6 +760,40 @@ return console.askOkCancel(message, true);
                 </serializedBean>
                 <condition />
               </action>
+              <action name="" id="1604" customizedId="" beanClass="com.install4j.runtime.beans.actions.desktop.CreateFileAssociationAction" enabled="true" commentSet="false" comment="" actionElevationType="elevated" rollbackBarrier="false" rollbackBarrierExitCode="0" multiExec="false" failureStrategy="1" errorMessage="">
+                <serializedBean>
+                  <java class="java.beans.XMLDecoder">
+                    <object class="com.install4j.runtime.beans.actions.desktop.CreateFileAssociationAction">
+                      <void property="description">
+                        <string>Jalview Version Locator</string>
+                      </void>
+                      <void property="extension">
+                        <string>jvl</string>
+                      </void>
+                      <void property="launcherId">
+                        <string>1608</string>
+                      </void>
+                      <void property="macIconFile">
+                        <object class="com.install4j.api.beans.ExternalFile">
+                          <string>../../resources/images/JalviewVersionLocator.png</string>
+                        </object>
+                      </void>
+                      <void property="macRole">
+                        <object class="java.lang.Enum" method="valueOf">
+                          <class>com.install4j.runtime.beans.actions.desktop.MacAssociationRole</class>
+                          <string>EDITOR</string>
+                        </object>
+                      </void>
+                      <void property="windowsIconFile">
+                        <object class="com.install4j.api.beans.ExternalFile">
+                          <string>../../resources/images/JalviewVersionLocator.png</string>
+                        </object>
+                      </void>
+                    </object>
+                  </java>
+                </serializedBean>
+                <condition />
+              </action>
             </actions>
             <formComponents>
               <formComponent name="" id="21" customizedId="" beanClass="com.install4j.runtime.beans.formcomponents.MultilineLabelComponent" enabled="true" commentSet="false" comment="" insetTop="" insetLeft="" insetBottom="10" insetRight="" resetInitOnPrevious="false" useExternalParametrization="false" externalParametrizationName="" externalParametrizationMode="all">
@@ -1686,7 +1767,7 @@ return console.askYesNo(message, true);
         <symlink name="&quot; &quot;" target="/Applications" />
         <file name=".background/jalview_dmg_background.png" file="./jalview_dmg_background.png" />
         <file name=".DS_Store" file="./DS_Store" />
-        <symlink name="Jalview.app/Contents/Resources/app/jre/Contents/MacOS/libjli.dylib" target="../Home/lib/jli/libjli.dylib" />
+        <symlink name="Jalview.app/Contents/Resources/app/${compiler:JRE_DIR}/Contents/MacOS/libjli.dylib" target="../Home/lib/jli/libjli.dylib" />
       </topLevelFiles>
     </macosArchive>
     <windows name="Network Windows" id="1272" customizedId="" mediaFileName="${compiler:sys.shortName}-NETWORK_${compiler:sys.platform}_${compiler:sys.version}-j$$JAVA_INTEGER_VERSION$$" installDir="${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="64" runPostProcessor="true" postProcessor="${compiler:JSIGN_SH} $EXECUTABLE" failOnPostProcessorError="false" useLegacyMediaFileIds="false" legacyMediaFileIds="" downloadURL="" includeAllDownloadableComponents="false" includedJRE="$$WINDOWS_JAVA_VM_TGZ$$" manualJREEntry="true" bundleType="1" jreURL="" jreShared="false" directDownload="false" installOnlyIfNecessary="false" customInstallBaseDir="" contentFilesType="1" verifyIntegrity="true">
@@ -1704,6 +1785,7 @@ return console.askYesNo(message, true);
       <exclude>
         <entry location=".i4j_fileset_734" fileType="regular" />
         <entry location=".i4j_fileset_880" fileType="regular" />
+        <entry location=".i4j_fileset_882" fileType="regular" />
       </exclude>
       <variables />
       <autoUpdate useMinUpdatableVersion="false" minUpdatableVersion="" useMaxUpdatableVersion="false" maxUpdatableVersion="">
@@ -1732,7 +1814,7 @@ return console.askYesNo(message, true);
         <symlink name="&quot; &quot;" target="/Applications" />
         <file name=".background/jalview_dmg_background.png" file="./jalview_dmg_background.png" />
         <file name=".DS_Store" file="./DS_Store" />
-        <symlink name="Jalview.app/Contents/Resources/app/jre/Contents/MacOS/libjli.dylib" target="../Home/lib/jli/libjli.dylib" />
+        <symlink name="Jalview.app/Contents/Resources/app/${compiler:JRE_DIR}/Contents/MacOS/libjli.dylib" target="../Home/lib/jli/libjli.dylib" />
       </topLevelFiles>
     </macosArchive>
     <unixInstaller name="Unix Installer" id="1595" customizedId="" mediaFileName="${compiler:sys.shortName}-OFFLINE_${compiler:sys.platform}_installer_${compiler:sys.version}-j$$JAVA_INTEGER_VERSION$$" installDir="${compiler:sys.shortName}" overridePrincipalLanguage="false" jreBitType="all" runPostProcessor="false" postProcessor="" failOnPostProcessorError="false" useLegacyMediaFileIds="false" legacyMediaFileIds="" downloadURL="" includeAllDownloadableComponents="false" includedJRE="" manualJREEntry="false" bundleType="1" jreURL="" jreShared="false" directDownload="false" installOnlyIfNecessary="false" customInstallBaseDir="" contentFilesType="1">
@@ -1782,5 +1864,5 @@ return console.askYesNo(message, true);
     <mediaSet refId="1274" />
     <mediaSet refId="1595" />
   </buildIds>
-  <buildOptions verbose="false" faster="false" disableSigning="false" disableJreBundling="true" debug="false" />
+  <buildOptions verbose="false" faster="false" disableSigning="false" disableJreBundling="false" debug="false" />
 </install4j>