#!/bin/bash
PROGRAMFILES=`wine cmd
/c
echo
"%ProgramFiles%"
`
PROGRAMFILES=${PROGRAMFILES:3}
[
"$PLAYONLINUX"
=
""
] &&
exit
0
source
"$PLAYONLINUX/lib/sources"
Title=
"Freelancer"
if
[
"$POL_LANG"
==
"fr"
];
then
LNG_DLL=
"PlayOnLinux est en train de télécharger les .dll nécessairent au bon fonctionnement du jeu"
LNG_MEM=
"La taille de votre mémoire graphique?"
LNG_WAIT_END=
"Appuyez sur \\"
Suivant\\" UNIQUEMENT quand l'installation
du
jeu sera
terminée sous peine de devoir recommencer l'installation."
else
LNG_MEM=
"How much memory do your graphic card have got?."
LNG_DLL=
"Downloading .dll to launch correctly the game"
LNG_WAIT_END=
"Click on \\"
Next\\" ONLY when the game installation
is finished or you will have to redo the installation."
fi
POL_SetupWindow_Init
""
""
POL_SetupWindow_install_wine
"1.1.22"
select_prefix
"$REPERTOIRE/wineprefix/Freelancer"
POL_SetupWindow_prefixcreate
cd
"$REPERTOIRE/ressources"
if
[ ! -e DllFreelancer.zip ];
then
fi
if
[
"`sha1sum < winetricks | sed 's/ .*//'`"
!=
"f8502d31624862bc29f1143473e9a79580176981"
];
then
wget http:
//winezeug
.googlecode.com
/svn/trunk/winetricks
--output-document=winetricks
fi
if
[ ! -e
"$HOME/.winetrickscache/directx_mar2009_redist.exe"
];
then
mkdir
"$HOME/.winetrickscache"
cd
"$HOME/.winetrickscache"
fi
if
[ ! -e
"$HOME/.winetrickscache/vc6redistsetup_enu.exe"
];
then
mkdir
"$HOME/.winetrickscache"
cd
"$HOME/.winetrickscache"
fi
if
[ ! -e
"$HOME/.winetrickscache/msxml3.msi"
];
then
mkdir
"$HOME/.winetrickscache"
cd
"$HOME/.winetrickscache"
fi
if
[ ! -e
"$HOME/.winetrickscache/msxml4-KB927978-enu.exe"
];
then
mkdir
"$HOME/.winetrickscache"
cd
"$HOME/.winetrickscache"
fi
if
[ ! -e
"$HOME/.winetrickscache/msxml6.msi"
];
then
mkdir
"$HOME/.winetrickscache"
cd
"$HOME/.winetrickscache"
fi
cd
"$WINEPREFIX/drive_c/windows/system32"
unzip
"$REPERTOIRE/ressources/DllFreelancer.zip"
cd
"$REPERTOIRE/ressources"
POL_SetupWindow_wait_next_signal
"Installing DirectX 9.0c libraries..."
"$Title"
bash
winetricks -q directx9
POL_SetupWindow_detect_exit
POL_SetupWindow_reboot
POL_SetupWindow_wait_next_signal
"Installing VCrun06"
"$Title"
bash
winetricks -q vcrun6
POL_SetupWindow_detect_exit
POL_SetupWindow_wait_next_signal
"Installing MSXML3"
"$Title"
bash
winetricks -q msxml3
POL_SetupWindow_detect_exit
POL_SetupWindow_wait_next_signal
"Installing MSXML4"
"$Title"
bash
winetricks -q msxml4
POL_SetupWindow_detect_exit
POL_SetupWindow_wait_next_signal
"Installing MSXML6"
"$Title"
bash
winetricks -q msxml6
POL_SetupWindow_detect_exit
Set_OS winXP
POL_SetupWindow_menu_list
"$LNG_MEM"
"$Title"
"32 64 128 256 384 512 768 1024 2048"
" "
VMS=
"$APP_ANSWER"
cd
"$WINEPREFIX/drive_c/windows/temp"
echo
"[HKEY_CURRENT_USER\\\\Software\\\\Wine\\\\Direct3D]"
> OGL.reg
echo
"\\"
Multisampling\\
"=\\"
enabled\\
""
>> OGL.reg
echo
"\\"
OffscreenRenderingMode\\
"=\\"
fbo\\
""
>> OGL.reg
echo
"\\"
PixelShaderMode\\
"=\\"
enabled\\
""
>> OGL.reg
echo
"\\"
VideoMemorySize\\
"=\\"
$VMS\\
""
>> OGL.reg
regedit OGL.reg
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom
"SETUP.EXE"
wine $CDROM
/SETUP
.EXE
POL_SetupWindow_message
"$LNG_WAIT_END"
"$Title"
POL_SetupWindow_make_shortcut
"Freelancer"
"$PROGRAMFILES/Microsoft Games/Freelancer/EXE"
"Freelancer.exe"
""
"Freelancer"
Set_WineVersion_Assign
"1.1.22"
"Freelancer"
POL_SetupWindow_Close
exit