je voudrait mettre le scripte pour patcher x3tc a jour suite a la sortie du patch 3.1 (le dernier d'après egosoft)
j'ai pas encore test et ça ma l’ère brouillon, mais quand penssez vous.
note le passage de la v1.01 a la v 3.1 se fait obligatoirement en 2 fois.
#!/bin/bash
# Date : (2011-01-18 20-11)
# Last revision : (2011-03-19 20-11)
# Wine version used : 1.3.3
# Distribution used to test : ?
# Author : SuperPlumus and ademar
[ "$PLAYONLINUX" = "" ] && exit
source "$PLAYONLINUX/lib/sources"
TITLE="X3 : Terran Conflict - Patch 3.1"
TITLE_BASE="X3 : Terran Conflict"
TITLE_PATCH="3.1"
PREFIX="X3TC"
WORKING_WINE_VERSION="1.3.3"
if [ "$POL_LANG" == "fr" ]; then
LNG_WELCOME="Bienvenue dans le script d'installation du patch $TITLE_PATCH pour $TITLE_BASE."
LNG_PREFIX_NOT_EXIST="Le jeu n'est pas installé."
LNG_STEAM="Steam a son propre système de mise à jour automatique."
LNG_CHOOSE_MEDIA_PATCH="Choisissez votre méthode de patch"
LNG_MEDIA_LOCAL_PATCH="Patcher le jeu depuis un fichier local"
LNG_MEDIA_DL_PATCH="Télécharger le dernier patch puis l'utiliser"
LNG_CHOOSE_LOCAL_PATCH="Selectionnez le patch à executer"
LNG_DOWNLOAD_RUN="Téléchargement en cours..."
LNG_INSTALL_RUN="Installation en cours..."
LNG_WAIT_END="Cliquez sur \\"Suivant\\" UNIQUEMENT quand l'installation de\\n$TITLE sera terminée."
LNG_SUCCES="Le patch a été correctement installé"
else
LNG_WELCOME="Welcome in the patch $TITLE_PATCH Installation script for $TITLE."
LNG_PREFIX_NOT_EXIST="Game is not installed."
LNG_STEAM="Steam have is own automatic update system."
LNG_CHOOSE_MEDIA_PATCH="Choose your patch method"
LNG_MEDIA_LOCAL_PATCH="Patch from local file"
LNG_MEDIA_DL_PATCH=="Download then use last patch"
LNG_CHOOSE_LOCAL_PATCH="Select patch to execute"
LNG_DOWNLOAD_RUN="Downloading..."
LNG_INSTALL_RUN="Installation in progress..."
LNG_WAIT_END="Click on \\"Forward\\" ONLY when the\\n$TITLE installation is finished."
LNG_SUCCES="Patch installed successfully"
fi
POL_SetupWindow_Init
POL_SetupWindow_free_presentation "$TITLE" "$LNG_WELCOME"
if [ ! -e "$REPERTOIRE/wineprefix/$PREFIX" ]; then
POL_SetupError "$LNG_PREFIX_NOT_EXIST"
fi
POL_SetupWindow_install_wine "$WORKING_WINE_VERSION"
Use_WineVersion "$WORKING_WINE_VERSION"
select_prefix "$REPERTOIRE/wineprefix/$PREFIX"
POL_SetupWindow_prefixcreate
POL_LoadVar_PROGRAMFILES
# Pas de patch avec Steam
if [ -e "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam/Steam.exe" ]; then
POL_SetupWindow_message "$LNG_STEAM" "$TITLE"
POL_SetupWindow_Close
exit
fi
POL_SetupWindow_menu "$LNG_CHOOSE_MEDIA_PATCH" "$TITLE" "$LNG_MEDIA_LOCAL_PATCH~$LNG_MEDIA_DL_PATCH" "~"
GAME_MEDIAVERSION="$APP_ANSWER"
if [ "$GAME_MEDIAVERSION" == "$LNG_MEDIA_LOCAL_PATCH" ]; then
cd "$HOME"
POL_SetupWindow_browse "$LNG_CHOOSE_LOCAL_PATCH" "$TITLE"
SETUP_EXE="$APP_ANSWER"
POL_SetupWindow_wait_next_signal "$LNG_INSTALL_RUN" "$TITLE"
wine start /unix "$SETUP_EXE"
POL_SetupWindow_detect_exit
POL_SetupWindow_message "$LNG_WAIT_END" "$TITLE"
elif [ "$GAME_MEDIAVERSION" == "$LNG_MEDIA_DL_PATCH" ]; then
cd "$REPERTOIRE/tmp"
POL_SetupWindow_download "$LNG_DOWNLOAD_RUN" "$TITLE" "http://dl2.egosoft.com/download/x3tc/files/X3TCUpdate1.0.1_to_3.0.exe"
POL_SetupWindow_wait_next_signal "$LNG_INSTALL_RUN" "$TITLE"
wine "X3TCUpdate1.0.1_to_3.0.exe"
POL_SetupWindow_detect_exit
POL_SetupWindow_message "$LNG_WAIT_END" "$TITLE"
rm "$REPERTOIRE/tmp/X3TCUpdate1.0.1_to_3.0.exe"
cd "$REPERTOIRE/tmp"
POL_SetupWindow_download "$LNG_DOWNLOAD_RUN" "$TITLE" "http://dl2.egosoft.com/download/x3tc/files/X3TCUpdate3.0_to_3.1.exe"
POL_SetupWindow_wait_next_signal "$LNG_INSTALL_RUN" "$TITLE"
wine "X3TCUpdate3.0_to_3.1.exe"
POL_SetupWindow_detect_exit
POL_SetupWindow_message "$LNG_WAIT_END" "$TITLE"
rm "$REPERTOIRE/tmp/X3TCUpdate3.0_to_3.1.exe"
fi
POL_SetupWindow_message "$LNG_SUCCES" "$TITLE"
POL_SetupWindow_Close
exit
Edited by ademar