From: Ben Soares Date: Wed, 24 Mar 2021 01:49:24 +0000 (+0000) Subject: JAL-3830 Moved wrappers to bin/jalview.* and make a symlink bin/jalview. Install4j... X-Git-Tag: Release_2_11_2_0~52 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=9e7c315c6ac828989a2d7f49dcb7e451f38df9ff;p=jalview.git JAL-3830 Moved wrappers to bin/jalview.* and make a symlink bin/jalview. Install4j script now jalviewg --- diff --git a/build.gradle b/build.gradle index bea9951..e6c8fbd 100644 --- a/build.gradle +++ b/build.gradle @@ -204,7 +204,7 @@ ext { install4jDMGDSStore = "${install4j_images_dir}/${install4j_dmg_ds_store}" install4jDMGBackgroundImage = "${install4j_images_dir}/${install4j_dmg_background}" install4jInstallerName = "${jalview_name} Non-Release Installer" - install4jExecutableName = jalview_name.replaceAll("[^\\w]+", "_").toLowerCase() + install4jExecutableName = install4j_executable_name install4jExtraScheme = "jalviewx" install4jMacIconsFile = string("${install4j_images_dir}/${install4j_mac_icons_file}") install4jWindowsIconsFile = string("${install4j_images_dir}/${install4j_windows_icons_file}") @@ -1575,13 +1575,13 @@ task getdownWebsite() { def getdownWrapperScripts = [ getdown_bash_wrapper_script, getdown_powershell_wrapper_script ] getdownWrapperScripts.each{ script -> - def s = file( "${jalviewDir}/utils/getdown/${script}" ) + def s = file( "${jalviewDir}/utils/getdown/${getdown_wrapper_script_dir}/${script}" ) if (s.exists()) { copy { from s - into getdownWebsiteDir + into "${getdownWebsiteDir}/${getdown_wrapper_script_dir}" } - getdownTextString += "resource = ${script}\n" + getdownTextString += "resource = ${getdown_wrapper_script_dir}/${script}\n" } } @@ -1912,8 +1912,10 @@ task installers(type: com.install4j.gradle.Install4jTask) { 'WINDOWS_APPLICATION_ID': install4jWinApplicationId, 'MACOS_DMG_DS_STORE': install4jDMGDSStore, 'MACOS_DMG_BG_IMAGE': install4jDMGBackgroundImage, - 'MACOS_DMG_WRAPPER_LINK': getdown_bash_wrapper_script, - 'MACOS_WRAPPER_SCRIPT': getdown_bash_wrapper_script, + 'WRAPPER_LINK': getdown_wrapper_link, + 'BASH_WRAPPER_SCRIPT': getdown_bash_wrapper_script, + 'POWERSHELL_WRAPPER_SCRIPT': getdown_powershell_wrapper_script, + 'WRAPPER_SCRIPT_BIN_DIR': getdown_wrapper_script_dir, 'INSTALLER_NAME': install4jInstallerName, 'INSTALL4J_UTILS_DIR': install4j_utils_dir, 'GETDOWN_WEBSITE_DIR': getdown_website_dir, @@ -1963,7 +1965,7 @@ task installers(type: com.install4j.gradle.Install4jTask) { println("Using projectFile "+projectFile) if (!disableNotarization) { println("Will notarize OSX App DMG") } } - verbose=true + //verbose=true inputs.dir(getdownWebsiteDir) inputs.file(install4jConfFile) diff --git a/gradle.properties b/gradle.properties index ba87a6c..9e7d8da 100644 --- a/gradle.properties +++ b/gradle.properties @@ -123,6 +123,7 @@ 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 install4j_build_dir = build/install4j +install4j_executable_name = jalviewg install4j_media_types = windows,macosArchive,unixArchive,unixInstaller install4j_faster = false install4j_application_categories = Science;Biology;Java; @@ -133,8 +134,10 @@ install4j_png_icon_file = jalview_logo.png install4j_background = jalview_logo_background_fade-640x480.png install4j_dmg_background = jalview_dmg_background-NON-RELEASE.png install4j_dmg_ds_store = jalview_dmg_DS_Store -getdown_bash_wrapper_script = jalviewc -getdown_powershell_wrapper_script = jalviewc.ps1 +getdown_wrapper_script_dir = bin +getdown_wrapper_link = jalview +getdown_bash_wrapper_script = jalview.sh +getdown_powershell_wrapper_script = jalview.ps1 OSX_KEYSTORE = OSX_KEYPASS = diff --git a/utils/getdown/jalviewc.ps1 b/utils/getdown/bin/jalview.ps1 similarity index 90% rename from utils/getdown/jalviewc.ps1 rename to utils/getdown/bin/jalview.ps1 index 0a5802b..b84e275 100755 --- a/utils/getdown/jalviewc.ps1 +++ b/utils/getdown/bin/jalview.ps1 @@ -18,7 +18,7 @@ if ( $IsWindows -eq $null ) { # parent dir of this script (should be the getdown app dir). Follow symlinks. $TARGET = ( Get-Item $MyInvocation.MyCommand.Path ).Target -$DIR = If ( $TARGET -eq $null -or $TARGET.LinkType -ne "SymbolicLink" ) { Split-Path $MyInvocation.MyCommand.Path -Parent } Else { Split-Path $TARGET -Parent } +$DIR = If ( $TARGET -eq $null -or $TARGET.LinkType -ne "SymbolicLink" ) { Split-Path -Path $MyInvocation.MyCommand.Path -Parent } Else { Split-Path -Path $TARGET -Parent } # set the "-open" parameter if myArg1 is non-zero-length, and not "open" or starts with a "-" $OPEN = "" @@ -26,7 +26,7 @@ if ( $myArg1.length -gt 0 -and ( -not $myArg1.StartsWith("-") ) -and $myArg1 -cn $OPEN = "-open" } -$APPDIR = $DIR +$APPDIR = If ( ( Split-Path -Path $DIR -Leaf ) -eq "bin" ) { Split-Path -Path $DIR -Parent } Else { $DIR } $JAVAEXE = If ( $myIsWindows ) { "java.exe" } Else { "java" } $JAVA = Join-Path -Path $APPDIR -ChildPath ( "jre/" + $( If ( $myIsMacOS ) { "Contents/Home/" } Else { "" } ) + "bin/${JAVAEXE}" ) $GETDOWNTXT = Join-Path -Path $APPDIR -ChildPath "getdown.txt" diff --git a/utils/getdown/jalviewc b/utils/getdown/bin/jalview.sh similarity index 99% rename from utils/getdown/jalviewc rename to utils/getdown/bin/jalview.sh index 08c5494..112c3e6 100755 --- a/utils/getdown/jalviewc +++ b/utils/getdown/bin/jalview.sh @@ -53,7 +53,7 @@ if [ "${ISMACOS}" = 1 ]; then else # NOT MACOS DIR="$(dirname "$(readlink -f "$0")")" - APPDIR="${DIR}" + APPDIR="${DIR%/bin}" JAVA="${APPDIR}/jre/bin/java" fi diff --git a/utils/install4j/install4j8_template.install4j b/utils/install4j/install4j8_template.install4j index f81bab8..60366b3 100644 --- a/utils/install4j/install4j8_template.install4j +++ b/utils/install4j/install4j8_template.install4j @@ -1,6 +1,6 @@ - - + + @@ -34,9 +34,11 @@ - - - + + + + + @@ -55,6 +57,7 @@ + @@ -106,13 +109,11 @@ - - + - - + @@ -532,6 +533,20 @@ return console.askOkCancel(message, true); + + + + + ${compiler:WRAPPER_SCRIPT_BIN_DIR}/${compiler:LINK_TO_WRAPPER_SCRIPT} + + + + + ${compiler:WRAPPER_SCRIPT_BIN_DIR}/${compiler:WRAPPER_LINK} + + + + @@ -713,7 +728,7 @@ return console.askYesNo(message, true); - + jre @@ -896,22 +911,12 @@ return console.askYesNo(message, true); - jalviewc + ${compiler:WRAPPER_SCRIPT_BIN_DIR} - jalviewc.ps1 - - - - - jalviewcv - - - - - jalviewc.ps1v + bin @@ -1187,6 +1192,9 @@ return console.askYesNo(message, true); + + + @@ -1200,13 +1208,16 @@ return console.askYesNo(message, true); + + + - + @@ -1223,6 +1234,9 @@ return console.askYesNo(message, true); + + + @@ -1239,6 +1253,9 @@ return console.askYesNo(message, true); + + + @@ -1255,6 +1272,9 @@ return console.askYesNo(message, true); + + +