From: Ben Soares Date: Tue, 26 Oct 2021 17:16:12 +0000 (+0100) Subject: JAL-3830 Added steps for install4j9 to create macOS symbolic link to wrapper script... X-Git-Tag: Release_2_11_2_1~73 X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=commitdiff_plain;h=27d1f0e6032bb93b39aeaad7a0b6566dd53d75e4 JAL-3830 Added steps for install4j9 to create macOS symbolic link to wrapper script (link) at /Applications/Jalview.app/Contents/MacOS/jalview and to add icon to Dock --- diff --git a/gradle.properties b/gradle.properties index d0fb57d..95b1299 100644 --- a/gradle.properties +++ b/gradle.properties @@ -113,12 +113,12 @@ flexmark_css = utils/doc/github.css channel_properties_dir = utils/channels -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/install4j/install4j9_template.install4j b/utils/install4j/install4j9_template.install4j new file mode 100644 index 0000000..7b8d000 --- /dev/null +++ b/utils/install4j/install4j9_template.install4j @@ -0,0 +1,1447 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + *.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 + + + + + Finished creating file associations + + + + + + + + + + + + + + 737 + jalview + + + + + 737 + jalviews + + + + + 737 + ${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("makeSymbolicLink") && ( Util.isLinux() || Util.isUnixInstaller() ) && ( context.getVariable("unixUserBinDir") != null ) + + + + + + ${installer:macWrapperLinkLocation} + + + + + ${installer:unixUserBinDir}/${compiler:WRAPPER_LINK} + + + + context.getBooleanVariable("makeSymbolicLink") && ( Util.isMacOS() ) && ( context.getVariable("unixUserBinDir") != null ) && ( context.getVariable("macWrapperLinkLocation") != null ) + + + + + + ${form:finishedMessage} + + + + + ${i18n:CreateDesktopIcon} + + createDesktopLinkAction + + + + + ${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} + + makeSymbolicLink + + ( Util.isLinux() || Util.isUnixInstaller() ) && ( 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} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +