Forums

amélioration du script DirectX 9 : February 2005 - December 2006 patch

Auteur Réponses
mobidyc Dimanche 4 Janvier 2009 à 8:34
mobidycAnonymous

Bonjour,

voici une amélioration du script permettant d'installer DirectX 9 : February 2005 - December 2006 patch.

les changements apportés sont:
si le fichier a déjà été téléchargé et à un cksum de 250363113, on ne le retélécharge pas

voici le script:

#!/bin/bash

# Copyright (C) 2007 Pâris Quentin

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

if [ "$PLAYONLINUX" = "" ]
     then
          exit 0
fi
source "$PLAYONLINUX/lib/sources"
cfg_check

POL_SetupWindow_Init
LNG_DIRECTX="$(eval_gettext 'This wizard will help you to install a directx patch in playonlinux')"
POL_SetupWindow_free_presentation "Direct X" "$LNG_DIRECTX"
POL_SetupWindow_games "Choose a prefix to patch" "Direct X"
prefixe=$(detect_wineprefix "$APP_ANSWER")
if [ -e "$prefixe" ]
     then
          select_prefixe "$prefixe"
          mkdir -p $REPERTOIRE/tmp/dx9
          cd $REPERTOIRE/tmp/

          if [ ! -e "dx9.tar.gz" -o "$(cksum dx9.tar.gz |cut -f1)" != "250363113" ]
               then
                    POL_SetupWindow_download "$(eval_gettext 'Downloading Direct X')" "$(eval_gettext 'Downloading...')" "$SITE/divers/dx9/dx9.tar.gz"
          fi

          cd $REPERTOIRE/tmp/dx9
          POL_SetupWindow_wait "$(eval_gettext 'PlayOnLinux is installing the patch ...')" "$(eval_gettext 'Extracting...')" "cd $PWD && tar -xvf ../dx9.tar.gz"
          wine ./DXSETUP.exe /silent
          cd $REPERTOIRE
          rm -r $REPERTOIRE/tmp/dx9
          POL_SetupWindow_reboot
fi

POL_SetupWindow_Close

exit


bien sur, il faut que l'option "vider le répertoire temporaire" soit décoché dans les options de
POL.

cdt,
Mobidyc

This site allows content generated by members, and we promptly remove any content that infringes copyright according to our Terms of Service. To report copyright infringement, please send a notice to dmcayonlinux.com