Author: cazfi
Date: Sat Feb 27 19:24:11 2016
New Revision: 32098

URL: http://svn.gna.org/viewcvs/freeciv?rev=32098&view=rev
Log:
Updated msys1 Windows Installer builds to use gnuwin32-2016-02-03.
Added build of sdl2-client. Clients other than sdl-client use sdl2-mixer.

Patch by Christian Prochaska <cproc>

See task #7815

Added:
    branches/S2_6/win32/installer/create-freeciv-sdl2-nsi.sh
    branches/S2_6/win32/installer/freeciv-sdl2.cmd
Modified:
    branches/S2_6/win32/Makefile.am
    branches/S2_6/win32/installer/Makefile

Modified: branches/S2_6/win32/Makefile.am
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/win32/Makefile.am?rev=32098&r1=32097&r2=32098&view=diff
==============================================================================
--- branches/S2_6/win32/Makefile.am     (original)
+++ branches/S2_6/win32/Makefile.am     Sat Feb 27 19:24:11 2016
@@ -13,6 +13,7 @@
                installer/create-freeciv-gtk3-nsi.sh    \
                installer/create-freeciv-qt-nsi.sh      \
                installer/create-freeciv-sdl-nsi.sh     \
+               installer/create-freeciv-sdl2-nsi.sh    \
                installer/create-freeciv-ruledit-nsi.sh \
                installer/freeciv-gtk2.cmd              \
                installer/freeciv-gtk3.cmd              \
@@ -21,6 +22,7 @@
                installer/freeciv-mp-qt.cmd             \
                installer/freeciv-qt.cmd                \
                installer/freeciv-sdl.cmd               \
+               installer/freeciv-sdl2.cmd              \
                installer/freeciv-server.cmd            \
                installer/freeciv-ruledit.cmd           \
                installer/Freeciv.url                   \

Modified: branches/S2_6/win32/installer/Makefile
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/win32/installer/Makefile?rev=32098&r1=32097&r2=32098&view=diff
==============================================================================
--- branches/S2_6/win32/installer/Makefile      (original)
+++ branches/S2_6/win32/installer/Makefile      Sat Feb 27 19:24:11 2016
@@ -5,7 +5,7 @@
 #
 # 1. download and extract the MinGW build environment from
 #    http://download.gna.org/freeciv/packages/windows/gnuwin32/
-#    Current version is gnuwin32-2015-02-25.
+#    Current version is gnuwin32-2016-02-03.
 # 2. double click on "gnuwin32/msys.bat"
 # 3. install the development packages:
 #    $ hg qpush -a
@@ -26,7 +26,7 @@
 
 
 # by default build all installers
-all: gtk3-installer gtk2-installer sdl-installer qt-installer ruledit-installer
+all: gtk3-installer gtk2-installer sdl2-installer sdl-installer qt-installer 
ruledit-installer
 
 gtk3-installer:
        make GUI=gtk3 FCMP=gtk3 EXTRA_CONFIG="--disable-ruledit 
$(EXTRA_CONFIG)" wrap-gtk3
@@ -34,8 +34,11 @@
 gtk2-installer:
        make GUI=gtk2 FCMP=gtk2 EXTRA_CONFIG="--disable-ruledit 
$(EXTRA_CONFIG)" wrap-gtk2
 
+sdl2-installer:
+       make GUI=sdl2 FCMP=gtk3 EXTRA_CONFIG="--disable-ruledit 
$(EXTRA_CONFIG)" wrap-sdl2
+
 sdl-installer:
-       make GUI=sdl FCMP=gtk3 EXTRA_CONFIG="--disable-ruledit $(EXTRA_CONFIG)" 
wrap-sdl
+       make GUI=sdl FCMP=gtk3 EXTRA_CONFIG="--disable-ruledit 
--enable-sdl-mixer=sdl1.2 $(EXTRA_CONFIG)" wrap-sdl
 
 qt-installer:
        make GUI=qt FCMP=qt wrap-qt
@@ -73,6 +76,8 @@
 build-freeciv-gtk3: build-freeciv-common
 
 build-freeciv-gtk2: build-freeciv-common
+
+build-freeciv-sdl2: build-freeciv-common
 
 build-freeciv-sdl: build-freeciv-common
 
@@ -105,6 +110,15 @@
 
 install-freeciv-gtk2: install-freeciv-common
 
+install-freeciv-sdl2: install-freeciv-common
+       # add CJK fonts
+       cp /opt/fireflysung-1.3.0/fireflysung.ttf 
install-sdl2/data/themes/gui-sdl2/human/
+       cp /opt/fireflysung-1.3.0/COPYRIGHT 
install-sdl2/data/themes/gui-sdl2/human/COPYING.fireflysung
+       cp /opt/sazanami-20040629/sazanami-gothic.ttf 
install-sdl2/data/themes/gui-sdl2/human/
+       cp /opt/sazanami-20040629/README 
install-sdl2/data/themes/gui-sdl2/human/COPYING.sazanami
+       cp /opt/un-fonts/UnDotum.ttf install-sdl2/data/themes/gui-sdl2/human/
+       cp /opt/un-fonts/COPYING 
install-sdl2/data/themes/gui-sdl2/human/COPYING.UnDotum
+
 install-freeciv-sdl: install-freeciv-common
        # add CJK fonts
        cp /opt/fireflysung-1.3.0/fireflysung.ttf 
install-sdl/data/themes/gui-sdl/human/
@@ -145,8 +159,6 @@
 # install Freeciv environment
 
 COMMON_DLLS := \
-       SDL.dll \
-       SDL_mixer.dll \
        exchndl.dll \
        freetype6.dll \
        intl.dll \
@@ -206,11 +218,19 @@
        cp -R /share/locale install-$(GUI)/share/
        find install-$(GUI)/share/locale -type f -not -name "freeciv*.mo" -and 
-not -name gtk30.mo -delete
 
+GTK3_DLLS := \
+       SDL2.dll \
+       SDL2_mixer.dll
+
 install-env-gtk3: install-env-default-fcmp
+       # add DLLs
+       cp -R $(addprefix /bin/, $(GTK3_DLLS)) install-$(GUI)
 
 GTK2_DLLS := \
        libgdk-win32-2.0-0.dll \
-       libgtk-win32-2.0-0.dll
+       libgtk-win32-2.0-0.dll \
+       SDL2.dll \
+       SDL2_mixer.dll
 
 install-env-gtk2: install-env-common
        # add DLLs
@@ -223,9 +243,23 @@
        cp -R /share/locale install-$(GUI)/share/
        find install-$(GUI)/share/locale -type f -not -name "freeciv*.mo" -and 
-not -name gtk20.mo -delete
 
+SDL2_DLLS := \
+       libpng16-16.dll \
+       libSDL2_gfx-1-0-0.dll \
+       SDL2.dll \
+       SDL2_mixer.dll \
+       SDL2_image.dll \
+       SDL2_ttf.dll
+
+install-env-sdl2: install-env-default-fcmp
+       # add DLLs
+       cp -R $(addprefix /bin/, $(SDL2_DLLS)) install-$(GUI)
+       
 SDL_DLLS := \
        libpng12-0.dll \
        libSDL_gfx-15.dll \
+       SDL.dll \
+       SDL_mixer.dll \
        SDL_image.dll \
        SDL_ttf.dll
 
@@ -237,7 +271,9 @@
        libstdc++-6.dll \
        Qt5Core.dll \
        Qt5Gui.dll \
-       Qt5Widgets.dll
+       Qt5Widgets.dll \
+       SDL2.dll \
+       SDL2_mixer.dll
 
 install-env-qt: install-env-common
        # add DLLs
@@ -280,6 +316,8 @@
 
 wrap-gtk2: build-freeciv-gtk2 installer-common
 
+wrap-sdl2: build-freeciv-sdl2 installer-common
+
 wrap-sdl: build-freeciv-sdl installer-common
 
 wrap-qt: build-freeciv-qt installer-common
@@ -312,6 +350,7 @@
 clean:
        make GUI=gtk3 clean-build-common clean-install-common 
clean-installer-common
        make GUI=gtk2 clean-build-common clean-install-common 
clean-installer-common
+       make GUI=sdl2 clean-build-common clean-install-common 
clean-installer-common
        make GUI=sdl clean-build-common clean-install-common 
clean-installer-common
        make GUI=qt clean-build-common clean-install-common 
clean-installer-common
        make clean-build-ruledit clean-install-ruledit clean-installer-ruledit

Added: branches/S2_6/win32/installer/create-freeciv-sdl2-nsi.sh
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/win32/installer/create-freeciv-sdl2-nsi.sh?rev=32098&view=auto
==============================================================================
--- branches/S2_6/win32/installer/create-freeciv-sdl2-nsi.sh    (added)
+++ branches/S2_6/win32/installer/create-freeciv-sdl2-nsi.sh    Sat Feb 27 
19:24:11 2016
@@ -0,0 +1,345 @@
+#!/bin/sh
+
+# ./create-freeciv-sdl2-nsi.sh <Freeciv files directory> <version>
+
+cat <<EOF
+; Freeciv Windows installer script
+; some parts adapted from Wesnoth installer script
+
+SetCompressor /SOLID lzma
+
+!define APPNAME "Freeciv"
+!define VERSION $2
+!define GUI_ID sdl2
+!define GUI_NAME SDL2
+!define APPID "\${APPNAME}-\${VERSION}-\${GUI_ID}"
+
+!define MULTIUSER_EXECUTIONLEVEL Highest
+!define MULTIUSER_MUI
+!define MULTIUSER_INSTALLMODE_COMMANDLINE
+!define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_KEY 
"Software\\\${APPNAME}\\\${VERSION}\\\${GUI_ID}"
+!define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_VALUENAME ""
+!define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_KEY 
"Software\\\${APPNAME}\\\${VERSION}\\\${GUI_ID}"
+!define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_VALUENAME ""
+!define MULTIUSER_INSTALLMODE_INSTDIR "\${APPNAME}-\${VERSION}-\${GUI_ID}"
+
+!include "MultiUser.nsh"
+!include "MUI2.nsh"
+!include "nsDialogs.nsh"
+
+;General
+
+Name "\${APPNAME} \${VERSION} (\${GUI_NAME} client)"
+OutFile "Output/\${APPNAME}-\${VERSION}-win32-\${GUI_ID}-setup.exe"
+
+;Variables
+
+Var STARTMENU_FOLDER
+Var DefaultLanguageCode
+Var LangName
+
+; Pages
+
+!insertmacro MUI_PAGE_WELCOME
+!insertmacro MUI_PAGE_LICENSE "$1\doc\freeciv\installer\COPYING.installer"
+!insertmacro MUI_PAGE_COMPONENTS
+Page custom DefaultLanguage DefaultLanguageLeave
+!insertmacro MULTIUSER_PAGE_INSTALLMODE
+!insertmacro MUI_PAGE_DIRECTORY
+
+;Start Menu Folder Page Configuration
+!define MUI_STARTMENUPAGE_REGISTRY_ROOT "SHCTX" 
+!define MUI_STARTMENUPAGE_REGISTRY_KEY 
"Software\\\${APPNAME}\\\${VERSION}\\\${GUI_ID}" 
+!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
+!define MUI_STARTMENUPAGE_DEFAULTFOLDER "\$(^Name)"
+
+!insertmacro MUI_PAGE_STARTMENU "Application" \$STARTMENU_FOLDER
+!insertmacro MUI_PAGE_INSTFILES
+
+!define MUI_FINISHPAGE_RUN
+!define MUI_FINISHPAGE_RUN_FUNCTION RunFreeciv
+!insertmacro MUI_PAGE_FINISH
+
+!insertmacro MUI_UNPAGE_CONFIRM
+!insertmacro MUI_UNPAGE_INSTFILES
+
+;Languages
+
+!insertmacro MUI_LANGUAGE "English"
+
+EOF
+
+### required files ###
+
+cat <<EOF
+; The stuff to install
+Section "\${APPNAME} (required)"
+
+  SectionIn RO
+
+  SetOutPath \$INSTDIR
+EOF
+
+  # find files and directories to exclude from default installation
+
+  echo -n "  File /nonfatal /r "
+
+  # languages
+  echo -n "/x locale "
+
+  # soundsets
+  find $1/data -mindepth 1 -maxdepth 1 -name *.soundspec -printf %f\\n |
+  sed 's|.soundspec||' |
+  while read -r name
+  do
+  echo -n "/x $name.soundspec /x $name "
+  done
+
+  # CJK fonts
+  echo -n "/x COPYING.fireflysung "
+  echo -n "/x fireflysung.ttf "
+  echo -n "/x COPYING.sazanami "
+  echo -n "/x sazanami-gothic.ttf "
+  echo -n "/x COPYING.UnDotum "
+  echo -n "/x UnDotum.ttf "
+
+  echo "$1\\*.*"
+
+cat <<EOF
+
+  ; Write the installation path into the registry
+  WriteRegStr "SHCTX" SOFTWARE\\\${APPNAME}\\\${VERSION}\\\${GUI_ID} "" 
"\$INSTDIR"
+
+  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
+  CreateDirectory "\$SMPROGRAMS\\\$STARTMENU_FOLDER"
+  CreateShortCut "\$SMPROGRAMS\\\$STARTMENU_FOLDER\Freeciv Server.lnk" 
"\$INSTDIR\freeciv-server.cmd" "\$DefaultLanguageCode" 
"\$INSTDIR\freeciv-server.exe" 0 SW_SHOWMINIMIZED
+  CreateShortCut "\$SMPROGRAMS\\\$STARTMENU_FOLDER\Freeciv Modpack 
Installer.lnk" "\$INSTDIR\freeciv-mp-gtk3.cmd" "\$DefaultLanguageCode" 
"\$INSTDIR\freeciv-mp-gtk3.exe" 0 SW_SHOWMINIMIZED
+  CreateShortCut "\$SMPROGRAMS\\\$STARTMENU_FOLDER\Freeciv.lnk" 
"\$INSTDIR\freeciv-sdl2.cmd" "\$DefaultLanguageCode" 
"\$INSTDIR\freeciv-sdl2.exe" 0 SW_SHOWMINIMIZED
+  CreateShortCut "\$SMPROGRAMS\\\$STARTMENU_FOLDER\Uninstall.lnk" 
"\$INSTDIR\uninstall.exe"
+  CreateShortCut "\$SMPROGRAMS\\\$STARTMENU_FOLDER\Website.lnk" 
"\$INSTDIR\Freeciv.url"
+  !insertmacro MUI_STARTMENU_WRITE_END
+
+  ; Write the uninstall keys for Windows
+  WriteRegStr "SHCTX" 
"Software\Microsoft\Windows\CurrentVersion\Uninstall\\\${APPID}" "DisplayName" 
"\$(^Name)"
+  WriteRegStr "SHCTX" 
"Software\Microsoft\Windows\CurrentVersion\Uninstall\\\${APPID}" 
"UninstallString" '"\$INSTDIR\uninstall.exe"'
+  WriteRegDWORD "SHCTX" 
"Software\Microsoft\Windows\CurrentVersion\Uninstall\\\${APPID}" "NoModify" 1
+  WriteRegDWORD "SHCTX" 
"Software\Microsoft\Windows\CurrentVersion\Uninstall\\\${APPID}" "NoRepair" 1
+  WriteUninstaller "uninstall.exe"
+  
+  SetOutPath \$INSTDIR
+SectionEnd
+
+EOF
+
+### soundsets ###
+
+cat <<EOF
+SectionGroup "Soundsets"
+
+EOF
+
+find $1/data -mindepth 1 -maxdepth 1 -name *.soundspec -printf %f\\n |
+sort |
+sed 's|.soundspec||' |
+while read -r name
+do
+if test -d $1/data/$name; then
+echo "  Section \"$name\""
+echo "  SetOutPath \$INSTDIR\\data"
+echo "  File /r $1\data\\$name.soundspec"
+echo "  SetOutPath \$INSTDIR\\data\\$name"
+echo "  File /r $1\\data\\$name\*.*"
+echo "  SetOutPath \$INSTDIR"
+echo "  SectionEnd"
+echo
+fi
+done
+
+cat <<EOF
+SectionGroupEnd
+
+EOF
+
+### additional languages ###
+
+cat <<EOF
+SectionGroup "Additional languages (translation %)"
+
+EOF
+
+cat ../../bootstrap/langstat_freeciv.txt |
+sort -k 2 |
+while read -r code prct name
+do
+if test -e $1/share/locale/$code/LC_MESSAGES/freeciv.mo; then
+echo "  Section \"$name ($code) $prct\""
+echo "  SetOutPath \$INSTDIR\\share\\locale\\$code"
+echo "  File /r $1\\share\\locale\\$code\*.*"
+
+# install special fonts for CJK locales
+if [ "$name" = "zh_CN" ]; then
+echo "  SetOutPath \$INSTDIR\\data\\themes\\gui-sdl2\\human"
+echo "  File /r $1\\data\\themes\\gui-sdl2\\human\\COPYING.fireflysung"
+echo "  File /r $1\\data\\themes\\gui-sdl2\\human\\fireflysung.ttf"
+fi
+if [ "$name" = "ja" ]; then
+echo "  SetOutPath \$INSTDIR\\data\\themes\\gui-sdl2\\human"
+echo "  File /r $1\\data\\themes\\gui-sdl2\\human\\COPYING.sazanami"
+echo "  File /r $1\\data\\themes\\gui-sdl2\\human\\sazanami-gothic.ttf"
+fi
+if [ "$name" = "ko" ]; then
+echo "  SetOutPath \$INSTDIR\\data\\themes\\gui-sdl2\\human"
+echo "  File /r $1\\data\\themes\\gui-sdl2\\human\\COPYING.UnDotum"
+echo "  File /r $1\\data\\themes\\gui-sdl2\\human\\UnDotum.ttf"
+fi
+
+echo "  SetOutPath \$INSTDIR"
+echo "  SectionEnd"
+echo
+fi
+done
+
+cat <<EOF
+SectionGroupEnd
+
+EOF
+
+cat <<EOF
+;--------------------------------
+;Installer Functions
+
+Function .onInit
+
+  !insertmacro MULTIUSER_INIT
+
+FunctionEnd
+
+Var DefaultLanguageDialog
+Var DefaultLanguageLabel
+Var DefaultLanguageDropList
+
+Function DefaultLanguage
+  !insertmacro MUI_HEADER_TEXT "Choose Default Language" ""
+
+  nsDialogs::Create 1018
+  Pop \$DefaultLanguageDialog
+
+  \${If} \$DefaultLanguageDialog == error
+    Abort
+  \${EndIf}
+
+  \${NSD_CreateLabel} 0 0 100% 30% \
+"If you want to play Freeciv in a language other than your Windows language or 
\
+if Freeciv's auto-detection of your Windows language does not work correctly, \
+you can select a specific language to be used by Freeciv here. Be sure \
+you haven't unmarked the installation of the corresponding language files \
+in the previous dialog. You can also change this setting later in the Freeciv \
+Start Menu shortcut properties."
+  Pop \$DefaultLanguageLabel
+
+  \${NSD_CreateDropList} 0 -60% 100% 13u ""
+  Pop \$DefaultLanguageDropList
+
+  \${NSD_CB_AddString} \$DefaultLanguageDropList "Autodetected"
+  \${NSD_CB_SelectString} \$DefaultLanguageDropList "Autodetected"
+  \${NSD_CB_AddString} \$DefaultLanguageDropList "US English (en_US)"
+EOF
+
+  cat ../../bootstrap/langstat_freeciv.txt |
+  sort -k 2 |
+  while read -r code prct name
+  do
+  if test -e $1/share/locale/$code/LC_MESSAGES/freeciv.mo; then
+  echo "  \${NSD_CB_AddString} \$DefaultLanguageDropList \"$name ($code) 
$prct\""
+  fi
+  done
+
+cat <<EOF
+  nsDialogs::Show
+FunctionEnd
+
+Function DefaultLanguageLeave
+  \${NSD_GetText} \$DefaultLanguageDropList \$LangName
+EOF
+
+  echo "  \${If} \$LangName == \"Autodetected\""
+  echo "    StrCpy \$DefaultLanguageCode \"auto\""
+  echo "  \${EndIf}"
+  echo "  \${If} \$LangName == \"US English (en_US)\""
+  echo "    StrCpy \$DefaultLanguageCode \"en_US\""
+  echo "  \${EndIf}"
+
+  cat ../../bootstrap/langstat_freeciv.txt |
+  while read -r code prct name
+  do
+    echo "  \${If} \$LangName == \"$name ($code) $prct\""
+    echo "    StrCpy \$DefaultLanguageCode \"$code\""
+    echo "  \${EndIf}"
+  done
+
+cat <<EOF
+FunctionEnd
+
+Function RunFreeciv
+  nsExec::Exec '"\$INSTDIR\freeciv-sdl2.cmd" \$DefaultLanguageCode'
+FunctionEnd
+
+EOF
+
+### uninstall section ###
+
+cat <<EOF
+; special uninstall section.
+Section "Uninstall"
+
+  ; remove files
+EOF
+
+find $1 -type f |
+grep -v '/$' |
+sed 's|[^/]*||' |
+tr '/' '\\' | while read -r name
+do
+echo "  Delete \"\$INSTDIR$name\""
+done
+
+find $1 -depth -type d |
+grep -v '/$' |
+sed 's|[^/]*||' |
+tr '/' '\\' | while read -r name
+do
+echo "  RMDir \"\$INSTDIR$name\""
+done
+
+cat <<EOF
+
+  ; MUST REMOVE UNINSTALLER, too
+  Delete "\$INSTDIR\uninstall.exe"
+
+  ; remove install directory, if empty
+  RMDir "\$INSTDIR"
+
+  ; remove shortcuts, if any.
+  !insertmacro MUI_STARTMENU_GETFOLDER "Application" \$STARTMENU_FOLDER
+  Delete "\$SMPROGRAMS\\\$STARTMENU_FOLDER\*.*"
+  RMDir "\$SMPROGRAMS\\\$STARTMENU_FOLDER"
+
+  ; remove registry keys
+  DeleteRegKey "SHCTX" 
"Software\Microsoft\Windows\CurrentVersion\Uninstall\\\${APPID}"
+  DeleteRegKey /ifempty "SHCTX" SOFTWARE\\\${APPNAME}\\\${VERSION}\\\${GUI_ID}
+  DeleteRegKey /ifempty "SHCTX" SOFTWARE\\\${APPNAME}\\\${VERSION}
+  DeleteRegKey /ifempty "SHCTX" SOFTWARE\\\${APPNAME}
+SectionEnd
+EOF
+
+cat <<EOF
+;--------------------------------
+;Uninstaller Functions
+
+Function un.onInit
+
+  !insertmacro MULTIUSER_UNINIT
+
+FunctionEnd
+
+EOF

Added: branches/S2_6/win32/installer/freeciv-sdl2.cmd
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/win32/installer/freeciv-sdl2.cmd?rev=32098&view=auto
==============================================================================
--- branches/S2_6/win32/installer/freeciv-sdl2.cmd      (added)
+++ branches/S2_6/win32/installer/freeciv-sdl2.cmd      Sat Feb 27 19:24:11 2016
@@ -0,0 +1,3 @@
+@echo off
+if %1 NEQ auto set LANG=%1
+start freeciv-sdl2.exe %2 %3 %4 %5 %6 %7 %8 %9


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to