Skip to content

Commit

Permalink
Msys2: Add qt6x-installer
Browse files Browse the repository at this point in the history
See RM #845

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
  • Loading branch information
cazfi committed Sep 24, 2024
1 parent ab4f5fb commit 20531cd
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 7 deletions.
1 change: 1 addition & 0 deletions platforms/windows/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dist_noinst_DATA = \
installer_msys2/create-freeciv-gtk4-nsi.sh \
installer_msys2/create-freeciv-qt5-nsi.sh \
installer_msys2/create-freeciv-qt6-nsi.sh \
installer_msys2/create-freeciv-qt6x-nsi.sh \
installer_msys2/create-freeciv-sdl2-nsi.sh \
installer_msys2/create-freeciv-ruledit-nsi.sh \
installer_msys2/freeciv-gtk3.22.cmd \
Expand Down
22 changes: 21 additions & 1 deletion platforms/windows/installer_msys2/Makefile.meson
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ all: all-$(WINARCH)

all-win64: gtk3.22-installer sdl2-installer gtk4-installer qt5-installer ruledit-installer-qt5

all-win64-10: gtk3.22-installer sdl2-installer gtk4-installer qt6-installer ruledit-installer-qt6
all-win64-10: gtk3.22-installer sdl2-installer gtk4-installer qt6-installer ruledit-installer-qt6 qt6x-installer

all-win64+: gtk3.22-install sdl2-install gtk4-install qt6-install ruledit-install-qt6

Expand All @@ -96,12 +96,18 @@ qt5-installer:
qt6-installer:
make -f $(MAKEFILE_NAME) EXTRA_CONFIG="-Ddebug=false -Dqtver=qt6 -Dsvgflags=true $(EXTRA_CONFIG)" GUI=qt6 CLIENT=qt FCMP=qt installer-common

qt6x-installer:
make -f $(MAKEFILE_NAME) EXTRA_CONFIG="-Ddebug=false -Dqtver=qt6x -Dsvgflags=true $(EXTRA_CONFIG)" GUI=qt6x CLIENT=qt FCMP=qt installer-common

ruledit-installer-qt5:
make -f $(MAKEFILE_NAME) EXTRA_CONFIG="-Ddebug=false -Dqtver=qt5 $(EXTRA_CONFIG)" GUI=qt5 installer-ruledit-common

ruledit-installer-qt6:
make -f $(MAKEFILE_NAME) EXTRA_CONFIG="-Ddebug=false -Dqtver=qt6 $(EXTRA_CONFIG)" GUI=qt6 installer-ruledit-common

ruledit-installer-qt6x:
make -f $(MAKEFILE_NAME) EXTRA_CONFIG="-Ddebug=false -Dqtver=qt6x $(EXTRA_CONFIG)" GUI=qt6x installer-ruledit-common

gtk3.22-install:
make -f $(MAKEFILE_NAME) GUI=gtk3.22 CLIENT=gtk3.22 FCMP=gtk3 install-freeciv-gtk3.22

Expand All @@ -117,12 +123,18 @@ qt5-install:
qt6-install:
make -f $(MAKEFILE_NAME) GUI=qt6 CLIENT=qt FCMP=qt EXTRA_CONFIG="-Dqtver=qt6 -Dsvgflags=true $(EXTRA_CONFIG)" install-freeciv-qt6

qt6x-install:
make -f $(MAKEFILE_NAME) GUI=qt6x CLIENT=qt FCMP=qt EXTRA_CONFIG="-Dqtver=qt6x -Dsvgflags=true $(EXTRA_CONFIG)" install-freeciv-qt6x

ruledit-install-qt5:
make -f $(MAKEFILE_NAME) GUI=qt5 EXTRA_CONFIG="-Dqtver=qt5 $(EXTRA_CONFIG)" install-ruledit-qt5

ruledit-install-qt6:
make -f $(MAKEFILE_NAME) GUI=qt6 EXTRA_CONFIG="-Dqtver=qt6 $(EXTRA_CONFIG)" install-ruledit-qt6

ruledit-install-qt6x:
make -f $(MAKEFILE_NAME) GUI=qt6x EXTRA_CONFIG="-Dqtver=qt6x $(EXTRA_CONFIG)" install-ruledit-qt6x

installer-common: install-freeciv-$(GUI) install-env-$(GUI)
# Extract Freeciv version
$(eval FREECIV_VERSION := $(shell $(SRC_ROOT)/fc_version))
Expand Down Expand Up @@ -306,6 +318,8 @@ install-freeciv-qt5: install-freeciv-common

install-freeciv-qt6: install-freeciv-common

install-freeciv-qt6x: install-freeciv-common

install-env-gtk3.22: install-env-gtk3-fcmp

install-env-gtk4: install-env-gtk4-fcmp
Expand Down Expand Up @@ -374,6 +388,8 @@ install-env-qt6: install-env-qt6-fcmp
# Add DLLs
cp -R $(addprefix $(DLLPATH_PREFIX), $(CLIENT_QT6_DLLS)) $(INST_DIR)/$(WINARCH)-client-$(GUI)/

install-env-qt6x: install-env-qt6

installer-ruledit-common: install-ruledit-$(GUI)
# Add DLLs
cp -R $(addprefix $(DLLPATH_PREFIX), $(COMMON_DLLS)) $(INST_DIR)/$(WINARCH)-ruledit-$(GUI)/
Expand Down Expand Up @@ -424,6 +440,8 @@ install-ruledit-qt6: install-ruledit-common
cp -R /usr/share/locale $(INST_DIR)/$(WINARCH)-ruledit-$(GUI)/share/
find $(INST_DIR)/$(WINARCH)-ruledit-$(GUI)/share/locale -type f -not -name "freeciv-*.mo" -delete

install-ruledit-qt6: install-ruledit-qt6

# Cleanup

clean-build-client:
Expand Down Expand Up @@ -460,5 +478,7 @@ clean:
make -f $(MAKEFILE_NAME) GUI=sdl2 clean-build-client clean-install-client clean-installer-common
make -f $(MAKEFILE_NAME) GUI=qt5 clean-build-client clean-install-client clean-installer-common
make -f $(MAKEFILE_NAME) GUI=qt6 clean-build-client clean-install-client clean-installer-common
make -f $(MAKEFILE_NAME) GUI=qt6x clean-build-client clean-install-client clean-installer-common
make -f $(MAKEFILE_NAME) GUI=qt5 clean-build-ruledit clean-ruledit-install clean-ruledit-common
make -f $(MAKEFILE_NAME) GUI=qt6 clean-build-ruledit clean-ruledit-install clean-ruledit-common
make -f $(MAKEFILE_NAME) GUI=qt6x clean-build-ruledit clean-ruledit-install clean-ruledit-common
12 changes: 6 additions & 6 deletions platforms/windows/installer_msys2/create-freeciv-gtk-qt-nsi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,14 @@ Section "\${APPNAME} (required)"
SetOutPath \$INSTDIR
EOF

# find files and directories to exclude from default installation
# Find files and directories to exclude from default installation

echo -n " File /nonfatal /r "

# languages
# Languages
echo -n "/x locale "

# soundsets
# Soundsets
find $1/data -mindepth 1 -maxdepth 1 -name *.soundspec -printf %f\\n |
sed 's|.soundspec||' |
while read -r name
Expand All @@ -171,8 +171,8 @@ cat <<EOF
CreateShortCut "\$SMPROGRAMS\\\$STARTMENU_FOLDER\Freeciv Modpack Installer.lnk" "\$INSTDIR\freeciv-mp-\${MPEXE_ID}.cmd" "\$DefaultLanguageCode" "\$INSTDIR\freeciv-mp-\${MPEXE_ID}.exe" 0 SW_SHOWMINIMIZED
EOF

if test "$4" = "qt5" || test "$4" = "qt6" ; then
echo "CreateShortCut \"\$SMPROGRAMS\\\$STARTMENU_FOLDER\Freeciv Ruleset Editor.lnk\" \"\$INSTDIR\freeciv-ruledit.cmd\" \"\$DefaultLanguageCode\" \"\$INSTDIR\freeciv-ruledit.exe\" 0 SW_SHOWMINIMIZED"
if test "$4" = "qt5" || test "$4" = "qt6" || test "$4" = "qt6x" ; then
echo "CreateShortCut \"\$SMPROGRAMS\\\$STARTMENU_FOLDER\Freeciv Ruleset Editor.lnk\" \"\$INSTDIR\freeciv-ruledit.cmd\" \"\$DefaultLanguageCode\" \"\$INSTDIR\freeciv-ruledit.exe\" 0 SW_SHOWMINIMIZED"
fi

cat <<EOF
Expand All @@ -194,7 +194,7 @@ SectionEnd
EOF

### soundsets ###
### Soundsets ###

cat <<EOF
SectionGroup "Soundsets"
Expand Down
5 changes: 5 additions & 0 deletions platforms/windows/installer_msys2/create-freeciv-qt6x-nsi.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

# ./create-freeciv-qt6x-nsi.sh <freeciv files dir> <output dir> <version> <win32|win64|win>

./create-freeciv-gtk-qt-nsi.sh "$1" "$2" "$3" "qt6x" "Qt6x" "$4" "" "qt"

0 comments on commit 20531cd

Please sign in to comment.