From 299151493814e46552306be3c5508ce5f638ad56 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Fri, 21 Jul 2023 16:38:15 +0300 Subject: [PATCH 21/21] 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 | 8 +++++--- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/windows/installer_cross/create-freeciv-gtk-qt-nsi.sh b/windows/installer_cross/create-freeciv-gtk-qt-nsi.sh index f43fe912e6..cc1f6c2974 100755 --- a/windows/installer_cross/create-freeciv-gtk-qt-nsi.sh +++ b/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 "x$7" != "x" ; then EXE_ID="$7" diff --git a/windows/installer_cross/create-freeciv-ruledit-nsi.sh b/windows/installer_cross/create-freeciv-ruledit-nsi.sh index b3e30843b6..daa97120b4 100755 --- a/windows/installer_cross/create-freeciv-ruledit-nsi.sh +++ b/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 $2 -!define WIN_ARCH $3 +!define GUI_ID $3 +!define GUI_NAME $4 +!define WIN_ARCH $5 !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 "Output/\${APPNAME}-\${VERSION}-\${WIN_ARCH}-setup.exe" +Name "Freeciv Ruleset Editor \${VERSION} (\${GUI_NAME})" +OutFile "Output/\${APPNAME}-\${VERSION}-\${WIN_ARCH}-\${GUI_ID}-setup.exe" ; Variables diff --git a/windows/installer_cross/installer_build.sh b/windows/installer_cross/installer_build.sh index ced4b9e6bc..1dc9ea7da4 100755 --- a/windows/installer_cross/installer_build.sh +++ b/windows/installer_cross/installer_build.sh @@ -223,18 +223,20 @@ if ! add_common_env $DLLSPATH $INSTDIR ; then fi if test "x$GUI" = "xruledit" ; 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 $VERREV $SETUP > Freeciv-ruledit-$SETUP-$VERREV.nsi + if ! ./create-freeciv-ruledit-nsi.sh \ + "${INSTDIR}" "${VERREV}" "qt6" "Qt6" "${SETUP}" \ + > "Freeciv-ruledit-${SETUP}-${VERREV}.nsi" then exit 1 fi -- 2.40.1