#!/bin/bash
[ -z
"$PLAYONLINUX"
] &&
exit
0
source
"$PLAYONLINUX/lib/sources"
GOGID=
"two_worlds"
PREFIX=
"2Worlds_gog"
WORKING_WINE_VERSION=
"3.0.3"
TITLE=
"GOG.com - Two Worlds: Epic Edition"
SHORTCUT_NAME=
"Two Worlds"
POL_SetupWindow_Init
POL_SetupWindow_SetID 1019
POL_Debug_Init
POL_SetupWindow_presentation
"$TITLE"
"Reality Pump Studios / Topware Interactive"
"http://www.gog.com/gamecard/$GOGID"
"Pierre Etchemaite"
"$PREFIX"
POL_Call
POL_GoG_setup
"$GOGID"
--alternate
"setup_$GOGID"
3
"cfff8aad16e2486defa17dea93dcde8c"
"57c4c9ce6ec296a59fcbcea2efbf3a58"
"488a1f02f86b9e20b5b080d250b4b5af"
"d3ebede3724ec5b67128a8d79df11b7b"
POL_Wine_SelectPrefix
"$PREFIX"
POL_Wine_PrefixCreate
"$WORKING_WINE_VERSION"
POL_Call
POL_Install_nop
"$WINEPREFIX/drive_c/windows/system32/sdbinst.exe"
POL_Call
POL_GoG_install
/nogui
POL_Call
POL_Install_xact
POL_Call
POL_Install_d3dx9_36
POL_Call
POL_Install_devenum
POL_Call
POL_Install_quartz
POL_Call
POL_Install_wmp10
cd
"$POL_USER_ROOT/tmp/"
|| POL_Debug_Fatal
"$(eval_gettext 'temp directory missing')"
POL_Wine
wvc1dmo.exe
/C
/Q
'/T:C:\windows\temp'
cp
"$WINEPREFIX/drive_c/windows/temp/wvc1dmod.dll"
"$WINEPREFIX/drive_c/windows/system32"
POL_Wine
regsvr32 wvc1dmod.dll
Set_OS winxp
POL_SetupWindow_VMS
"128"
POL_Wine_Direct3D
"StrictDrawOrdering"
"enabled"
POL_Wine_X11Drv
"GrabFullScreen"
"Y"
POL_Wine_reboot
POL_Shortcut
"TwoWorlds.exe"
"$SHORTCUT_NAME"
"$SHORTCUT_NAME.png"
""
"Game;RolePlaying;"
POL_Shortcut_Document
"$SHORTCUT_NAME"
"$GOGROOT/Two Worlds/Manual.pdf"
POL_Shortcut
"TwoWorlds_RADEON.exe"
"$SHORTCUT_NAME (Radeon)"
"$SHORTCUT_NAME.png"
""
"Game;RolePlaying;"
POL_Shortcut_Document
"$SHORTCUT_NAME (Radeon)"
"$GOGROOT/Two Worlds/Manual.pdf"
if
[
"$APP_ANSWER"
=
"TRUE"
];
then
cd
"$POL_USER_ROOT/tmp/"
[ -e local_links.php ] &&
mv
local_links.php TwoWorldsCP107.zip ||
mv
'local_links.php?action=jump&catid=6&id=21'
TwoWorldsCP107.zip
unzip TwoWorldsCP107.zip TwoWorldsCP.exe
POL_Wine_InstallFonts
POL_Call
POL_Install_dotnet20
cd
"$POL_USER_ROOT/tmp/"
POL_Wine
TwoWorldsCP.exe
if
[ $? -
eq
0 ];
then
cat
<<
'_EOFINI_'
>
"$POL_USER_ROOT/tmp/fixtw1path.reg"
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Reality Pump\TwoWorlds\FileSystem]
"DataPath"
=
"C:\\GOG Games\\Two Worlds/>"
"OutputDir"
=
"C:\\GOG Games\\Two Worlds"
_EOFINI_
POL_Wine
regedit
"$POL_USER_ROOT/tmp/fixtw1path.reg"
rm
"$POL_USER_ROOT/tmp/fixtw1path.reg"
POL_Shortcut
"TwoWorldsCP.exe"
"$SHORTCUT_NAME - $(eval_gettext 'Control Panel')"
"Two Worlds Control Panel.png"
""
"Game;RolePlaying;"
fi
fi
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"
cd
"$GOGROOT\Two Worlds/"
||
exit
1
POL_Wine
TwoWorlds.exe -safemode
exit
0
_EOF_
exit
0