From: Ben Soares Date: Thu, 13 Jun 2024 20:20:06 +0000 (+0100) Subject: JAL-3631 New Installer icons. Getdown check that the application appdir is different... X-Git-Tag: Release_2_11_4_0~24^2~41 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=0112f6d85c67b26ed08a03d71a16fecddfba4b3f;p=jalview.git JAL-3631 New Installer icons. Getdown check that the application appdir is different from the user default appdir before copying files. Also copy gedown-launcher.jar. --- diff --git a/build.gradle b/build.gradle index 7a14a67..52ab39f 100644 --- a/build.gradle +++ b/build.gradle @@ -3004,6 +3004,9 @@ task installerFiles(type: com.install4j.gradle.Install4jTask) { 'MACOSARCHIVE_X64_DMG_FILENAME': install4jmacOSArchiveX64DMGFilename, 'MACOSARCHIVE_AARCH64_DMG_FILENAME': install4jmacOSArchiveAarch64DMGFilename, 'MACOSARCHIVE_VOLUMEICON': install4jDMGVolumeIcon, + 'INSTALLER_ICON': "${install4j_images_dir}/${install4j_installer_icon}", + 'INSTALLER_MAC_ICON': "${install4j_images_dir}/${install4j_installer_mac_icon}", + 'INSTALLER_WINDOWS_ICON': "${install4j_images_dir}/${install4j_installer_windows_icon}", ] def varNameMap = [ diff --git a/getdown/lib/getdown-core.jar b/getdown/lib/getdown-core.jar index 6c20166..9b85916 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 02d1a13..de59d8c 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 7862c28..8edc9c5 100644 Binary files a/getdown/lib/getdown-launcher.jar and b/getdown/lib/getdown-launcher.jar differ 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 52876f0..7819ea6 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 @@ -1086,8 +1086,10 @@ public class Application log.info("Not setting proxy"); } - // add the getdowninstanceappbase property. getdownappdir is added by getdown.txt + // add the getdowninstanceappbase property. args.add("-Dgetdowninstanceappbase=" + getAppbase().toString()); + args.add("-Dinstaller.appdir=" + System.getProperty("installer.appdir")); + args.add("-Dgetdownappdir=" + getAppDir()); // add the marker indicating the app is running in getdown args.add("-D" + Properties.GETDOWN + "=true"); @@ -2074,6 +2076,16 @@ public class Application } File applicationAppDir = new File(applicationAppDirName); File userAppDir = new File(userAppDirName); + try { + if (applicationAppDir.getCanonicalPath().equals(userAppDir.getCanonicalPath())) { + // the application appdir is the user appdir, better not touch it, it should just work! + log.info("Application appdir is same as user appdir, not doing anything", applicationAppDir); + return true; + } + } catch (IOException e) { + log.warning("Problem determining canonical paths of application and user appdirs", applicationAppDir, userAppDir); + return false; + } if (!userAppDir.exists()) { userAppDir.mkdirs(); } @@ -2117,8 +2129,9 @@ public class Application log.warning("Problem opening application digest files", new File(applicationAppDir, Digest.digestFile(Digest.VERSION))); return false; } - // copy getdown.txt, digest.txt and digest2.txt - for (File from: new File[] {configFile, digest2.getFile(), digest.getFile()}) { + // copy getdown.txt, digest.txt and digest2.txt, getdown-launcher.jar + File getdownLauncher = new File(applicationAppDir, "getdown-launcher.jar"); + for (File from: new File[] {configFile, digest2.getFile(), digest.getFile(), getdownLauncher}) { try { File to = new File(userAppDir, from.getName()); Files.copy(from.toPath(), to.toPath()); diff --git a/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/EnvConfig.java b/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/EnvConfig.java index 6f99851..07d29ec 100644 --- a/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/EnvConfig.java +++ b/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/EnvConfig.java @@ -60,9 +60,12 @@ public final class EnvConfig { public static EnvConfig create (String[] argv, List notes) { System.out.println("##### out Starting EnvConfig.create()"); System.err.println("##### err Starting EnvConfig.create()"); - String appDir = null, appDirProv = null; - String appId = null, appIdProv = null; - String appBase = null, appBaseProv = null; + String appDir = null; + String appDirProv = null; + String appId = null; + String appIdProv = null; + String appBase = null; + String appBaseProv = null; applicationFolder = System.getProperty("installer.application_folder"); installerAppdir = System.getProperty("installer.appdir"); appName = System.getProperty("channel.app_name"); @@ -303,7 +306,7 @@ public final class EnvConfig { private static final String USE_DEFAULT_APPDIR_PROPERTY = "usedefaultappdir"; - private static final String APPLICATION_APPDIR_PROPERTY = "applicationappdir"; + private static final String APPLICATION_APPDIR_PROPERTY = "installer.appdir"; private static final String POPULATE_DEFAULT_APPDIR_PROPERTY= "populatedefaultappdir"; } diff --git a/gradle.properties b/gradle.properties index 8891190..448cbdd 100644 --- a/gradle.properties +++ b/gradle.properties @@ -156,6 +156,9 @@ install4j_dmg_background_filename = background.png install4j_dmg_ds_store = jalview_dmg_DS_Store install4j_dmg_ds_store_json = jalview_dmg_DS_Store.json install4j_dmg_volume_icon = jalview-VolumeIcon.icns +install4j_installer_icon = jalview_installer.png +install4j_installer_mac_icon = jalview_installer.icns +install4j_installer_windows_icon = jalview_installer.ico jalview_customise_ds_store = utils/macos_dmg/jalview_customise_dsstore.py diff --git a/j11lib/getdown-core.jar b/j11lib/getdown-core.jar index 6c20166..9b85916 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 6c20166..9b85916 100644 Binary files a/j8lib/getdown-core.jar and b/j8lib/getdown-core.jar differ diff --git a/resources/lang/Messages.properties b/resources/lang/Messages.properties index 293f612..7af6c7f 100644 --- a/resources/lang/Messages.properties +++ b/resources/lang/Messages.properties @@ -1484,3 +1484,5 @@ warning.using_old_command_line_arguments = It looks like you are using old comma warning.using_mixed_command_line_arguments = Jalview cannot use both old (-arg) and new (--arg) command line arguments. Please check your command line arguments.\ne.g. {0} and {1} warning.the_following_errors = The following errors and warnings occurred whilst processing files: action.show_hetatm = Show Ligands (HETATM) +warning.running_from_installer_volume_title = Running from Installer +warning.running_from_installer_volume_message = You appear to be launching {0} from the Installer volume.\nPlease drag and drop the "{0}" icon into the Applications folder or your user Applications folder, and launch from there. diff --git a/resources/lang/Messages_es.properties b/resources/lang/Messages_es.properties index 4936d33..a8ac583 100644 --- a/resources/lang/Messages_es.properties +++ b/resources/lang/Messages_es.properties @@ -1448,3 +1448,5 @@ label.command_line_arguments = Argumentos de l warning.using_old_command_line_arguments = Parece que estás utilizando argumentos antiguos de línea de comando. Estos ahora están en desuso y se eliminarán en una versión futura de Jalview.\nObtenga más información sobre los nuevos argumentos de la línea de comando en\n warning.using_mixed_command_line_arguments = Jalview no puede utilizar argumentos de línea de comando antiguos (-arg) y nuevos (--arg). Verifique los argumentos de su línea de comando.\ne.g. {0} y {1} warning.the_following_errors = Se produjeron los siguientes errores y advertencias al procesar archivos: +warning.running_from_installer_volume_title = Ejecutando desde el instalador +warning.running_from_installer_volume_message = Parece que está iniciando {0} desde el Volumen del instalador.\nArrastre y suelte el ícono "{0}" en la carpeta Aplicaciones o en la carpeta Aplicaciones de su usuario e inícielo desde allí. diff --git a/utils/channels/default/channel_gradle.properties b/utils/channels/default/channel_gradle.properties index 2b698ba..cfb5ab0 100644 --- a/utils/channels/default/channel_gradle.properties +++ b/utils/channels/default/channel_gradle.properties @@ -20,6 +20,9 @@ install4j_background = jalview_logo_background_fade-640x480.png install4j_dmg_background = jalview_default_dmg_background-72dpi.png install4j_dmg_ds_store = jalview_default_dmg_DS_Store install4j_dmg_ds_store_json = jalview_default_dmg_DS_Store.json +install4j_installer_icon = jalview_installer.png +install4j_installer_mac_icon = jalview_installer.icns +install4j_installer_windows_icon = jalview_installer.ico getdown_background_image_text_font = utils/fonts/Roboto.ttf getdown_background_image_text_colour = #b4b4b4 diff --git a/utils/channels/default/images/jalview_installer.icns b/utils/channels/default/images/jalview_installer.icns new file mode 100644 index 0000000..f1588b4 Binary files /dev/null and b/utils/channels/default/images/jalview_installer.icns differ diff --git a/utils/channels/default/images/jalview_installer.ico b/utils/channels/default/images/jalview_installer.ico new file mode 100644 index 0000000..69687f2 Binary files /dev/null and b/utils/channels/default/images/jalview_installer.ico differ diff --git a/utils/channels/default/images/jalview_installer.png b/utils/channels/default/images/jalview_installer.png new file mode 100644 index 0000000..231137e Binary files /dev/null and b/utils/channels/default/images/jalview_installer.png differ diff --git a/utils/channels/develop-SUFFIX/channel_gradle.properties b/utils/channels/develop-SUFFIX/channel_gradle.properties index 84e84bf..b39dc99 100644 --- a/utils/channels/develop-SUFFIX/channel_gradle.properties +++ b/utils/channels/develop-SUFFIX/channel_gradle.properties @@ -32,6 +32,9 @@ install4j_dmg_background = jalview_develop_dmg_background-72dpi.png install4j_dmg_ds_store = jalview_develop_dmg_DS_Store install4j_dmg_ds_store_json = jalview_develop_dmg_DS_Store.json install4j_dmg_volume_icon = jalview_develop-VolumeIcon.icns +install4j_installer_icon = jalview_develop_installer.png +install4j_installer_mac_icon = jalview_develop_installer.icns +install4j_installer_windows_icon = jalview_develop_installer.ico getdown_background_image_text_font = utils/fonts/Roboto.ttf getdown_background_image_text_colour = #b4b4b4 diff --git a/utils/channels/develop-SUFFIX/images/jalview_develop_installer.icns b/utils/channels/develop-SUFFIX/images/jalview_develop_installer.icns new file mode 100644 index 0000000..4e61d8a Binary files /dev/null and b/utils/channels/develop-SUFFIX/images/jalview_develop_installer.icns differ diff --git a/utils/channels/develop-SUFFIX/images/jalview_develop_installer.ico b/utils/channels/develop-SUFFIX/images/jalview_develop_installer.ico new file mode 100644 index 0000000..cbdee6f Binary files /dev/null and b/utils/channels/develop-SUFFIX/images/jalview_develop_installer.ico differ diff --git a/utils/channels/develop-SUFFIX/images/jalview_develop_installer.png b/utils/channels/develop-SUFFIX/images/jalview_develop_installer.png new file mode 100644 index 0000000..99b15da Binary files /dev/null and b/utils/channels/develop-SUFFIX/images/jalview_develop_installer.png differ diff --git a/utils/channels/develop/channel_gradle.properties b/utils/channels/develop/channel_gradle.properties index 80e64d1..2c152d0 100644 --- a/utils/channels/develop/channel_gradle.properties +++ b/utils/channels/develop/channel_gradle.properties @@ -32,6 +32,9 @@ install4j_dmg_background = jalview_develop_dmg_background-72dpi.png install4j_dmg_ds_store = jalview_develop_dmg_DS_Store install4j_dmg_ds_store_json = jalview_develop_dmg_DS_Store.json install4j_dmg_volume_icon = jalview_develop-VolumeIcon.icns +install4j_installer_icon = jalview_develop_installer.png +install4j_installer_mac_icon = jalview_develop_installer.icns +install4j_installer_windows_icon = jalview_develop_installer.ico getdown_background_image_text_font = utils/fonts/Roboto.ttf getdown_background_image_text_colour = #b4b4b4 diff --git a/utils/channels/develop/images/jalview_develop_installer.icns b/utils/channels/develop/images/jalview_develop_installer.icns new file mode 100644 index 0000000..4e61d8a Binary files /dev/null and b/utils/channels/develop/images/jalview_develop_installer.icns differ diff --git a/utils/channels/develop/images/jalview_develop_installer.ico b/utils/channels/develop/images/jalview_develop_installer.ico new file mode 100644 index 0000000..cbdee6f Binary files /dev/null and b/utils/channels/develop/images/jalview_develop_installer.ico differ diff --git a/utils/channels/develop/images/jalview_develop_installer.png b/utils/channels/develop/images/jalview_develop_installer.png new file mode 100644 index 0000000..99b15da Binary files /dev/null and b/utils/channels/develop/images/jalview_develop_installer.png differ diff --git a/utils/channels/develop/images/jalview_develop_logo.icns b/utils/channels/develop/images/jalview_develop_logo.icns index ceab689..42e8429 100644 Binary files a/utils/channels/develop/images/jalview_develop_logo.icns and b/utils/channels/develop/images/jalview_develop_logo.icns differ diff --git a/utils/channels/release/channel_gradle.properties b/utils/channels/release/channel_gradle.properties index d5baac1..27fc1a4 100644 --- a/utils/channels/release/channel_gradle.properties +++ b/utils/channels/release/channel_gradle.properties @@ -21,6 +21,9 @@ install4j_dmg_background = jalview_dmg_background-72dpi.png install4j_dmg_ds_store = jalview_dmg_DS_Store install4j_dmg_ds_store_json = jalview_dmg_DS_Store.json install4j_dmg_volume_icon = jalview-VolumeIcon.icns +install4j_installer_icon = jalview_installer.png +install4j_installer_mac_icon = jalview_installer.icns +install4j_installer_windows_icon = jalview_installer.ico getdown_background_image_text_font = utils/fonts/Roboto.ttf getdown_background_image_text_colour = #b4b4b4 diff --git a/utils/channels/release/images/jalview_installer.icns b/utils/channels/release/images/jalview_installer.icns new file mode 100644 index 0000000..f1588b4 Binary files /dev/null and b/utils/channels/release/images/jalview_installer.icns differ diff --git a/utils/channels/release/images/jalview_installer.ico b/utils/channels/release/images/jalview_installer.ico new file mode 100644 index 0000000..69687f2 Binary files /dev/null and b/utils/channels/release/images/jalview_installer.ico differ diff --git a/utils/channels/release/images/jalview_installer.png b/utils/channels/release/images/jalview_installer.png new file mode 100644 index 0000000..231137e Binary files /dev/null and b/utils/channels/release/images/jalview_installer.png differ diff --git a/utils/channels/test-release/channel_gradle.properties b/utils/channels/test-release/channel_gradle.properties index a7d18cb..f0c8e2a 100644 --- a/utils/channels/test-release/channel_gradle.properties +++ b/utils/channels/test-release/channel_gradle.properties @@ -21,6 +21,9 @@ install4j_dmg_background = jalview_test-release_dmg_background-72dpi.png install4j_dmg_ds_store = jalview_test-release_dmg_DS_Store install4j_dmg_ds_store_json = jalview_test-release_dmg_DS_Store.json install4j_dmg_volume_icon = jalview_test-release-VolumeIcon.icns +install4j_installer_icon = jalview_installer.png +install4j_installer_mac_icon = jalview_installer.icns +install4j_installer_windows_icon = jalview_installer.ico getdown_background_image_text_font = utils/fonts/Roboto.ttf getdown_background_image_text_colour = #b4b4b4 diff --git a/utils/channels/test-release/images/jalview_installer.icns b/utils/channels/test-release/images/jalview_installer.icns new file mode 100644 index 0000000..f1588b4 Binary files /dev/null and b/utils/channels/test-release/images/jalview_installer.icns differ diff --git a/utils/channels/test-release/images/jalview_installer.ico b/utils/channels/test-release/images/jalview_installer.ico new file mode 100644 index 0000000..69687f2 Binary files /dev/null and b/utils/channels/test-release/images/jalview_installer.ico differ diff --git a/utils/channels/test-release/images/jalview_installer.png b/utils/channels/test-release/images/jalview_installer.png new file mode 100644 index 0000000..231137e Binary files /dev/null and b/utils/channels/test-release/images/jalview_installer.png differ diff --git a/utils/install4j/install4j10_template.install4j b/utils/install4j/install4j10_template.install4j index 3a33039..08d9b1c 100644 --- a/utils/install4j/install4j10_template.install4j +++ b/utils/install4j/install4j10_template.install4j @@ -72,6 +72,9 @@ + + + @@ -145,7 +148,7 @@ - + @@ -167,8 +170,8 @@ - - + + @@ -177,7 +180,7 @@ - + @@ -202,11 +205,12 @@ - + - - + + + @@ -273,12 +277,73 @@ + + + + + + + 255 + 255 + 255 + 255 + + + 49 + 52 + 53 + 255 + + + + + + + + + + + + + icon:${installer:sys.installerApplicationMode}_header.png + + + + + 0 + 5 + 1 + 1 + + + + + 0 + 20 + 0 + 10 + + + + + backgroundColor + foregroundColor + imageAnchor + imageFile + imageOverlap + + + + ${compiler:file("${compiler:INFO_PLIST_FILE_ASSOCIATIONS_FILE}")} + + + @@ -742,7 +807,7 @@ return console.askOkCancel(message, true); context.getBooleanVariable("addToDockAction") - + @@ -765,7 +830,7 @@ return console.askOkCancel(message, true); context.getBooleanVariable("appendToPathAction") - + @@ -778,7 +843,7 @@ return console.askOkCancel(message, true); - context.getBooleanVariable("makeSymbolicLinkAction") && ( Util.isLinux() || Util.isUnixInstaller() ) && ( context.getVariable("unixUserBinDir") != null ) + context.getBooleanVariable("makeUserSymbolicLinkAction") && ( Util.isLinux() || Util.isUnixInstaller() ) && ( context.getVariable("unixUserBinDir") != null ) @@ -793,7 +858,7 @@ return console.askOkCancel(message, true); - context.getBooleanVariable("makeSymbolicLinkAction") && Util.isMacOS() && ( context.getVariable("unixUserBinDir") != null ) && ( context.getVariable("macWrapperLinkLocation") != null ) + context.getBooleanVariable("makeUserSymbolicLinkAction") && Util.isMacOS() && ( context.getVariable("unixUserBinDir") != null ) && ( context.getVariable("macWrapperLinkLocation") != null ) @@ -864,7 +929,7 @@ return console.askOkCancel(message, true); Make a ${compiler:WRAPPER_LINK} symbolic link in ${installer:unixUserBinDir} - makeSymbolicLinkAction + makeUserSymbolicLinkAction ( Util.isLinux() || Util.isUnixInstaller() || ( Util.isMacOS() && ( context.getVariable("macWrapperLinkLocation") != null ) ) ) && ( context.getVariable("unixUserBinDir") != null ) @@ -1255,9 +1320,17 @@ return console.askYesNo(message, true); Make a ${compiler:WRAPPER_LINK} symbolic link in ${installer:unixUserBinDir} - makeSymbolicLinkAction + makeUserSymbolicLinkAction - ( Util.isLinux() || Util.isUnixInstaller() || ( Util.isMacOS() && ( context.getVariable("macWrapperLinkLocation") != null ) ) ) && ( context.getVariable("unixUserBinDir") != null ) + + +( Util.isLinux() + || Util.isUnixInstaller() + || ( Util.isMacOS() + && context.getVariable("macWrapperLinkLocation") != null + ) + ) + && context.getVariable("unixUserBinDir") != null @@ -1524,7 +1597,7 @@ ${compiler:JALVIEW_APPLICATION_NAME} will now launch. - + @@ -1539,6 +1612,9 @@ ${compiler:JALVIEW_APPLICATION_NAME} will now launch. + + + @@ -1557,6 +1633,9 @@ ${compiler:JALVIEW_APPLICATION_NAME} will now launch. + + +