From: Jim Procter Date: Thu, 17 Feb 2022 17:04:14 +0000 (+0000) Subject: Merge branch 'develop' into improvement/JAL-3830_install4j9_macos_setup_application X-Git-Tag: Release_2_11_2_1~64 X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=commitdiff_plain;h=1d9a10caca0850531fffbbc16ae9af72df65990a;hp=1724567f3dfc3b4637aac7bdeb6633628e6a8335 Merge branch 'develop' into improvement/JAL-3830_install4j9_macos_setup_application --- diff --git a/build.gradle b/build.gradle index 34a3461..1d56ca3 100644 --- a/build.gradle +++ b/build.gradle @@ -450,11 +450,11 @@ ext { jreInstallsDir = System.getProperty("user.home") + jreInstallsDir.substring(1) } macosJavaVMDir = string("${jreInstallsDir}/jre-${JAVA_INTEGER_VERSION}-mac-x64/jre") - macosJavaVMTgz = string("${jreInstallsDir}/tgz/jre-${JAVA_INTEGER_VERSION}-mac-x64.tar.gz") windowsJavaVMDir = string("${jreInstallsDir}/jre-${JAVA_INTEGER_VERSION}-windows-x64/jre") - windowsJavaVMTgz = string("${jreInstallsDir}/tgz/jre-${JAVA_INTEGER_VERSION}-windows-x64.tar.gz") linuxJavaVMDir = string("${jreInstallsDir}/jre-${JAVA_INTEGER_VERSION}-linux-x64/jre") - linuxJavaVMTgz = string("${jreInstallsDir}/tgz/jre-${JAVA_INTEGER_VERSION}-linux-x64.tar.gz") + macosJavaVMTgz = string("${jreInstallsDir}/tgz/jre_${JAVA_INTEGER_VERSION}_mac_x64.tar.gz") + windowsJavaVMTgz = string("${jreInstallsDir}/tgz/jre_${JAVA_INTEGER_VERSION}_windows_x64.tar.gz") + linuxJavaVMTgz = string("${jreInstallsDir}/tgz/jre_${JAVA_INTEGER_VERSION}_linux_x64.tar.gz") install4jDir = string("${jalviewDir}/${install4j_utils_dir}") install4jConfFileName = string("jalview-install4j-conf.install4j") install4jConfFile = file("${install4jDir}/${install4jConfFileName}") diff --git a/gradle.properties b/gradle.properties index 8eec281..ae8e8ac 100644 --- a/gradle.properties +++ b/gradle.properties @@ -114,12 +114,12 @@ flexmark_css = utils/doc/github.css channel_properties_dir = utils/channels channel_props = channel.props -install4j_home_dir = ~/buildtools/install4j8 +install4j_home_dir = ~/buildtools/install4j9 install4j_copyright_message = ... install4j_bundle_id = org.jalview.jalview-desktop install4j_utils_dir = utils/install4j install4j_images_dir = utils/install4j -install4j_template = install4j8_template.install4j +install4j_template = install4j9_template.install4j install4j_info_plist_file_associations = file_associations_auto-Info_plist.xml install4j_installer_file_associations = file_associations_auto-install4j8.xml #install4j_DMG_uninstaller_app_files = uninstall_old_jalview_files.xml diff --git a/utils/dev_macos_install.sh b/utils/dev_macos_install.sh index 6f17315..e46f524 100755 --- a/utils/dev_macos_install.sh +++ b/utils/dev_macos_install.sh @@ -1,12 +1,13 @@ #!/usr/bin/env bash # perform a dev build and install on local macOS machine -INSTALLERVOL="Jalview Installer" -APP=Jalview.app +INSTALLERVOL="Jalview Non-Release Installer" +APP="Jalview Local.app" -APPLICATIONS=$HOME/Applications +APPLICATIONS=/Applications CHANNEL=NOCHANNEL -DMG=build/install4j/11/Jalview-OFFLINE_macos-app_DEVELOPMENT-j11.dmg +DMG=build/install4j/11/Jalview_Local-TEST-macos-java_11.dmg + if [ x$1 != "xnogradle" ]; then gradle installers -PCHANNEL=LOCAL -Pinstall4j_media_types=macosArchive @@ -33,7 +34,10 @@ if [ $? = 0 ]; then echo "" fi if [ -e "/Volumes/$INSTALLERVOL/$APP" ]; then + echo "Removing '$APPLICATIONS/$APP'" /bin/rm -r "$APPLICATIONS/$APP" + echo "Syncing '/Volumes/$INSTALLERVOL/$APP' to '$APPLICATIONS/'" rsync -avh "/Volumes/$INSTALLERVOL/$APP" "$APPLICATIONS/" + echo "Unmounting '/Volumes/$INSTALLERVOL'" umount "/Volumes/$INSTALLERVOL" fi diff --git a/utils/install4j/install4j9_template.install4j b/utils/install4j/install4j9_template.install4j new file mode 100644 index 0000000..79f99bf --- /dev/null +++ b/utils/install4j/install4j9_template.install4j @@ -0,0 +1,1512 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + *.dylib + *.so + *.jnilib + unpack200 + tnameserv + servertool + rmiregistry + rmid + policytool + pack200 + orbd + keytool + jjs + java + jspawnhelper + libfreetype.dylib.6 + applet + jaotc + jfr + jrunscript + libjli.dylib + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2350 + 2450 + 2641 + + ${compiler:file("${compiler:INFO_PLIST_FILE_ASSOCIATIONS_FILE}")} + + + + + + + + + + + + + + + + + + + 255 + 255 + 255 + 255 + + + 49 + 52 + 53 + 255 + + + + + + + + + + + 255 + 255 + 255 + 255 + + + + + + ${compiler:JALVIEW_DIR}/${compiler:BACKGROUND} + + + + + 5 + 10 + 10 + 10 + + + + + imageAnchor + imageEdgeBackgroundColor + imageFile + + + + + + + + + + labelText + + + + + + + + + + + + + + + + + String userHome = (String)context.getVariable("sys.userHome"); + +ArrayList<String> tryPaths = new ArrayList<> (); +tryPaths.add(userHome + File.separator + "bin"); +tryPaths.add(userHome + File.separator + ".local" + File.separator + "bin"); +tryPaths.add(userHome + File.separator + "local" + File.separator + "bin"); +tryPaths.add(userHome + File.separator + "opt" + File.separator + "bin"); + +if (Util.isMacOS()) { // && root permission? + tryPaths.add(File.separator + "usr" + File.separator + "local" + File.separator + "bin"); +} + +for (int i = 0; i < tryPaths.size(); i++) { + String tryPath = tryPaths.get(i); + File unixUserBinDir = new File(tryPath); + if (unixUserBinDir.exists()) { + return tryPath; + } +} + +return null; + + + + unixUserBinDir + + Util.isLinux() || Util.isUnixInstaller() || Util.isMacOS() + + + + + + String javaHome = System.getProperty("java.home"); +String appName = ((String)context.getCompilerVariable("JALVIEW_APPLICATION_NAME")) + ".app"; +int i = javaHome.indexOf(appName); +String wrapperLink = null; +if (i > -1) { + wrapperLink = javaHome.substring(0, i) + appName + File.separator + "Contents" + File.separator + "MacOS" + File.separator + ((String)context.getCompilerVariable("WRAPPER_LINK")); +} +return wrapperLink; + + + + macWrapperLinkLocation + + Util.isMacOS() + + + + + + + + + + + + + + 255 + 255 + 255 + 255 + + + 49 + 52 + 53 + 255 + + + + + + + + + + + + 25 + 143 + 220 + 255 + + + 0 + 74 + 151 + 255 + + + + + + + ${compiler:JALVIEW_DIR}/${compiler:BACKGROUND} + + + + + 5 + 10 + 10 + 10 + + + + + imageAnchor + imageEdgeBackgroundColor + imageFile + + + + + + + + + sys.installationDir + + + context.getBooleanVariable("sys.confirmedUpdateInstallation") + + + + + + ${form:welcomeMessage} + + !context.isConsole() + + + + + + String message = context.getMessage("ConsoleWelcomeLabel", context.getApplicationName()); +return console.askOkCancel(message, true); + + + + + + + + updateCheck + + + + + ${i18n:ClickNext} + + + + + + !context.getBooleanVariable("sys.confirmedUpdateInstallation") + + + + + sys.installationDir + + + context.getVariable("sys.responseFile") == null + + + + + + ${i18n:SelectDirLabel(${compiler:sys.fullName})} + + + + + + + + allowSpacesOnUnix + checkFreeSpace + checkWritable + existingDirWarning + manualEntryAllowed + showFreeDiskSpace + showRequiredDiskSpace + standardValidation + suggestAppDir + validateApplicationId + validationScript + + + + + + + + + ${i18n:SelectComponentsLabel2} + + !context.isConsole() + + + + + + + selectionChangedScript + + + + + + + + + ${i18n:SelectAssociationsLabel} + + + + + + + + + + showSelectionButtons + selectionButtonPosition + + + + + + + + + + + ${compiler:APPLICATION_CATEGORIES} + + + + Examples + + + examples + + + + + + ${compiler:JALVIEW_NAME} + ${i18n:UninstallerMenuEntry(${compiler:sys.fullName})} + + !context.getBooleanVariable("sys.programGroupDisabled") + + + + + ${compiler:APPLICATION_CATEGORIES} + ${compiler:JALVIEW_NAME} + ${i18n:UninstallerMenuEntry(${compiler:sys.fullName})} + + !context.getBooleanVariable("sys.programGroupDisabled") + + + + ${compiler:sys.fullName} ${compiler:sys.version} + + + + + + + + + + + + true + + + + 121 + + + + + + + + Creating file associations... + + + + + + + + + + + + + + This action, identified by its name "EXTENSIONS_REPLACED_BY_GRADLE", will be replaced by gradle with the contents of file 'file_associations_auto_install4j.xml'. + extensions_to_be_replaced_by_gradle + JALVIEW + + + + + + + Finished creating file associations + + + + + + + + + + + + + + JALVIEW + jalview + + + + + JALVIEW + jalviews + + + + + JALVIEW + ${compiler:EXTRA_SCHEME} + + + + + + + ${i18n:WizardPreparing} + + + + + + + + + + ${compiler:APPLICATION_CATEGORIES} + ${compiler:JALVIEW_APPLICATION_NAME} + + + ${installer:sys.contentDir}/${compiler:EXECUTABLE_NAME} + + + + + ${compiler:JALVIEW_DIR}/${compiler:WINDOWS_ICONS_FILE} + + + ${compiler:JALVIEW_NAME} + + + ${compiler:JALVIEW_DIR}/${compiler:PNG_ICON_FILE} + + + + !context.getBooleanVariable("sys.programGroupDisabled") + + + + + ${compiler:JALVIEW_APPLICATION_NAME} + + + ${installer:sys.contentDir}/${compiler:EXECUTABLE_NAME} + + + ${compiler:JALVIEW_APPLICATION_NAME} + + + ${compiler:JALVIEW_DIR}/${compiler:PNG_ICON_FILE} + + + + + ${compiler:JALVIEW_DIR}/${compiler:WINDOWS_ICONS_FILE} + + + + context.getBooleanVariable("createDesktopLinkAction") + + + + + + ${compiler:JALVIEW_APPLICATION_NAME}.app + + + + context.getBooleanVariable("addToDockAction") + + + + + + ${compiler:WRAPPER_SCRIPT_BIN_DIR}/${compiler:BASH_WRAPPER_SCRIPT} + + + + + ${compiler:WRAPPER_SCRIPT_BIN_DIR}/${compiler:WRAPPER_LINK} + + + + Util.isLinux() || Util.isUnixInstaller() || Util.isMacOS() + + + + + ${installer:sys.contentDir}\${compiler:WRAPPER_SCRIPT_BIN_DIR} + Path + + context.getBooleanVariable("appendToPathAction") + + + + + + ${installer:sys.contentDir}/${compiler:WRAPPER_SCRIPT_BIN_DIR}/${compiler:BASH_WRAPPER_SCRIPT} + + + + + ${installer:unixUserBinDir}/${compiler:WRAPPER_LINK} + + + + context.getBooleanVariable("makeSymbolicLinkAction") && ( Util.isLinux() || Util.isUnixInstaller() ) && ( context.getVariable("unixUserBinDir") != null ) + + + + + + ${installer:macWrapperLinkLocation} + + + + + ${installer:unixUserBinDir}/${compiler:WRAPPER_LINK} + + + + context.getBooleanVariable("makeSymbolicLinkAction") && Util.isMacOS() && ( context.getVariable("unixUserBinDir") != null ) && ( context.getVariable("macWrapperLinkLocation") != null ) + + + + + + ${form:finishedMessage} + + + + + ${i18n:CreateDesktopIcon} + + createDesktopLinkAction + + !Util.isMacOS() + + + + ${i18n:AddToDock} + + addToDockAction + + Util.isMacOS() + + + + Add ${compiler:JALVIEW_APPLICATION_NAME}'s bin folder to the Path environment variable + + appendToPathAction + + Util.isWindows() + + + + Make a ${compiler:WRAPPER_LINK} symbolic link in ${installer:unixUserBinDir} + + makeSymbolicLinkAction + + ( Util.isLinux() || Util.isUnixInstaller() || ( Util.isMacOS() && ( context.getVariable("macWrapperLinkLocation") != null ) ) ) && ( context.getVariable("unixUserBinDir") != null ) + + + + + + + + ${i18n:UninstallerMenuEntry(${compiler:sys.fullName})} + + + + + + + + + + 255 + 255 + 255 + 255 + + + 49 + 52 + 53 + 255 + + + + + + + + + + + 192 + 192 + 192 + 255 + + + + + + ${compiler:JALVIEW_DIR}/${compiler:BACKGROUND} + + + + + 5 + 10 + 10 + 10 + + + + + imageAnchor + imageEdgeBackgroundColor + imageFile + + + + + + + + + + + + + + + + + + ${form:welcomeMessage} + + !context.isConsole() + + + + + + String message = context.getMessage("ConfirmUninstall", context.getApplicationName()); +return console.askYesNo(message, true); + + + + + + + + + + + + + + + + + + + + + + + + + + jre + + + + + jre.jar + + + + + .install4j + + + + + getdown-launcher.jar + + + + + getdown-launcher-old.jar + + + + + getdown-launcher-new.jar + + + + + gettingdown.lock + + + + + jre.zip + + + + + digest.txt + + + + + digest2.txt + + + + + getdown-launcher.jarv + + + + + getdown-launcher-new.jarv + + + + + launcher.log + + + + + proxy.txt + + + + + build_properties + + + + + channel_launch*.jvl + + + + + jalview*.jvl + + + + + *.jarv + + + + + *.log + + + + + *.txt + + + + + *_new + + + + + hs_err_*.* + + + + + ${compiler:GETDOWN_DIST_DIR} + + + + + ${compiler:GETDOWN_ALT_DIR} + + + + + ${compiler:GETDOWN_RESOURCE_DIR} + + + + + META-INF + + + + + install + + + + + resource + + + + + dist + + + + + release + + + + + alt + + + + + dev + + + + + build + + + + + alt_* + + + + + dev_* + + + + + build_* + + + + + ${compiler:WRAPPER_SCRIPT_BIN_DIR} + + + + + bin + + + + + channel.props + + + + + channel.propsv + + + + + + + + + + + + + + + + ${i18n:UninstallerPreparing} + + + + + + + + + + ${form:successMessage} + + + + + + + + + + + . + + + ${compiler:WRAPPER_LINK}_setup + ${compiler:sys.fullName} + + + + + + + + + + + + + + Running ${i18n:SetupAppTitle} + + + + + + + + + ${i18n:FinishedLabel(${compiler:JALVIEW_APPLICATION_NAME})} + + + + + ${i18n:AddToDock} + + addToDockAction + + Util.isMacOS() + + + + Make a ${compiler:WRAPPER_LINK} symbolic link in ${installer:unixUserBinDir} + + makeSymbolicLinkAction + + ( Util.isLinux() || Util.isUnixInstaller() || ( Util.isMacOS() && ( context.getVariable("macWrapperLinkLocation") != null ) ) ) && ( context.getVariable("unixUserBinDir") != null ) + + + + +${i18n:ClickFinish} + +${compiler:JALVIEW_APPLICATION_NAME} will now launch. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +