#!/bin/bash
if
[
"$PLAYONLINUX"
=
""
]
then
exit
0
fi
source
"$PLAYONLINUX/lib/sources"
TYTUL=
"Rise of Nations"
mkdir
-p $REPERTOIRE
/tmp/RON
cd
$REPERTOIRE
/tmp/RON
POL_SetupWindow_Init
"$REPERTOIRE/tmp/RON/topzp.jpg"
"$REPERTOIRE/tmp/RON/leftz.jpg"
if
[
"$POL_LANG"
==
"es"
];
then
LNG_CABEXTRACT=
"Se necesita cabextract para extraer los cabinets de DirectX.\\n\\nPuedes instalarlo desde los repositorios de tu distro utilizando una herramienta como synaptic o apt-get. El paquete se llama \\"
cabextract\\
".\\nSin él no puedo continuar con la instalación."
LNG_MISSINGCOMPONENTS=
"Faltan componentes"
LNG_LOADINGSETUP=
"Cargando instalación"
LNG_INSTALLING=
"El instalador de Rise of Nations se está ejecutando.\\n\\nHaz una instalación normal. No instales GameSpy Arcade ni hagas click en \\"
Jugar ahora\\
".\\nCuando la instalación termine, haz clic en Siguiente.\\n\\nSi después de un tiempo el instalador todavía no ha aparecido, cancela y vuelve a\\nejecutar este script. Asegúrate de elegir bien el medio de instalación."
LNG_RUNNINGSETUP=
"Ejecutando instalación"
LNG_DOWNLOADINGUPDATE=
"Descargando actualización de Rise of Nations (es necesaria)"
LNG_SCREENSIZE=
"¿Qué tamaño de pantalla usarás para jugar al juego? (si no sabes, clic en Siguiente)"
LNG_DXLIBS=
"Instalando algunas bibliotecas de DirectX para el sonido"
LNG_INSTALLINGUPDATE=
"Instalando actualización"
LNG_INSTALLED=
"Rise of Nations ha sido instalado correctamente"
else
LNG_CABEXTRACT=
"cabextract is needed to extract the DirectX cabinets.\\n\\nYou can install them with the package tool of your Linux distribution (like Synaptic). The package name is \\"
cabextract\\
".\\nWithout cabextract I can't continue with the installation."
LNG_MISSINGCOMPONENTS=
"Missing components"
LNG_LOADINGSETUP=
"Loading Setup"
LNG_INSTALLING=
"The Rise of Nations Autorun is running.\\n\\nMake standard installation. Don't install GameSpy Arcade. Don't click to play now.\\nWhen the setup has been finished, click Next\\n\\nIf passed a while the installer hasn't appeared click \\"
Cancel\\
" and try again.\\nMake sure of choosing correct CD."
LNG_RUNNINGSETUP=
"Running Setup"
LNG_DOWNLOADINGUPDATE=
"Downloading update for Rise of Nations (required to be playable)"
LNG_SCREENSIZE=
"What screen size would you like to playing the game (if you don't known, click Next)"
LNG_DXLIBS=
"Installing DirectX libs required for sound"
LNG_INSTALLINGUPDATE=
"Installing update"
LNG_INSTALLED=
"Rise of Nations is installed"
fi
POL_SetupWindow_presentation
"Rise of Nations"
"Big Huge"
"www.microsoft.com/Games/riseofnations/"
"warcry"
"Rise_of_Nations"
check_one
"cabextract"
"cabextract"
if
[
"$MANQUE"
==
"true"
]
then
POL_SetupWindow_message
"$LNG_CABEXTRACT"
"$LNG_MISSINGCOMPONENTS"
POL_SetupẀindow_Close
exit
fi
POL_SetupWindow_cdrom
INSTALLER=$(Read_autorun)
select_prefix
"$HOME/.PlayOnLinux/wineprefix/Rise_of_Nations/"
POL_SetupWindow_prefixcreate
PREFIX=
"$HOME/.PlayOnLinux/wineprefix/Rise_of_Nations"
POL_SetupWindow_wait_next_signal
"$LNG_LOADINGSETUP"
"Rise of Nations"
PROGRAMFILES=`wine cmd
/c
echo
"%ProgramFiles%"
`
PROGRAMFILES=${PROGRAMFILES:3}
APPDATA=`wine cmd
/c
echo
"%AppData%"
`
APPDATA=${APPDATA:3}
echo
$APPDATA |
sed
's/\\\\/\\//g'
> $REPERTOIRE
/tmp/RON/appdata
APPDATA=`
cat
$REPERTOIRE
/tmp/RON/appdata
`
echo
"$PREFIX/drive_c/$APPDATA/Microsoft Games/Rise of Nations"
wine $INSTALLER
POL_SetupWindow_detect_exit
POL_SetupWindow_message
"$LNG_INSTALLING"
"$LNG_RUNNINGSETUP"
mkdir
$REPERTOIRE
/downloads
cd
$REPERTOIRE
/downloads
if
[
"`sha1sum ronpatch.exe`"
!=
"728bb284f2ba335dcfdae6bd889facdeca100662 ronpatch.exe"
]
then
fi
XRANDR=`xrandr --current |
grep
current`
SCREEN_SIZE=`
echo
$XRANDR |
cut
-d , -f 2 |
cut
-d \\ -f 3`x`
echo
$XRANDR |
cut
-d , -f 2 |
cut
-d \\ -f 5`
POL_SetupWindow_textbox
"$LNG_SCREENSIZE"
"Rise of Nations"
"$SCREEN_SIZE"
W_WIDTH=`
echo
$APP_ANSWER |
cut
-d x -f 1`
W_HEIGHT=`
echo
$APP_ANSWER |
cut
-d x -f 2`
Set_Desktop On $W_WIDTH $W_HEIGHT
mkdir
-p
"$PREFIX/drive_c/$APPDATA/Microsoft Games/Rise of Nations"
cd
"$PREFIX/drive_c/$APPDATA/Microsoft Games/Rise of Nations"
echo
"[RISE OF NATIONS]
Windowed Width=$W_WIDTH
Windowed Height=$W_HEIGHT
FullScreen=1
VSync=1
AllowAllResolutions=0
IgnoreMinimizeOnTabOut=0
ConfigDatabase=BHGVidCardConfig.txt
ESCKeyGoesToMenu=1
ClickDragTiming=5
ClickDragLowSensitive=20
ClickDragHighSensitive=64
ClickDragRightSensitive=6
SkipIntroMovies=0
ForceHardwareCursor=0
ForceGDICursor=0
ForceBWCursor=0
ForceStaticCursor=0
ForceAGPVBs=0
Don't Allow Texture Compression=0
SYS_grade_override(A-F or AUTO)=AUTO
MEM_grade_override(A-F or AUTO)=AUTO
CPU_grade_override(A-F or AUTO)=AUTO
GPU_grade_override(A-F or AUTO)=AUTO
TEXTURE_grade_override(FULL, HALF, QUARTER, AUTO)=AUTO
UseAltColors=0
Console Coord Mode=0
Console Name Mode=2
Sound Enabled=1
BackVidAsSlideShow=0
UseVTUNEDLL=0
TestDelayRenderAMin=0
TestDelayRenderBMin=0
TestDelayRenderAMax=0
TestDelayRenderBMax=0
Force Profile Menu=0
ForceLowCPUBackgroundVid=1
" > rise2.ini
POL_SetupWindow_wait_next_signal
"$LNG_DXLIBS"
"Rise of Nations"
mkdir
-p $REPERTOIRE
/tmp/RON/dxcab_tmp/
cd
$REPERTOIRE
/tmp/RON/dxcab_tmp/
cabextract $CDROM
/DIRECTX/DXNT
.CAB
cp
dsound.dll $PREFIX
/drive_c/windows/system32/
cp
dmime.dll $PREFIX
/drive_c/windows/system32/
cp
dmsynth.dll $PREFIX
/drive_c/windows/system32/
cp
dmusic.dll $PREFIX
/drive_c/windows/system32/
cp
dswave.dll $PREFIX
/drive_c/windows/system32/
cp
dmloader.dll $PREFIX
/drive_c/windows/system32/
cp
quartz.dll $PREFIX
/drive_c/windows/system32/
cp
devenum.dll $PREFIX
/drive_c/windows/system32/
echo
"[HKEY_CURRENT_USER\\\\Software\\\\Wine\\\\DllOverrides]"
> $REPERTOIRE
/tmp/RON/dx
.reg
echo
"\\"
dsound\\
"=\\"
native,
builtin
\\
""
>> $REPERTOIRE
/tmp/RON/dx
.reg
echo
"\\"
dmime\\
"=\\"
native,
builtin
\\
""
>> $REPERTOIRE
/tmp/RON/dx
.reg
echo
"\\"
dmsynth\\
"=\\"
native,
builtin
\\
""
>> $REPERTOIRE
/tmp/RON/dx
.reg
echo
"\\"
dmusic\\
"=\\"
native,
builtin
\\
""
>> $REPERTOIRE
/tmp/RON/dx
.reg
echo
"\\"
dswave\\
"=\\"
native,
builtin
\\
""
>> $REPERTOIRE
/tmp/RON/dx
.reg
echo
"\\"
dmloader\\
"=\\"
native,
builtin
\\
""
>> $REPERTOIRE
/tmp/RON/dx
.reg
echo
"\\"
quartz\\
"=\\"
native,
builtin
\\
""
>> $REPERTOIRE
/tmp/RON/dx
.reg
echo
"\\"
devenum\\
"=\\"
native,
builtin
\\
""
>> $REPERTOIRE
/tmp/RON/dx
.reg
echo
"\\"
l3codecx\\
"=\\"
native,
builtin
\\
""
>> $REPERTOIRE
/tmp/RON/dx
.reg
echo
""
>> $REPERTOIRE
/tmp/RON/dx
.reg
echo
"[HKEY_CURRENT_USER\\\\Control Panel\\\\Colors]"
>> $REPERTOIRE
/tmp/RON/dx
.reg
echo
"\\"
Background\\
"=\\"
0 0 0\\
""
>> $REPERTOIRE
/tmp/RON/dx
.reg
echo
"\\"
ButtonFace\\
"=\\"
192 192 192\\
""
>> $REPERTOIRE
/tmp/RON/dx
.reg
regedit $REPERTOIRE
/tmp/RON/dx
.reg
POL_SetupWindow_detect_exit
POL_SetupWindow_wait_next_signal
"$LNG_INSTALLINGUPDATE"
"Rise of Nations"
wine $REPERTOIRE
/downloads/ronpatch
.exe
POL_SetupWindow_detect_exit
POL_SetupWindow_make_shortcut
"Rise_of_Nations"
"$PROGRAMFILES/Microsoft Games/Rise of Nations"
"rise.exe"
""
"Rise of Nations"
""
rm
-R $REPERTOIRE
/tmp/RON
clean_tmp
POL_SetupWindow_message
"$LNG_INSTALLED"
POL_SetupWindow_Close
exit