#!/bin/bash
[
"$PLAYONLINUX"
=
""
] &&
exit
0
source
"$PLAYONLINUX/lib/sources"
TITLE=
"Close Combat: A Bridge Too Far"
PREFIX=
"CloseCombatABridgeTooFar"
WINEVERSION=
"1.6.2"
POL_SetupWindow_Init
POL_Debug_Init
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom
"windows/cc2.exe"
POL_Wine_SelectPrefix
"$PREFIX"
POL_Wine_PrefixCreate
"$WINEVERSION"
POL_System_TmpCreate
"$PREFIX"
mkdir
"$PREFIX/drive_y"
cp
-r
"$CDROM"
"$WINEPREFIX/drive_y"
chmod
-R +w
"$WINEPREFIX/drive_y"
ln
-s
"../drive_y"
"$WINEPREFIX/dosdevices/y:"
pushd
"$POL_System_TmpDir"
cat
>
"$POL_System_TmpDir/cc2installer-settings.reg"
<<
'EOF'
[HKEY_CURRENT_USER\Software\Wine\AppDefaults\cc2.exe]
"Version"
=
"winme"
[HKEY_LOCAL_MACHINE\Software\Wine\Drives]
"y:"
=
"cdrom"
EOF
POL_Wine
regedit
"cc2installer-settings.reg"
rm
cc2installer-settings.reg
popd
POL_Wine
"$CDROM/windows/setup.exe"
POL_Wine_WaitExit
"$TITLE"
pushd
"$POL_System_TmpDir"
cat
>
"$POL_System_TmpDir/cc2settings.reg"
<<
'EOF'
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games\Close Combat\2.00]
"PlayVideos"
=hex:00,00,00,00
"InstalledFrom"
=
"Y:\\"
EOF
POL_Wine
regedit
"cc2settings.reg"
rm
cc2settings.reg
popd
Set_Desktop
"On"
"800"
"600"
POL_System_TmpDelete
POL_Shortcut
'CC2.exe'
"$TITLE"
POL_SetupWindow_Close
exit
0