#!/bin/bash
if [ "$PLAYONLINUX" = "" ]
then
exit 0
fi
source "$PLAYONLINUX/lib/sources"
cfg_check
#
if [ "$POL_LANG" == "fr" ]
then
LNG_DOWNLOAD_VC="Patientez pendant le téléchargement de vcrun2005..."
LNG_FILE_DL="Pour installer safari, merci de télécharger SafariSetup.exe (sans Quicktime) à cette adresse :\n\n http://www.apple.com/fr/safari/"
LNG_INSTALL_CASE="Pendant l'installation, merci de désélectionner les cases \n\"Installer bonjour\" et \"Mettre automatiquement mes produits Apple à jour\""
LNG_INSTALL_BIS="Merci d'indiquer l'emplacement de SafariSetup.exe"
LNG_INSTALL_ERROR="Merci d'indiquer l'installateur."
else
LNG_DOWNLOAD_VC="Please wait while vcrun2005 is downloaded"
LNG_FILE_DL="To install safari, please download SafariSetup.exe : \n\nhttp://www.apple.com/fr/safari/"
LNG_INSTALL_CASE="During the install process, please deselect\n Install Bonjour for Windows and Install Apple Software Update."
LNG_INSTALL_BIS="Please give the location of SafariSetup.exe."
LNG_INSTALL_ERROR="Please give the location of SafariSetup.exe."
fi
#Présentation
cd $REPERTOIRE/tmp/
rm *.jpg
wget $SITE/setups/safari/left.jpg
POL_SetupWindow_Init "" "$REPERTOIRE/tmp/left.jpg"
POL_SetupWindow_presentation "Safari" "Apple" "http://www.apple.com/" "Tinou" "Safari"
mkdir -p $HOME/.PlayOnLinux/wineprefix/Safari
cd $HOME/.PlayOnLinux/wineprefix/Safari
select_prefixe "$(pwd)"
POL_SetupWindow_prefixcreate
Set_OS winxp
fonts_to_prefixe
cd $REPERTOIRE/tmp
POL_SetupWindow_download "$LNG_DOWNLOAD_VC" "$LNG_DOWNLOAD" "http://download.microsoft.com/download/d/3/4/d342efa6-3266-4157-a2ec-5174867be706/vcredist_x86.exe"
POL_SetupWindow_wait_next_signal "Installing libraries" "Safari"
wine vcredist_x86.exe /q
POL_SetupWindow_detect_exit
cd $REPERTOIRE/tmp
POL_SetupWindow_download "Downloading Safari" "Safari" "$SITE/divers/SafariSetup.exe"
SAFARI="$REPERTOIRE/tmp/SafariSetup.exe"
#POL_SetupWindow_message "$LNG_FILE_DL" "Safari"
#browser "http://www.apple.com/downloads/"
#cd ~
#POL_SetupWindow_browse "$LNG_INSTALL_BIS" "Safari" ""
#SAFARI="$APP_ANSWER"
#if [ "$SAFARI" = "" ]
#then
#POL_SetupWindow_message "$LNG_INSTALL_ERROR" "Safari"
#POL_SetupWindow_Close
#exit 0
#fi
POL_SetupWindow_wait_next_signal "$LNG_INSTALL_CASE" "Installing Safari ..."
wine $SAFARI /q
POL_SetupWindow_detect_exit
cd $REPERTOIRE/tmp
POL_SetupWindow_download "Flash Player" "$LNG_DOWNLOAD" "$SITE/divers/install_flash_player.exe"
POL_SetupWindow_wait_next_signal "Installing Flash Player ..." "Safari"
wine install_flash_player.exe /silent
POL_SetupWindow_detect_exit
POL_SetupWindow_reboot
POL_SetupWindow_make_shortcut "Safari" "Program Files/Safari/" "Safari.exe" "safari.xpm" "Safari"
POL_SetupWindow_message "Installation finished" "Safari"
POL_SetupWindow_Close
exit