From f12e4cd5527bf57c2ce97e6328b18afc0468cd26 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Fri, 21 Jul 2023 16:35:39 +0300 Subject: [PATCH 26/26] installer_cross: Add ruledit gui type to registry key name Also to default install directory name See osdn #48431 Signed-off-by: Marko Lindqvist --- .../installer_cross/create-freeciv-gtk-qt-nsi.sh | 2 +- .../create-freeciv-ruledit-nsi.sh | 16 +++++++++------- .../windows/installer_cross/installer_build.sh | 6 +++--- .../installer_cross/meson-installer_build.sh | 8 ++++---- 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/platforms/windows/installer_cross/create-freeciv-gtk-qt-nsi.sh b/platforms/windows/installer_cross/create-freeciv-gtk-qt-nsi.sh index 4f0a0a2fe1..e3b04494f9 100755 --- a/platforms/windows/installer_cross/create-freeciv-gtk-qt-nsi.sh +++ b/platforms/windows/installer_cross/create-freeciv-gtk-qt-nsi.sh @@ -1,6 +1,6 @@ #!/bin/sh -# ./create-freeciv-gtk-qt-nsi.sh [mp gui] [exe id] [uninstall setup script] +# ./create-freeciv-gtk-qt-nsi.sh [mp gui] [exe id] [uninstall setup script] if test "$8" != "" ; then EXE_ID="$8" diff --git a/platforms/windows/installer_cross/create-freeciv-ruledit-nsi.sh b/platforms/windows/installer_cross/create-freeciv-ruledit-nsi.sh index 5e23a67ac8..56c60adcb6 100755 --- a/platforms/windows/installer_cross/create-freeciv-ruledit-nsi.sh +++ b/platforms/windows/installer_cross/create-freeciv-ruledit-nsi.sh @@ -1,6 +1,6 @@ #!/bin/sh -# ./create-freeciv-ruledit.sh +# ./create-freeciv-ruledit.sh ARCH_KEY_PART="crs" ARCH_INST_PART="-crs" @@ -14,13 +14,15 @@ SetCompressor /SOLID lzma !define APPNAME "Freeciv-ruledit" !define VERSION $3 -!define WIN_ARCH $4 +!define GUI_ID $4 +!define GUI_NAME $5 +!define WIN_ARCH $6 !define ARCH_KEY_PART ${ARCH_KEY_PART} !define ARCH_INST_PART ${ARCH_INST_PART} !define KEYROOT "Freeciv" -!define APP_KEY_PART "ruledit" +!define APP_KEY_PART "ruledit-\${GUI_ID}" -!define APPID "\${APPNAME}-\${VERSION}\${ARCH_INST_PART}" +!define APPID "\${APPNAME}-\${VERSION}\${ARCH_INST_PART}-\${GUI_ID}" !define MULTIUSER_EXECUTIONLEVEL Highest !define MULTIUSER_MUI @@ -30,7 +32,7 @@ SetCompressor /SOLID lzma !define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_VALUENAME "" !define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_KEY "Software\\\${KEYROOT}\\\${VERSION}\\\${ARCH_KEY_PART}\\\${APP_KEY_PART}" !define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_VALUENAME "" -!define MULTIUSER_INSTALLMODE_INSTDIR "\${APPNAME}-\${VERSION}\${ARCH_INST_PART}" +!define MULTIUSER_INSTALLMODE_INSTDIR "\${APPNAME}-\${VERSION}\${ARCH_INST_PART}-\${GUI_ID}" !include "MultiUser.nsh" !include "MUI2.nsh" @@ -38,8 +40,8 @@ SetCompressor /SOLID lzma ; General -Name "Freeciv Ruleset Editor \${VERSION}" -OutFile "$2/\${APPNAME}-\${VERSION}-\${WIN_ARCH}-setup.exe" +Name "Freeciv Ruleset Editor \${VERSION} (\${GUI_NAME})" +OutFile "$2/\${APPNAME}-\${VERSION}-\${WIN_ARCH}-\${GUI_ID}-setup.exe" ; Variables diff --git a/platforms/windows/installer_cross/installer_build.sh b/platforms/windows/installer_cross/installer_build.sh index 523412f2b1..2240b4a2ab 100755 --- a/platforms/windows/installer_cross/installer_build.sh +++ b/platforms/windows/installer_cross/installer_build.sh @@ -238,19 +238,19 @@ if ! mkdir -p autotools/output ; then fi if test "$GUI" = "ruledit" ; then - if ! cp freeciv-ruledit.cmd $INSTDIR/ + if ! cp freeciv-ruledit.cmd "${INSTDIR}/" then echo "Adding cmd-file failed!" >&2 exit 1 fi - if ! add_qt6_env $DLLSPATH $INSTDIR ; then + if ! add_qt6_env "${DLLSPATH}" "${INSTDIR}" ; then echo "Copying Qt6 environment failed!" >&2 exit 1 fi if ! ./create-freeciv-ruledit-nsi.sh \ - "$INSTDIR" "autotools/output" "$VERREV" "$SETUP" \ + "${INSTDIR}" "autotools/output" "${VERREV}" "qt6" "Qt6" "${SETUP}" \ > "${NSI_DIR}/ruledit-${SETUP}-${VERREV}.nsi" then exit 1 diff --git a/platforms/windows/installer_cross/meson-installer_build.sh b/platforms/windows/installer_cross/meson-installer_build.sh index 76e635e37b..dd90b399e6 100755 --- a/platforms/windows/installer_cross/meson-installer_build.sh +++ b/platforms/windows/installer_cross/meson-installer_build.sh @@ -207,12 +207,12 @@ if ! mkdir -p "$NSI_DIR" ; then fi if test "$GUI" = "ruledit" ; then - if ! cp freeciv-ruledit.cmd "$INSTDIR" + if ! cp freeciv-ruledit.cmd "${INSTDIR}/" then echo "Adding cmd-file failed!" >&2 exit 1 fi - if ! add_qt6_env "$DLLSPATH" "$INSTDIR" ; then + if ! add_qt6_env "${DLLSPATH}" "${INSTDIR}" ; then echo "Copying Qt6 environment failed!" >&2 exit 1 fi @@ -220,8 +220,8 @@ if test "$GUI" = "ruledit" ; then NSI_FILE="${NSI_DIR}/ruledit-${SETUP}-${VERREV}.nsi" if ! ./create-freeciv-ruledit-nsi.sh \ - "$INSTDIR" "meson/output" "$VERREV" "$SETUP" \ - > "$NSI_FILE" + "${INSTDIR}" "meson/output" "${VERREV}" "qt6" "Qt6" "${SETUP}" \ + > "${NSI_FILE}" then exit 1 fi -- 2.40.1