The Settlers III Gold Edition

Informations

Creator Message
odziom91

Warning

This installer is a beta script. It means that it might not work as expected

Informations

Platforms:
Downloads: 13906
Wine: 1.5.0

Feedbacks

Description

The Settlers III (German: Die Siedler III) is a real-time strategy computer game developed by Blue Byte Software.

Appdb.winehq.org

Source code

#!/bin/bash
# 
# Changelog:
# (2014-07-06 21:35) - create s3videofix.reg file and run it
#                      with regedit.exe, add OS checker for
#                      taskset -c 0 command
# (2014-07-06 23:11) - change echo to cat with EOT syntax,
#                      delete repeated code, create a common
#                      part of code for every type installation
# (2014-07-06 23:55) - add screen resolution mode selector
#                      add S3 configuration
# (2014-07-10 21:47) - change wine version to 1.5.0 - it helps to:
#                      fix video in campains (no more freezing)
#                      fix xrandr command in 1024x768 resolution
# (2014-07-10 22:10) - change taskset -c 0 to taskset -pc 0 $$
#                      lag fix works correctly
#                      
#
# ToDo:
# - add a multiplayer app - aLobby (java failed in now :( )
#
# App: The Settlers III Gold Edition
# Category: Games
# Wine rating: Platinum
# Date : (2014-07-11 00-48)
# Last revision : (2014-07-10 22-10)
# Wine version used : 1.5.0
# Distribution used to test : Linux Mint 17 "Qiana" x64
# Author : OdzioM
# Licence : Retail

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
  
TITLE="The Settlers III Gold Edition"
PREFIX="TheSettlers3"
WORKING_WINE_VERSION="1.5.0"

POL_SetupWindow_Init
POL_Debug_Init

POL_SetupWindow_presentation "$TITLE" "Blue Byte Software" "" "OdzioM" "$PREFIX"

POL_System_TmpCreate "s3tmp"
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
Set_OS "win2000"
POL_Call POL_Install_iv50
POL_Call POL_Install_directplay

# Choose installation mode:
POL_SetupWindow_menu_num "$(eval_gettext 'Select a version of installation disc:')" "$TITLE" "$(eval_gettext 'Retail CD')~$(eval_gettext 'Version from CD-Action Polish magazine - 01.2006 - number 121')~$(eval_gettext 'Other destination or other CD/DVD')" "~"

if [ "$APP_ANSWER" == "0" ]; then
        # Version from retail CD
        POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disc drive.')" "$TITLE"
        POL_SetupWindow_cdrom
        POL_SetupWindow_check_cdrom "setup.exe"
        SETUP_EXE="$CDROM/setup.exe"
elif [ "$APP_ANSWER" == "1" ]; then
        # Version from CD-Action magazine - January 2006 (number 121)
        POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disc drive.')" "$TITLE"
        POL_SetupWindow_cdrom
        POL_SetupWindow_check_cdrom "Full/Settlers III/setup.exe"
        SETUP_EXE="$CDROM/Full/Settlers III/setup.exe"
elif [ "$APP_ANSWER" == "2" ]; then
        # Other file localization
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
fi

POL_Wine "$SETUP_EXE"
POL_Wine_WaitExit "$TITLE"
POL_Shortcut "S3.EXE" "$TITLE"
if [ "$POL_OS" == "Linux" ]; then
        # Lag Fix
        POL_Shortcut_InsertBeforeWine "$TITLE" "taskset -pc 0 $$"
fi
POL_Shortcut "SETUPS3.EXE" "$TITLE $(eval_gettext 'Configuration')"

cd "$POL_System_TmpDir"

# Choose screen resolution:
POL_SetupWindow_menu_num "$(eval_gettext 'Select a screen resolution:')" "$TITLE" "$(eval_gettext '1024x768')~$(eval_gettext '800x600')~$(eval_gettext '640x480')" "~"
if [ "$APP_ANSWER" == "0" ]; then
        # 1024x768

cat << EOF > resolution.reg
REGEDIT4

[HKEY_LOCAL_MACHINE\Software\BlueByte\Siedler3\1.0\General]
"Resolution"=dword:00000002
EOF

elif [ "$APP_ANSWER" == "1" ]; then
        # 800x600

cat << EOF > resolution.reg
REGEDIT4

[HKEY_LOCAL_MACHINE\Software\BlueByte\Siedler3\1.0\General]
"Resolution"=dword:00000001
EOF

elif [ "$APP_ANSWER" == "2" ]; then
        # 640x480

cat << EOF > resolution.reg
REGEDIT4

[HKEY_LOCAL_MACHINE\Software\BlueByte\Siedler3\1.0\General]
"Resolution"=dword:00000000
EOF

fi

POL_Wine regedit.exe resolution.reg
POL_Wine_WaitExit "$(eval_gettext 'resolution fix')"

# Fix crash video - registry edit with system.reg file
cat << EOF > s3videofix.reg
REGEDIT4

[HKEY_LOCAL_MACHINE\Software\BlueByte\Siedler3\1.0\General]
"Intro"=dword:00000000
EOF
POL_Wine regedit.exe s3videofix.reg
POL_Wine_WaitExit "$(eval_gettext 'video fix')"

# Complete message
POL_SetupWindow_message "$(eval_gettext 'Installation complete!\nTo run $TITLE please select $TITLE icon from your desktop.\n\nThank you for using this installation script! :)')" "$TITLE"

POL_System_TmpDelete
POL_SetupWindow_Close
exit

Contributions

Filters:

Contribute
Member Message
Commander_Keen Monday 8 March 2021 at 20:26
Commander_Keen Anonymous

Message

Minor issue: Script doesn't find setup. (can be redirected manually) 

Major issue: POL crashes when trying to start installation

Replies

xlours Friday 7 July 2017 at 16:28
xlours Anonymous

Message

hello

this is a very old post by i rediscover this game in my drawer ;-)

i try to use this script to launch my "The Settlers III" which is not the "Gold edition" but it fails.

 

i use Mageia 5

with Pentium(R) Dual-Core  CPU      E5500  @ 2.80GHz

with a NVIDIA card G72 [GeForce 7200 GS / 7300 SE]

 

the DirectX present on the CD-ROM is DX6CORE.EXE

i have on the CD-ROM 2 setup.

which one should i use ?

.../S3_F160_CD1/S3/SETUPS3.EXE

---/S3_F160_CD1/S3/INSTALL/SETUP.EXE

and of course an autorun :

.../S3_F160_CD1/S3/AUTORUN.EXE

 

any help is granted

 

 

Replies

Anonymous
Tuesday 2 January 2018 at 14:38
Hello,

a simple install (using "Installer un programme non listé", yes i'm a frenchy ;-) ) choosing wine 2.20 (on my UBUNTU 16.04, 32bit), windows XP and POL_Install_d3dx9 let me play for hours.

sincerely yours
odziom91 Friday 11 July 2014 at 0:50
odziom91

Information

This update has been approved by the team.

Differences

@@ -7,6 +7,14 @@
 # (2014-07-06 23:11) - change echo to cat with EOT syntax,
 #                      delete repeated code, create a common
 #                      part of code for every type installation
+# (2014-07-06 23:55) - add screen resolution mode selector
+#                      add S3 configuration
+# (2014-07-10 21:47) - change wine version to 1.5.0 - it helps to:
+#                      fix video in campains (no more freezing)
+#                      fix xrandr command in 1024x768 resolution
+# (2014-07-10 22:10) - change taskset -c 0 to taskset -pc 0 $$
+#                      lag fix works correctly
+#                      
 #
 # ToDo:
 # - add a multiplayer app - aLobby (java failed in now :( )
@@ -14,9 +22,9 @@
 # App: The Settlers III Gold Edition
 # Category: Games
 # Wine rating: Platinum
-# Date : (2014-07-06 23-55)
-# Last revision : (2014-07-06 23-11)
-# Wine version used : 1.7.21
+# Date : (2014-07-11 00-48)
+# Last revision : (2014-07-10 22-10)
+# Wine version used : 1.5.0
 # Distribution used to test : Linux Mint 17 "Qiana" x64
 # Author : OdzioM
 # Licence : Retail
@@ -26,7 +34,7 @@
   
 TITLE="The Settlers III Gold Edition"
 PREFIX="TheSettlers3"
-WORKING_WINE_VERSION="1.7.21"
+WORKING_WINE_VERSION="1.5.0"
 
 POL_SetupWindow_Init
 POL_Debug_Init
@@ -62,16 +70,55 @@
 	SETUP_EXE="$APP_ANSWER"
 fi
 
-# Install a game
 POL_Wine "$SETUP_EXE"
 POL_Wine_WaitExit "$TITLE"
 POL_Shortcut "S3.EXE" "$TITLE"
 if [ "$POL_OS" == "Linux" ]; then
-	POL_Shortcut_InsertBeforeWine "$TITLE" "taskset -c 0"
+        # Lag Fix
+	POL_Shortcut_InsertBeforeWine "$TITLE" "taskset -pc 0 $$"
 fi
+POL_Shortcut "SETUPS3.EXE" "$TITLE $(eval_gettext 'Configuration')"
 
-# Fix crash video - registry edit with system.reg file
 cd "$POL_System_TmpDir"
+
+# Choose screen resolution:
+POL_SetupWindow_menu_num "$(eval_gettext 'Select a screen resolution:')" "$TITLE" "$(eval_gettext '1024x768')~$(eval_gettext '800x600')~$(eval_gettext '640x480')" "~"
+if [ "$APP_ANSWER" == "0" ]; then
+	# 1024x768
+
+cat << EOF > resolution.reg
+REGEDIT4
+
+[HKEY_LOCAL_MACHINE\Software\BlueByte\Siedler3\1.0\General]
+"Resolution"=dword:00000002
+EOF
+
+elif [ "$APP_ANSWER" == "1" ]; then
+	# 800x600
+
+cat << EOF > resolution.reg
+REGEDIT4
+
+[HKEY_LOCAL_MACHINE\Software\BlueByte\Siedler3\1.0\General]
+"Resolution"=dword:00000001
+EOF
+
+elif [ "$APP_ANSWER" == "2" ]; then
+	# 640x480
+
+cat << EOF > resolution.reg
+REGEDIT4
+
+[HKEY_LOCAL_MACHINE\Software\BlueByte\Siedler3\1.0\General]
+"Resolution"=dword:00000000
+EOF
+
+fi
+
+POL_Wine regedit.exe resolution.reg
+POL_Wine_WaitExit "$(eval_gettext 'resolution fix')"
+
+# Fix crash video - registry edit with system.reg file
 cat << EOF > s3videofix.reg
 REGEDIT4
 

New source code

#!/bin/bash
# 
# Changelog:
# (2014-07-06 21:35) - create s3videofix.reg file and run it
#                      with regedit.exe, add OS checker for
#                      taskset -c 0 command
# (2014-07-06 23:11) - change echo to cat with EOT syntax,
#                      delete repeated code, create a common
#                      part of code for every type installation
# (2014-07-06 23:55) - add screen resolution mode selector
#                      add S3 configuration
# (2014-07-10 21:47) - change wine version to 1.5.0 - it helps to:
#                      fix video in campains (no more freezing)
#                      fix xrandr command in 1024x768 resolution
# (2014-07-10 22:10) - change taskset -c 0 to taskset -pc 0 $$
#                      lag fix works correctly
#                      
#
# ToDo:
# - add a multiplayer app - aLobby (java failed in now :( )
#
# App: The Settlers III Gold Edition
# Category: Games
# Wine rating: Platinum
# Date : (2014-07-11 00-48)
# Last revision : (2014-07-10 22-10)
# Wine version used : 1.5.0
# Distribution used to test : Linux Mint 17 "Qiana" x64
# Author : OdzioM
# Licence : Retail

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
  
TITLE="The Settlers III Gold Edition"
PREFIX="TheSettlers3"
WORKING_WINE_VERSION="1.5.0"

POL_SetupWindow_Init
POL_Debug_Init

POL_SetupWindow_presentation "$TITLE" "Blue Byte Software" "" "OdzioM" "$PREFIX"

POL_System_TmpCreate "s3tmp"
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
Set_OS "win2000"
POL_Call POL_Install_iv50
POL_Call POL_Install_directplay

# Choose installation mode:
POL_SetupWindow_menu_num "$(eval_gettext 'Select a version of installation disc:')" "$TITLE" "$(eval_gettext 'Retail CD')~$(eval_gettext 'Version from CD-Action Polish magazine - 01.2006 - number 121')~$(eval_gettext 'Other destination or other CD/DVD')" "~"

if [ "$APP_ANSWER" == "0" ]; then
        # Version from retail CD
        POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disc drive.')" "$TITLE"
        POL_SetupWindow_cdrom
        POL_SetupWindow_check_cdrom "setup.exe"
        SETUP_EXE="$CDROM/setup.exe"
elif [ "$APP_ANSWER" == "1" ]; then
        # Version from CD-Action magazine - January 2006 (number 121)
        POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disc drive.')" "$TITLE"
        POL_SetupWindow_cdrom
        POL_SetupWindow_check_cdrom "Full/Settlers III/setup.exe"
        SETUP_EXE="$CDROM/Full/Settlers III/setup.exe"
elif [ "$APP_ANSWER" == "2" ]; then
        # Other file localization
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
fi

POL_Wine "$SETUP_EXE"
POL_Wine_WaitExit "$TITLE"
POL_Shortcut "S3.EXE" "$TITLE"
if [ "$POL_OS" == "Linux" ]; then
        # Lag Fix
        POL_Shortcut_InsertBeforeWine "$TITLE" "taskset -pc 0 $$"
fi
POL_Shortcut "SETUPS3.EXE" "$TITLE $(eval_gettext 'Configuration')"

cd "$POL_System_TmpDir"

# Choose screen resolution:
POL_SetupWindow_menu_num "$(eval_gettext 'Select a screen resolution:')" "$TITLE" "$(eval_gettext '1024x768')~$(eval_gettext '800x600')~$(eval_gettext '640x480')" "~"
if [ "$APP_ANSWER" == "0" ]; then
        # 1024x768

cat << EOF > resolution.reg
REGEDIT4

[HKEY_LOCAL_MACHINE\Software\BlueByte\Siedler3\1.0\General]
"Resolution"=dword:00000002
EOF

elif [ "$APP_ANSWER" == "1" ]; then
        # 800x600

cat << EOF > resolution.reg
REGEDIT4

[HKEY_LOCAL_MACHINE\Software\BlueByte\Siedler3\1.0\General]
"Resolution"=dword:00000001
EOF

elif [ "$APP_ANSWER" == "2" ]; then
        # 640x480

cat << EOF > resolution.reg
REGEDIT4

[HKEY_LOCAL_MACHINE\Software\BlueByte\Siedler3\1.0\General]
"Resolution"=dword:00000000
EOF

fi

POL_Wine regedit.exe resolution.reg
POL_Wine_WaitExit "$(eval_gettext 'resolution fix')"

# Fix crash video - registry edit with system.reg file
cat << EOF > s3videofix.reg
REGEDIT4

[HKEY_LOCAL_MACHINE\Software\BlueByte\Siedler3\1.0\General]
"Intro"=dword:00000000
EOF
POL_Wine regedit.exe s3videofix.reg
POL_Wine_WaitExit "$(eval_gettext 'video fix')"

# Complete message
POL_SetupWindow_message "$(eval_gettext 'Installation complete!\nTo run $TITLE please select $TITLE icon from your desktop.\n\nThank you for using this installation script! :)')" "$TITLE"

POL_System_TmpDelete
POL_SetupWindow_Close
exit

Replies

Friday 11 July 2014 at 0:51
In some computers taskset -c 0 doesn't work correctly - I changed it to taskset -pc 0 $$ - it's a fix for "lag fix" :)
Anonymous
Friday 11 July 2014 at 1:03
The best is to make a configurator, like http://www.playonlinux.com/en/topic-8391-Far_Cry_GoG.html (line 147)
Friday 11 July 2014 at 1:59
Can I get from registry a value from selected key (for example HKLM/Software/BlaBlaGame/InstallPath)? Or get installation path from installer, or change install path by command line? :)
Anonymous
Friday 11 July 2014 at 10:23
That taskset thing also didn't work for me with the old version of the script, although manually starting the game with taskset -c 0 wine does work (using the same wineprefix etc). I'm not sure if this works, but I'll test it. Also, wine 1.5.0 is a bad choice in my case, since the GOG installers don't seem to work.
Anonymous
Friday 11 July 2014 at 11:25
This is not a script for the GOG edition
Anonymous
Friday 11 July 2014 at 12:06
@odziom91, why do you need the install path?
Friday 11 July 2014 at 12:24
I need the install path to another game - to copy one file into game catalog. I create a script to S.T.A.L.K.E.R. - Call of Pripyat but I need to insert dskquoui.dll file. :)
Anonymous
Friday 11 July 2014 at 13:27
I don't understand
Friday 11 July 2014 at 15:05
STALKER require na dskquoui.dll file to work, but if I insert this into C:\Windows\System32 it doesn't work. In game catalog works correctly. Maybe I do something wrong.
Anonymous
Friday 11 July 2014 at 15:18
We are not on STALKER script, are we? To answer your question, assume that the user installed the program in the default directory
Anonymous
Friday 11 July 2014 at 22:39
I know this is not a GOG script, but it basically is the same. If you don't like mixing that I would take this script and modify it to work for the GOG installer, if odziom91 doesn't mind.
Anonymous
Friday 11 July 2014 at 23:21
Indeed, you could make another script for the gog version. You have many examples of GoG scripts available
Saturday 12 July 2014 at 22:57
I don't see any problem, to "copy" this script and modify to GOG version. :) But I don't have this version, so I can't help you Kumo. :(
Anonymous
Saturday 8 November 2014 at 16:20
Is it possible to write an Installer for the GOG Version of "The Settlers 3 - Ultimate Edition"? That would be beyond great!
Saturday 8 November 2014 at 17:15
I don't have any of the settlers games, so somebody else will have to write one...
Anonymous
Monday 12 September 2016 at 14:40
I got the GOG Version installed by first using the script here, then editing the (failed) installation and reinstalling plus adding the gdiplus library. But I can not minimize the game to go back to desktop. Does anyone have a clue how to fix that?
Anonymous
Monday 12 September 2016 at 14:56
Oh and the Ubuntu menu bar is visible all the time, cutting of a small part of the game screen. Any fix for that as well? :) Thanks!
Wednesday 14 September 2016 at 23:39
Hi pyq! Unfortunatelly I don't have a GOG version of this game... This script should work fine with standalone version. But... If it is possible to fix, please send little "How To" - maybe I will create "an option" for GOG Installer. :)
odziom91 Thursday 10 July 2014 at 22:11
odziom91

Warning

This update has not been approved yet by the team.
Use it at your own risk

Differences

@@ -7,6 +7,13 @@
 # (2014-07-06 23:11) - change echo to cat with EOT syntax,
 #                      delete repeated code, create a common
 #                      part of code for every type installation
+# (2014-07-06 23:55) - add screen resolution mode selector
+#                      add S3 configuration
+# (2014-07-10 21:47) - change wine version to 1.5.0 - it helps to:
+#                      fix video in campains (no more freezing)
+#                      fix xrandr command in 1024x768 resolution
+#                      
+#                      
 #
 # ToDo:
 # - add a multiplayer app - aLobby (java failed in now :( )
@@ -14,9 +21,9 @@
 # App: The Settlers III Gold Edition
 # Category: Games
 # Wine rating: Platinum
-# Date : (2014-07-06 23-55)
-# Last revision : (2014-07-06 23-11)
-# Wine version used : 1.7.21
+# Date : (2014-07-10 22-10)
+# Last revision : (2014-07-06 23-55)
+# Wine version used : 1.5.0
 # Distribution used to test : Linux Mint 17 "Qiana" x64
 # Author : OdzioM
 # Licence : Retail
@@ -26,7 +33,7 @@
   
 TITLE="The Settlers III Gold Edition"
 PREFIX="TheSettlers3"
-WORKING_WINE_VERSION="1.7.21"
+WORKING_WINE_VERSION="1.5.0"
 
 POL_SetupWindow_Init
 POL_Debug_Init
@@ -62,16 +69,54 @@
 	SETUP_EXE="$APP_ANSWER"
 fi
 
-# Install a game
 POL_Wine "$SETUP_EXE"
 POL_Wine_WaitExit "$TITLE"
 POL_Shortcut "S3.EXE" "$TITLE"
 if [ "$POL_OS" == "Linux" ]; then
 	POL_Shortcut_InsertBeforeWine "$TITLE" "taskset -c 0"
 fi
+POL_Shortcut "SETUPS3.EXE" "$TITLE $(eval_gettext 'Configuration')"
 
-# Fix crash video - registry edit with system.reg file
 cd "$POL_System_TmpDir"
+
+# Choose screen resolution:
+POL_SetupWindow_menu_num "$(eval_gettext 'Select a screen resolution:')" "$TITLE" "$(eval_gettext '1024x768')~$(eval_gettext '800x600')~$(eval_gettext '640x480')" "~"
+if [ "$APP_ANSWER" == "0" ]; then
+	# 1024x768
+
+cat << EOF > resolution.reg
+REGEDIT4
+
+[HKEY_LOCAL_MACHINE\Software\BlueByte\Siedler3\1.0\General]
+"Resolution"=dword:00000002
+EOF
+
+elif [ "$APP_ANSWER" == "1" ]; then
+	# 800x600
+
+cat << EOF > resolution.reg
+REGEDIT4
+
+[HKEY_LOCAL_MACHINE\Software\BlueByte\Siedler3\1.0\General]
+"Resolution"=dword:00000001
+EOF
+
+elif [ "$APP_ANSWER" == "2" ]; then
+	# 640x480
+
+cat << EOF > resolution.reg
+REGEDIT4
+
+[HKEY_LOCAL_MACHINE\Software\BlueByte\Siedler3\1.0\General]
+"Resolution"=dword:00000000
+EOF
+
+fi
+
+POL_Wine regedit.exe resolution.reg
+POL_Wine_WaitExit "$(eval_gettext 'resolution fix')"
+
+# Fix crash video - registry edit with system.reg file
 cat << EOF > s3videofix.reg
 REGEDIT4
 

New source code

#!/bin/bash
# 
# Changelog:
# (2014-07-06 21:35) - create s3videofix.reg file and run it
#                      with regedit.exe, add OS checker for
#                      taskset -c 0 command
# (2014-07-06 23:11) - change echo to cat with EOT syntax,
#                      delete repeated code, create a common
#                      part of code for every type installation
# (2014-07-06 23:55) - add screen resolution mode selector
#                      add S3 configuration
# (2014-07-10 21:47) - change wine version to 1.5.0 - it helps to:
#                      fix video in campains (no more freezing)
#                      fix xrandr command in 1024x768 resolution
#                      
#                      
#
# ToDo:
# - add a multiplayer app - aLobby (java failed in now :( )
#
# App: The Settlers III Gold Edition
# Category: Games
# Wine rating: Platinum
# Date : (2014-07-10 22-10)
# Last revision : (2014-07-06 23-55)
# Wine version used : 1.5.0
# Distribution used to test : Linux Mint 17 "Qiana" x64
# Author : OdzioM
# Licence : Retail

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
  
TITLE="The Settlers III Gold Edition"
PREFIX="TheSettlers3"
WORKING_WINE_VERSION="1.5.0"

POL_SetupWindow_Init
POL_Debug_Init

POL_SetupWindow_presentation "$TITLE" "Blue Byte Software" "" "OdzioM" "$PREFIX"

POL_System_TmpCreate "s3tmp"
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
Set_OS "win2000"
POL_Call POL_Install_iv50
POL_Call POL_Install_directplay

# Choose installation mode:
POL_SetupWindow_menu_num "$(eval_gettext 'Select a version of installation disc:')" "$TITLE" "$(eval_gettext 'Retail CD')~$(eval_gettext 'Version from CD-Action Polish magazine - 01.2006 - number 121')~$(eval_gettext 'Other destination or other CD/DVD')" "~"

if [ "$APP_ANSWER" == "0" ]; then
        # Version from retail CD
        POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disc drive.')" "$TITLE"
        POL_SetupWindow_cdrom
        POL_SetupWindow_check_cdrom "setup.exe"
        SETUP_EXE="$CDROM/setup.exe"
elif [ "$APP_ANSWER" == "1" ]; then
        # Version from CD-Action magazine - January 2006 (number 121)
        POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disc drive.')" "$TITLE"
        POL_SetupWindow_cdrom
        POL_SetupWindow_check_cdrom "Full/Settlers III/setup.exe"
        SETUP_EXE="$CDROM/Full/Settlers III/setup.exe"
elif [ "$APP_ANSWER" == "2" ]; then
        # Other file localization
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
fi

POL_Wine "$SETUP_EXE"
POL_Wine_WaitExit "$TITLE"
POL_Shortcut "S3.EXE" "$TITLE"
if [ "$POL_OS" == "Linux" ]; then
        POL_Shortcut_InsertBeforeWine "$TITLE" "taskset -c 0"
fi
POL_Shortcut "SETUPS3.EXE" "$TITLE $(eval_gettext 'Configuration')"

cd "$POL_System_TmpDir"

# Choose screen resolution:
POL_SetupWindow_menu_num "$(eval_gettext 'Select a screen resolution:')" "$TITLE" "$(eval_gettext '1024x768')~$(eval_gettext '800x600')~$(eval_gettext '640x480')" "~"
if [ "$APP_ANSWER" == "0" ]; then
        # 1024x768

cat << EOF > resolution.reg
REGEDIT4

[HKEY_LOCAL_MACHINE\Software\BlueByte\Siedler3\1.0\General]
"Resolution"=dword:00000002
EOF

elif [ "$APP_ANSWER" == "1" ]; then
        # 800x600

cat << EOF > resolution.reg
REGEDIT4

[HKEY_LOCAL_MACHINE\Software\BlueByte\Siedler3\1.0\General]
"Resolution"=dword:00000001
EOF

elif [ "$APP_ANSWER" == "2" ]; then
        # 640x480

cat << EOF > resolution.reg
REGEDIT4

[HKEY_LOCAL_MACHINE\Software\BlueByte\Siedler3\1.0\General]
"Resolution"=dword:00000000
EOF

fi

POL_Wine regedit.exe resolution.reg
POL_Wine_WaitExit "$(eval_gettext 'resolution fix')"

# Fix crash video - registry edit with system.reg file
cat << EOF > s3videofix.reg
REGEDIT4

[HKEY_LOCAL_MACHINE\Software\BlueByte\Siedler3\1.0\General]
"Intro"=dword:00000000
EOF
POL_Wine regedit.exe s3videofix.reg
POL_Wine_WaitExit "$(eval_gettext 'video fix')"

# Complete message
POL_SetupWindow_message "$(eval_gettext 'Installation complete!\nTo run $TITLE please select $TITLE icon from your desktop.\n\nThank you for using this installation script! :)')" "$TITLE"

POL_System_TmpDelete
POL_SetupWindow_Close
exit

Replies

Kumo Thursday 10 July 2014 at 13:20
Kumo Anonymous

Message

This is awesome! I actually wanted to start POL scripting myself just to do this, but now you beat me to it ;). I also like that you offer choosing an arbitrary file. However, I think one still needs an option for the GOG version since that adds another executable that should be used. If used like this, the game always asks for the CD-Key after it started even if it was always entered before.

Also, I think these days most people can run 1024x768 and so I would suggest to add that to the registry fix.

Now the only thing I'm missing is getting rid of the other movies so that I can play the mission. (That seemed to be less a problem for me with the latest 1.5 version of wine by the way.)

I don't have time to test the modifications right now, but I will try to add them later if you don't mind or are faster than I.

Replies

Thursday 10 July 2014 at 20:59
Thank you for your opinion! :) In next release I will add a screen resolution selector and shortcut to S3SETUP.EXE file (S3 Configuration) to change options after install a game. :)
Thursday 10 July 2014 at 21:47
About 1024x768 resolution - I tested this with my S3 copy, but it doesn't work. 800x600 looks ok. It's a xrandr command problem, sooo it should work on another computers, but with no warranty. For me 1024x768 works correctly with wine 1.3.12 (or new to 1.5.7 version). Newest version of wine have regression of bug 31245 (WineHQ Bugzilla). So, can I create a "multi-version" prefix of Wine? Explain: If select 640x480 or 800x600 - create 1.7.21 prefix, if select 1024x768 - create 1.3.12 (or other to 1.5.8).
Thursday 10 July 2014 at 22:06
OK, I decided to change wine version in prefix to 1.5.0. Why? This version works correctly with films (it's problem with fullscreen play), so we can play campains. :) 1.5.0 works great with xrandr.
Anonymous
Friday 11 July 2014 at 10:14
Ok, that thing with the resolution is weird. I also noticed that one can actually change the resolution in-game by using F1-F3 (I think it was those). But I'm not sure if that's saved.
Anonymous
Friday 11 July 2014 at 10:16
Sorry, "accidentially" hit return. (There isn't an edit option?) About the 1.5 Version: That's cool, I'll have to try if movies work for me too. Although I didn't try, appdb.winehq says that versions lower thatn 1.5.26 had often freezes in multiplayer :/.
Friday 11 July 2014 at 12:55
I will try to change this version to another, but now we must be happy for single player mode.
odziom91 Monday 7 July 2014 at 0:03
odziom91

Warning

This update has not been approved yet by the team.
Use it at your own risk

Differences

@@ -0,0 +1,89 @@
+#!/bin/bash
+# 
+# Changelog:
+# (2014-07-06 21:35) - create s3videofix.reg file and run it
+#                      with regedit.exe, add OS checker for
+#                      taskset -c 0 command
+# (2014-07-06 23:11) - change echo to cat with EOT syntax,
+#                      delete repeated code, create a common
+#                      part of code for every type installation
+#
+# ToDo:
+# - add a multiplayer app - aLobby (java failed in now :( )
+#
+# App: The Settlers III Gold Edition
+# Category: Games
+# Wine rating: Platinum
+# Date : (2014-07-06 23-55)
+# Last revision : (2014-07-06 23-11)
+# Wine version used : 1.7.21
+# Distribution used to test : Linux Mint 17 "Qiana" x64
+# Author : OdzioM
+# Licence : Retail
+
+[ "$PLAYONLINUX" = "" ] && exit 0
+source "$PLAYONLINUX/lib/sources"
+  
+TITLE="The Settlers III Gold Edition"
+PREFIX="TheSettlers3"
+WORKING_WINE_VERSION="1.7.21"
+
+POL_SetupWindow_Init
+POL_Debug_Init
+
+POL_SetupWindow_presentation "$TITLE" "Blue Byte Software" "" "OdzioM" "$PREFIX"
+
+POL_System_TmpCreate "s3tmp"
+POL_Wine_SelectPrefix "$PREFIX"
+POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
+Set_OS "win2000"
+POL_Call POL_Install_iv50
+POL_Call POL_Install_directplay
+
+# Choose installation mode:
+POL_SetupWindow_menu_num "$(eval_gettext 'Select a version of installation disc:')" "$TITLE" "$(eval_gettext 'Retail CD')~$(eval_gettext 'Version from CD-Action Polish magazine - 01.2006 - number 121')~$(eval_gettext 'Other destination or other CD/DVD')" "~"
+
+if [ "$APP_ANSWER" == "0" ]; then
+	# Version from retail CD
+	POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disc drive.')" "$TITLE"
+	POL_SetupWindow_cdrom
+	POL_SetupWindow_check_cdrom "setup.exe"
+	SETUP_EXE="$CDROM/setup.exe"
+elif [ "$APP_ANSWER" == "1" ]; then
+	# Version from CD-Action magazine - January 2006 (number 121)
+	POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disc drive.')" "$TITLE"
+        POL_SetupWindow_cdrom
+        POL_SetupWindow_check_cdrom "Full/Settlers III/setup.exe"
+        SETUP_EXE="$CDROM/Full/Settlers III/setup.exe"
+elif [ "$APP_ANSWER" == "2" ]; then
+	# Other file localization
+	cd "$HOME"
+        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
+	SETUP_EXE="$APP_ANSWER"
+fi
+
+# Install a game
+POL_Wine "$SETUP_EXE"
+POL_Wine_WaitExit "$TITLE"
+POL_Shortcut "S3.EXE" "$TITLE"
+if [ "$POL_OS" == "Linux" ]; then
+	POL_Shortcut_InsertBeforeWine "$TITLE" "taskset -c 0"
+fi
+
+# Fix crash video - registry edit with system.reg file
+cd "$POL_System_TmpDir"
+cat << EOF > s3videofix.reg
+REGEDIT4
+
+[HKEY_LOCAL_MACHINE\Software\BlueByte\Siedler3\1.0\General]
+"Intro"=dword:00000000
+EOF
+POL_Wine regedit.exe s3videofix.reg
+POL_Wine_WaitExit "$(eval_gettext 'video fix')"
+
+# Complete message
+POL_SetupWindow_message "$(eval_gettext 'Installation complete!\nTo run $TITLE please select $TITLE icon from your desktop.\n\nThank you for using this installation script! :)')" "$TITLE"
+
+POL_System_TmpDelete
+POL_SetupWindow_Close
+exit
\ No newline at end of file

New source code

#!/bin/bash
# 
# Changelog:
# (2014-07-06 21:35) - create s3videofix.reg file and run it
#                      with regedit.exe, add OS checker for
#                      taskset -c 0 command
# (2014-07-06 23:11) - change echo to cat with EOT syntax,
#                      delete repeated code, create a common
#                      part of code for every type installation
#
# ToDo:
# - add a multiplayer app - aLobby (java failed in now :( )
#
# App: The Settlers III Gold Edition
# Category: Games
# Wine rating: Platinum
# Date : (2014-07-06 23-55)
# Last revision : (2014-07-06 23-11)
# Wine version used : 1.7.21
# Distribution used to test : Linux Mint 17 "Qiana" x64
# Author : OdzioM
# Licence : Retail

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
  
TITLE="The Settlers III Gold Edition"
PREFIX="TheSettlers3"
WORKING_WINE_VERSION="1.7.21"

POL_SetupWindow_Init
POL_Debug_Init

POL_SetupWindow_presentation "$TITLE" "Blue Byte Software" "" "OdzioM" "$PREFIX"

POL_System_TmpCreate "s3tmp"
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
Set_OS "win2000"
POL_Call POL_Install_iv50
POL_Call POL_Install_directplay

# Choose installation mode:
POL_SetupWindow_menu_num "$(eval_gettext 'Select a version of installation disc:')" "$TITLE" "$(eval_gettext 'Retail CD')~$(eval_gettext 'Version from CD-Action Polish magazine - 01.2006 - number 121')~$(eval_gettext 'Other destination or other CD/DVD')" "~"

if [ "$APP_ANSWER" == "0" ]; then
        # Version from retail CD
        POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disc drive.')" "$TITLE"
        POL_SetupWindow_cdrom
        POL_SetupWindow_check_cdrom "setup.exe"
        SETUP_EXE="$CDROM/setup.exe"
elif [ "$APP_ANSWER" == "1" ]; then
        # Version from CD-Action magazine - January 2006 (number 121)
        POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disc drive.')" "$TITLE"
        POL_SetupWindow_cdrom
        POL_SetupWindow_check_cdrom "Full/Settlers III/setup.exe"
        SETUP_EXE="$CDROM/Full/Settlers III/setup.exe"
elif [ "$APP_ANSWER" == "2" ]; then
        # Other file localization
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
fi

# Install a game
POL_Wine "$SETUP_EXE"
POL_Wine_WaitExit "$TITLE"
POL_Shortcut "S3.EXE" "$TITLE"
if [ "$POL_OS" == "Linux" ]; then
        POL_Shortcut_InsertBeforeWine "$TITLE" "taskset -c 0"
fi

# Fix crash video - registry edit with system.reg file
cd "$POL_System_TmpDir"
cat << EOF > s3videofix.reg
REGEDIT4

[HKEY_LOCAL_MACHINE\Software\BlueByte\Siedler3\1.0\General]
"Intro"=dword:00000000
EOF
POL_Wine regedit.exe s3videofix.reg
POL_Wine_WaitExit "$(eval_gettext 'video fix')"

# Complete message
POL_SetupWindow_message "$(eval_gettext 'Installation complete!\nTo run $TITLE please select $TITLE icon from your desktop.\n\nThank you for using this installation script! :)')" "$TITLE"

POL_System_TmpDelete
POL_SetupWindow_Close
exit

Replies

Anonymous
Monday 7 July 2014 at 0:16
Way better :-)
Monday 7 July 2014 at 0:19
Thanks! ;)
odziom91 Sunday 6 July 2014 at 23:11
odziom91

Warning

This update has not been approved yet by the team.
Use it at your own risk

Differences

@@ -0,0 +1,92 @@
+#!/bin/bash
+# 
+# Changelog:
+# (2014-07-06 21:35) - create s3videofix.reg file and run it
+#                      with regedit.exe, add OS checker for
+#                      taskset -c 0 command
+#
+# ToDo:
+# - add a multiplayer app - aLobby (java failed in now :( )
+#
+# App: The Settlers III Gold Edition
+# Category: Games
+# Wine rating: Platinum
+# Date : (2014-07-06 21-35)
+# Last revision : (2014-07-06 21-35)
+# Wine version used : 1.7.21
+# Distribution used to test : Linux Mint 17 "Qiana" x64
+# Author : OdzioM
+# Licence : Retail
+
+[ "$PLAYONLINUX" = "" ] && exit 0
+source "$PLAYONLINUX/lib/sources"
+  
+TITLE="The Settlers III Gold Edition"
+PREFIX="TheSettlers3"
+WORKING_WINE_VERSION="1.7.21"
+
+POL_SetupWindow_Init
+POL_Debug_Init
+
+POL_SetupWindow_presentation "$TITLE" "Blue Byte Software" "" "OdzioM" "$PREFIX"
+
+POL_System_TmpCreate "s3tmp"
+POL_Wine_SelectPrefix "$PREFIX"
+POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
+Set_OS "win2000"
+POL_Call POL_Install_iv50
+POL_Call POL_Install_directplay
+
+# Choose installation mode:
+POL_SetupWindow_menu_num "$(eval_gettext 'Select a version of installation disc:')" "$TITLE" "$(eval_gettext 'Retail CD')~$(eval_gettext 'version from CD-Action polish magazine - 01.2006 - number 121')~$(eval_gettext 'Other destination or other CD/DVD')" "~"
+
+if [ "$APP_ANSWER" == "0" ]; then
+	# Version from retail CD
+	POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disc drive.')" "$TITLE"
+	POL_SetupWindow_cdrom
+	POL_SetupWindow_check_cdrom "setup.exe"
+	POL_Wine "$CDROM/setup.exe"
+	POL_Wine_WaitExit "$TITLE"
+	POL_Shortcut "S3.EXE" "$TITLE"
+	if [ "$POL_OS" == "Linux" ]; then
+		POL_Shortcut_InsertBeforeWine "$TITLE" "taskset -c 0"
+	fi
+elif [ "$APP_ANSWER" == "1" ]; then
+	# Version from CD-Action magazine - January 2006 (number 121)
+	POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disc drive.')" "$TITLE"
+        POL_SetupWindow_cdrom
+        POL_SetupWindow_check_cdrom "Full/Settlers III/setup.exe"
+        POL_Wine "$CDROM/Full/Settlers III/setup.exe"
+        POL_Wine_WaitExit "$TITLE"
+	POL_Shortcut "S3.EXE" "$TITLE"
+	if [ "$POL_OS" == "Linux" ]; then
+		POL_Shortcut_InsertBeforeWine "$TITLE" "taskset -c 0"
+	fi
+elif [ "$APP_ANSWER" == "2" ]; then
+	# Other file localization
+	cd "$HOME"
+        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
+	SETUP_EXE="$APP_ANSWER"
+	POL_Wine "$SETUP_EXE"
+	POL_Wine_WaitExit "$TITLE"
+	POL_Shortcut "S3.EXE" "$TITLE"
+	if [ "$POL_OS" == "Linux" ]; then
+		POL_Shortcut_InsertBeforeWine "$TITLE" "taskset -c 0"
+	fi
+fi
+
+# Fix crash video - registry edit with system.reg file
+cd "$POL_System_TmpDir"
+echo 'REGEDIT4' > s3videofix.reg
+echo '' >> s3videofix.reg
+echo '[HKEY_LOCAL_MACHINE\Software\BlueByte\Siedler3\1.0\General]' >> s3videofix.reg
+echo '"Intro"=dword:00000000' >> s3videofix.reg
+POL_Wine regedit.exe s3videofix.reg
+POL_Wine_WaitExit "$(eval_gettext 'video fix')"
+
+# Complete message
+POL_SetupWindow_message "$(eval_gettext 'Installation complete!\nTo run $TITLE please select $TITLE icon from your desktop.\n\nThank you for using this installation script! :)')" "$TITLE"
+
+POL_System_TmpDelete
+POL_SetupWindow_Close
+exit
\ No newline at end of file

New source code

#!/bin/bash
# 
# Changelog:
# (2014-07-06 21:35) - create s3videofix.reg file and run it
#                      with regedit.exe, add OS checker for
#                      taskset -c 0 command
#
# ToDo:
# - add a multiplayer app - aLobby (java failed in now :( )
#
# App: The Settlers III Gold Edition
# Category: Games
# Wine rating: Platinum
# Date : (2014-07-06 21-35)
# Last revision : (2014-07-06 21-35)
# Wine version used : 1.7.21
# Distribution used to test : Linux Mint 17 "Qiana" x64
# Author : OdzioM
# Licence : Retail

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
  
TITLE="The Settlers III Gold Edition"
PREFIX="TheSettlers3"
WORKING_WINE_VERSION="1.7.21"

POL_SetupWindow_Init
POL_Debug_Init

POL_SetupWindow_presentation "$TITLE" "Blue Byte Software" "" "OdzioM" "$PREFIX"

POL_System_TmpCreate "s3tmp"
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
Set_OS "win2000"
POL_Call POL_Install_iv50
POL_Call POL_Install_directplay

# Choose installation mode:
POL_SetupWindow_menu_num "$(eval_gettext 'Select a version of installation disc:')" "$TITLE" "$(eval_gettext 'Retail CD')~$(eval_gettext 'version from CD-Action polish magazine - 01.2006 - number 121')~$(eval_gettext 'Other destination or other CD/DVD')" "~"

if [ "$APP_ANSWER" == "0" ]; then
        # Version from retail CD
        POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disc drive.')" "$TITLE"
        POL_SetupWindow_cdrom
        POL_SetupWindow_check_cdrom "setup.exe"
        POL_Wine "$CDROM/setup.exe"
        POL_Wine_WaitExit "$TITLE"
        POL_Shortcut "S3.EXE" "$TITLE"
        if [ "$POL_OS" == "Linux" ]; then
                POL_Shortcut_InsertBeforeWine "$TITLE" "taskset -c 0"
        fi
elif [ "$APP_ANSWER" == "1" ]; then
        # Version from CD-Action magazine - January 2006 (number 121)
        POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disc drive.')" "$TITLE"
        POL_SetupWindow_cdrom
        POL_SetupWindow_check_cdrom "Full/Settlers III/setup.exe"
        POL_Wine "$CDROM/Full/Settlers III/setup.exe"
        POL_Wine_WaitExit "$TITLE"
        POL_Shortcut "S3.EXE" "$TITLE"
        if [ "$POL_OS" == "Linux" ]; then
                POL_Shortcut_InsertBeforeWine "$TITLE" "taskset -c 0"
        fi
elif [ "$APP_ANSWER" == "2" ]; then
        # Other file localization
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
        POL_Wine "$SETUP_EXE"
        POL_Wine_WaitExit "$TITLE"
        POL_Shortcut "S3.EXE" "$TITLE"
        if [ "$POL_OS" == "Linux" ]; then
                POL_Shortcut_InsertBeforeWine "$TITLE" "taskset -c 0"
        fi
fi

# Fix crash video - registry edit with system.reg file
cd "$POL_System_TmpDir"
echo 'REGEDIT4' > s3videofix.reg
echo '' >> s3videofix.reg
echo '[HKEY_LOCAL_MACHINE\Software\BlueByte\Siedler3\1.0\General]' >> s3videofix.reg
echo '"Intro"=dword:00000000' >> s3videofix.reg
POL_Wine regedit.exe s3videofix.reg
POL_Wine_WaitExit "$(eval_gettext 'video fix')"

# Complete message
POL_SetupWindow_message "$(eval_gettext 'Installation complete!\nTo run $TITLE please select $TITLE icon from your desktop.\n\nThank you for using this installation script! :)')" "$TITLE"

POL_System_TmpDelete
POL_SetupWindow_Close
exit

Replies

Anonymous
Sunday 6 July 2014 at 23:30
Alse the code from POL_Wine (Line 70 to 75) is redundant :) You can factor it.
Also, to write in a file, you can use the cat << EOF syntax
odziom91 Sunday 6 July 2014 at 21:51
odziom91

Warning

This update has not been approved yet by the team.
Use it at your own risk

Differences

@@ -0,0 +1,76 @@
+#!/bin/bash
+#
+# ToDo:
+# - add a multiplayer app - aLobby (java failed for now :( )
+#
+# App: The Settlers III Gold Edition
+# Category: Games
+# Wine rating: Platinum
+# Date : (2014-07-06 21-35)
+# Last revision : (2014-07-06 21-35)
+# Wine version used : 1.7.21
+# Distribution used to test : Linux Mint 17 "Qiana" x64
+# Author : OdzioM
+# Licence : Retail
+
+[ "$PLAYONLINUX" = "" ] && exit 0
+source "$PLAYONLINUX/lib/sources"
+  
+TITLE="The Settlers III Gold Edition"
+PREFIX="TheSettlers3"
+WORKING_WINE_VERSION="1.7.21"
+
+POL_SetupWindow_Init
+POL_Debug_Init
+
+POL_SetupWindow_presentation "$TITLE" "Blue Byte Software" "" "OdzioM" "$PREFIX"
+
+POL_System_TmpCreate "s3tmp"
+POL_Wine_SelectPrefix "$PREFIX"
+POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
+Set_OS "win2000"
+POL_Call POL_Install_iv50
+POL_Call POL_Install_directplay
+
+# Choose installation mode:
+POL_SetupWindow_menu_num "$(eval_gettext 'Select a version of installation disc:')" "$TITLE" "$(eval_gettext 'Retail CD')~$(eval_gettext 'version from CD-Action polish magazine - 01.2006 - number 121')~$(eval_gettext 'Other destination or other CD/DVD')" "~"
+
+	if [ "$APP_ANSWER" == "0" ]; then
+	# Version from retail CD
+	POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disc drive.')" "$TITLE"
+	POL_SetupWindow_cdrom
+	POL_SetupWindow_check_cdrom "setup.exe"
+	POL_Wine "$CDROM/setup.exe"
+	POL_Wine_WaitExit "$TITLE"
+	POL_Shortcut "S3.EXE" "$TITLE"
+	POL_Shortcut_InsertBeforeWine "$TITLE" "taskset -c 0"
+	elif [ "$APP_ANSWER" == "1" ]; then
+	# Version from CD-Action magazine - January 2006 (number 121)
+	POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disc drive.')" "$TITLE"
+        POL_SetupWindow_cdrom
+        POL_SetupWindow_check_cdrom "Full/Settlers III/setup.exe"
+        POL_Wine "$CDROM/Full/Settlers III/setup.exe"
+        POL_Wine_WaitExit "$TITLE"
+	POL_Shortcut "S3.EXE" "$TITLE"
+	POL_Shortcut_InsertBeforeWine "$TITLE" "taskset -c 0"
+	elif [ "$APP_ANSWER" == "2" ]; then
+	# Other file localization
+	cd "$HOME"
+        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
+	SETUP_EXE="$APP_ANSWER"
+	POL_Wine "$SETUP_EXE"
+	POL_Wine_WaitExit "$TITLE"
+	POL_Shortcut "S3.EXE" "$TITLE"
+	POL_Shortcut_InsertBeforeWine "$TITLE" "taskset -c 0"
+	fi
+
+# Fix crash video - registry edit with system.reg file
+sed -i 's\"Intro"=dword:00000001\"Intro"=dword:00000000\g' $WINEPREFIX/system.reg
+POL_Wine_WaitExit "$(eval_gettext 'video fix')"
+
+# Complete message
+POL_SetupWindow_message "$(eval_gettext 'Installation complete!\nTo run $TITLE please select $TITLE icon from your desktop.\n\nThank you for using this installation script! :)')" "$TITLE"
+
+POL_System_TmpDelete
+POL_SetupWindow_Close
+exit
\ No newline at end of file

New source code

#!/bin/bash
#
# ToDo:
# - add a multiplayer app - aLobby (java failed for now :( )
#
# App: The Settlers III Gold Edition
# Category: Games
# Wine rating: Platinum
# Date : (2014-07-06 21-35)
# Last revision : (2014-07-06 21-35)
# Wine version used : 1.7.21
# Distribution used to test : Linux Mint 17 "Qiana" x64
# Author : OdzioM
# Licence : Retail

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
  
TITLE="The Settlers III Gold Edition"
PREFIX="TheSettlers3"
WORKING_WINE_VERSION="1.7.21"

POL_SetupWindow_Init
POL_Debug_Init

POL_SetupWindow_presentation "$TITLE" "Blue Byte Software" "" "OdzioM" "$PREFIX"

POL_System_TmpCreate "s3tmp"
POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
Set_OS "win2000"
POL_Call POL_Install_iv50
POL_Call POL_Install_directplay

# Choose installation mode:
POL_SetupWindow_menu_num "$(eval_gettext 'Select a version of installation disc:')" "$TITLE" "$(eval_gettext 'Retail CD')~$(eval_gettext 'version from CD-Action polish magazine - 01.2006 - number 121')~$(eval_gettext 'Other destination or other CD/DVD')" "~"

        if [ "$APP_ANSWER" == "0" ]; then
        # Version from retail CD
        POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disc drive.')" "$TITLE"
        POL_SetupWindow_cdrom
        POL_SetupWindow_check_cdrom "setup.exe"
        POL_Wine "$CDROM/setup.exe"
        POL_Wine_WaitExit "$TITLE"
        POL_Shortcut "S3.EXE" "$TITLE"
        POL_Shortcut_InsertBeforeWine "$TITLE" "taskset -c 0"
        elif [ "$APP_ANSWER" == "1" ]; then
        # Version from CD-Action magazine - January 2006 (number 121)
        POL_SetupWindow_message "$(eval_gettext 'Please insert the game media into your disc drive.')" "$TITLE"
        POL_SetupWindow_cdrom
        POL_SetupWindow_check_cdrom "Full/Settlers III/setup.exe"
        POL_Wine "$CDROM/Full/Settlers III/setup.exe"
        POL_Wine_WaitExit "$TITLE"
        POL_Shortcut "S3.EXE" "$TITLE"
        POL_Shortcut_InsertBeforeWine "$TITLE" "taskset -c 0"
        elif [ "$APP_ANSWER" == "2" ]; then
        # Other file localization
        cd "$HOME"
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
        SETUP_EXE="$APP_ANSWER"
        POL_Wine "$SETUP_EXE"
        POL_Wine_WaitExit "$TITLE"
        POL_Shortcut "S3.EXE" "$TITLE"
        POL_Shortcut_InsertBeforeWine "$TITLE" "taskset -c 0"
        fi

# Fix crash video - registry edit with system.reg file
sed -i 's\"Intro"=dword:00000001\"Intro"=dword:00000000\g' $WINEPREFIX/system.reg
POL_Wine_WaitExit "$(eval_gettext 'video fix')"

# Complete message
POL_SetupWindow_message "$(eval_gettext 'Installation complete!\nTo run $TITLE please select $TITLE icon from your desktop.\n\nThank you for using this installation script! :)')" "$TITLE"

POL_System_TmpDelete
POL_SetupWindow_Close
exit

Replies

Anonymous
Sunday 6 July 2014 at 22:13
Good work! Some tips:
- Check if "$POL_OS" = "Linux" before inserting taskset on the shortuct
- Line 68, you should generate a real .reg file and exec it
- Some line are not well idented
Sunday 6 July 2014 at 22:46
Could you tell me more about point 3? :) Any suggestions? :)
Anonymous
Sunday 6 July 2014 at 22:59
Just replace " if [ "$APP_ANSWER" == "0" ]; then" by "if [ "$APP_ANSWER" == "0" ]; then"
(Same for the elses, fi, etc ...)