#!/bin/bash
[ -z
"$PLAYONLINUX"
] &&
exit
0
source
"$PLAYONLINUX/lib/sources"
GOGID=
"tropico_3_gold_edition"
PREFIX=
"Tropico3GE_gog"
WORKING_WINE_VERSION=
"3.0.3"
TITLE=
"GOG.com - Tropico 3 Gold Edition"
SHORTCUT_NAME=
"Tropico 3 - Gold Edition"
POL_SetupWindow_Init
POL_SetupWindow_SetID 1805
POL_Debug_Init
POL_Call
POL_GoG_setup
"$GOGID"
"dade4fc6054170479c4bcc4b3b88adda"
"e28751a0a9ee8c81de2c6918b4f28136"
"58d6c369c0e15c39a830f8747da3e0e9"
"0fc2cbeda6f06fc0d483e91922f95f94"
POL_Wine_SelectPrefix
"$PREFIX"
POL_Wine_PrefixCreate
"$WORKING_WINE_VERSION"
POL_Call
POL_GoG_install
"/nogui"
Set_OS winxp
POL_Call
POL_Install_d3dx9_36
POL_SetupWindow_VMS
"256"
POL_Wine_reboot
GOGPATH=
"$GOGROOT/Tropico 3 GOLD"
mv
"$GOGPATH/config.lua"
"$GOGPATH/config_orig.lua"
cat
<<_EOF_ >
"$GOGPATH/config.lua"
config.IsFullscreen = 0
config.RunUnfocused = 0
config.WriteToRegistry = 1
config.AutoOptions = 1
config.ColorBits = 32
config.DepthBits = 24
config.VSync = 0
config.RefRast = 0
config.MeshVertexBufferChunkSizeKb = 1280
config.MeshIndexBufferChunkSizeKb = 512
config.MapSlotReserveSize = 12
config.SoundListenerMinUpdatePeriod = 50
config.FmodMemory = 10485760
config.XInput = 0
config.MaxGameObjectCount = 200000
config.MaxGameObjectExCount = 10000
config.MaxGameRenderObjCount = 20000
config.MainMenu = 1
hr.UpdateLights = 0
_EOF_
POL_Shortcut
"tropico3.exe"
"$SHORTCUT_NAME"
"$SHORTCUT_NAME.png"
""
"Game;StrategyGame;"
POL_Shortcut_Document
"$SHORTCUT_NAME"
"$GOGPATH/Manual.pdf"
POL_Config_PrefixWrite
"LANGUAGE"
"English"
POL_SetupWindow_Close
cat
<<_EOF_ >
"$POL_USER_ROOT/configurations/configurators/$SHORTCUT_NAME"
#!/bin/bash
[ -z
"\$PLAYONLINUX"
] &&
exit
0
source
"\$PLAYONLINUX/lib/sources"
export
WINEPREFIX=
"\$POL_USER_ROOT/wineprefix/$PREFIX"
export
WINEDEBUG=
"-all"
TITLE=
"$TITLE"
SHORTCUT_NAME=
"$SHORTCUT_NAME"
GOGPATH=
"$GOGPATH"
cd
"\$GOGPATH"
||
exit
1
POL_SetupWindow_Init
CURRENT=
"\$(POL_Config_PrefixRead "
LANGUAGE
")"
OTHERS=
"\$(sed -e "
s/~\$CURRENT
//
" <<< "
~English~French~German~Italian~Spanish
")"
POL_SetupWindow_menu
"\$(eval_gettext 'Choose the game language you want')"
"\$TITLE"
"\${CURRENT}\${OTHERS}"
"~"
POL_Config_PrefixWrite
"LANGUAGE"
"\$APP_ANSWER"
cat
<<_EOFINI_ >
"\$POL_USER_ROOT/tmp/t3lang.reg"
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Haemimont Games\Tropico3]
"Language"
=
"\$APP_ANSWER"
_EOFINI_
POL_Wine
regedit
"\$POL_USER_ROOT/tmp/t3lang.reg"
rm
"\$POL_USER_ROOT/tmp/t3lang.reg"
MANUAL=
"Manual.pdf"
[
"\$APP_ANSWER"
=
"French"
] && MANUAL=
"manual_fr.pdf"
[
"\$APP_ANSWER"
=
"German"
] && MANUAL=
"manual_de.pdf"
[
"\$APP_ANSWER"
=
"Italian"
] && MANUAL=
"manual_it.pdf"
[
"\$APP_ANSWER"
=
"Spanish"
] && MANUAL=
"manual_sp.pdf"
POL_Shortcut_Document
"\$SHORTCUT_NAME"
"\$GOGPATH/\$MANUAL"
POL_SetupWindow_question
"\$(eval_gettext 'Run game full screen?')"
"\$TITLE"
FULLSCREEN=0
[
"\$APP_ANSWER"
=
"TRUE"
] && FULLSCREEN=1
sed
-i .old -e
's/^config.IsFullscreen =.*$/config.IsFullscreen = '
\$FULLSCREEN
'/'
config.lua
POL_SetupWindow_Close
exit
0
_EOF_
bash
"$POL_USER_ROOT/configurations/configurators/$SHORTCUT_NAME"
exit
0