El Foro

Company of Heroes

Autor Respuestas
teratani Wednesday 2 November 2011 at 15:31
terataniAnonymous

Bonjour,

proposition de script pour Company of Heroes :

    #!/bin/bash
    # Date : (2011-11-02 12:00)
    # Last revision : N/A
    # Wine version used : 1.3.30
    # Distribution used to test : Ubuntu 11.10
    # Author : GNU_Raziel modifié par teratani
    # Licence : Retail
    # Only For : http://www.playonlinux.com
     
    [ "$PLAYONLINUX" = "" ] && exit 0
    source "$PLAYONLINUX/lib/sources"
     
    TITLE="Company of Heroes"
    PREFIX="CoH"
    WORKING_WINE_VERSION="1.3.30"
    GAME_VMS="128"
   
    if [ "$POL_LANG" == "fr" ]; then
    LNG_CHOOSE_MEDIA="Quelle version possédez-vous?"
    LNG_DVD="Version DVD"
    LNG_STEAM="Version Steam"
    LNG_INSERT_MEDIA="Veuillez insérer le DVD de $TITLE dans votre lecteur\\nsi ce n'est pas déja fait."
    LNG_WAIT_END="Appuyez sur \\"Suivant\\" UNIQUEMENT quand l'installation du\\njeu sera terminée sous peine de devoir recommencer l'installation."
    LNG_WAIT_STEAM_END="Appuyez sur \\"Suivant\\" UNIQUEMENT quand l'installation du jeu Steam\\nsera terminée sous peine de devoir recommencer l'installation."
    LNG_SUCCES="$TITLE a été installé avec succès."
else
    LNG_CHOOSE_MEDIA="Which version do you have?"
    LNG_DVD="DVD Version"
    LNG_STEAM="Steam Store Version"
    LNG_INSERT_MEDIA="Please insert $TITLE media into your disk drive\\nif not already done."
    LNG_WAIT_END="Click on \\"Forward\\" ONLY when the game installation is finished\\nor you will have to redo the installation."
    LNG_WAIT_STEAM_END="Click on \\"Forward\\" ONLY when Steam game installation\\nwill be finished or you will have to redo the installation."
    LNG_SUCCES="$TITLE has been installed successfully."
fi


   # Starting the script
   rm "$POL_USER_ROOT/tmp/*.jpg"
   POL_GetSetupImages "http://files.playonlinux.com/resources/setups/Rage/top.jpg" "http://files.playonlinux.com/resources/setups/Rage/left.jpg" "$TITLE"
   POL_SetupWindow_Init
     
    # Starting debugging API
    POL_Debug_Init
     
    POL_SetupWindow_presentation "$TITLE" "RELIC Entertainment" "http://www.companyofheroes.com/" "GNU_Raziel modifié par teratani" "$PREFIX"
     
    # Setting prefix path
    POL_Wine_SelectPrefix "$PREFIX"
     
    # Downloading wine if necessary and creating prefix
    POL_System_SetArch "auto"
    POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
     
    # Choose between DVD and Steam version
    POL_SetupWindow_menu "$LNG_CHOOSE_MEDIA" "$TITLE" "$LNG_DVD~$LNG_STEAM" "~"
 
    if [ "$APP_ANSWER" == "$LNG_DVD" ]; then
           GAME_MEDIAVERSION="DVD"
    else 
           GAME_MEDIAVERSION="STEAM"
fi
    
    # Installing mandatory dependencies
    if [ "$GAME_MEDIAVERSION" == "STEAM" ]; then
           POL_Call POL_Install_steam
    fi
    POL_Call POL_Install_vcrun2005 
    POL_Call POL_Install_vcrun2008
    POL_Call POL_Install_dxfullsetup 
      
         
    # Mandatory pre-install fix for steam
    POL_Call POL_Install_steam_flags "4560"
     
    # Begin game installation
    if [ "$GAME_MEDIAVERSION" == "DVD" ]; then
       # Asking for CDROM and checking if it's correct one
       POL_SetupWindow_message "$LNG_INSERT_MEDIA"       
       POL_SetupWindow_cdrom
       POL_SetupWindow_check_cdrom "COH.ico"
       POL_Wine start /unix "$CDROM/Setup.exe"
       POL_SetupWindow_message "$LNG_WAIT_END" "$TITLE"       
else 
       cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
       POL_Wine start /unix "steam.exe" steam://install/4560
       POL_SetupWindow_message "$LNG_WAIT_STEAM_END" "$TITLE"       
       POL_Wine_WaitExit "$TITLE"
fi


    # Sound problem fix - pulseaudio related
    [ "$POL_OS" = "Linux" ] && Set_SoundDriver "alsa"
    [ "$POL_OS" = "Linux" ] && Set_SoundEmulDriver "Y"
    ## End Fix


    ## PlayOnMac Section
    [ "$POL_OS" = "Mac" ] && Set_Managed "Off"
    ## End Section

        
    # Making shortcut
    if [ "$INSTALL_METHOD" == "STEAM" ]; then
       POL_Shortcut "steam.exe" "$TITLE" "$TITLE.png" "steam://rungameid/4560"
    else    
    POL_Shortcut "RelicCOH.exe" "Company of Heroes"
    fi    
   
 
    POL_SetupWindow_message "$LNG_SUCCES" "$TITLE"
    POL_SetupWindow_Close
    exit 0
 


Description : http://www.megaupload.com/?d=RQ41SKLI

Editado por: teratani