El Foro

Script d'installation de Grand Fantasias

Autor Respuestas
SamirGL Tuesday 17 November 2015 at 18:30
SamirGL

OS de test : ArchLinux

Version de POM/POL : C'est la version playonlinux-4.2.9-1 :D

Rapport  : Le jeu se lance ainsi que son laucher pour l'instant aprés si des bugs arrives je peut essayer de corriger le script :D

 

Script :
#!/usr/bin/env playonlinux-bash
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
POL_SetupWindow_Init
 
POL_SetupWindow_presentation "GrandFantasias" "Samir"
 
POL_System_TmpCreate "GrandFantasias"
 
POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD"
 
if [ "$INSTALL_METHOD" = "LOCAL" ]
then
    POL_SetupWindow_browse "Please select the installation file to run." "GrandFantasias"
    INSTALLER="$APP_ANSWER"
elif [ "$INSTALL_METHOD" = "DOWNLOAD" ]
then
    cd "$POL_System_TmpDir"
    POL_Download "http://download.aeriagames.com/files/games/fr/grandfantasia/csd/grandfantasia_fr_downloader.exe"
    INSTALLER="$POL_System_TmpDir/grandfantasias"
fi
 
POL_Wine_SelectPrefix "GrandFantasias"
POL_Wine_PrefixCreate
 
POL_SetupWindow_wait "Installation in progress." "GrandFantasiasMMORPG"
POL_Wine "$INSTALLER"
 
POL_System_TmpDelete
 
POL_Shortcut "GrandFantasia.exe" "GrandFantasias"
 
POL_SetupWindow_Close
exit

Editado por: SamirGL

petch Tuesday 17 November 2015 at 19:04
petch
Developer

Hi,

My script review:

- the script lacks POL_Debug_Init right after POL_SetupWindow_Init. By the way POL_Debug_Init will require $TITLE to have been set previously.

POL_SetupWindow_presentation "GrandFantasias" "Samir"

POL_SetupWindow_presentation takes 5 parameters:

POL_SetupWindow_presentation [Program's name] [Program's editor] [Editor's url] [Scriptor's name] [Prefix's name]

POL_SetupWindow_browse"Please select the installation file to run." "GrandFantasias"

All user oriented messages must support localization
http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_10:_Script_Translation

    INSTALLER="$POL_System_TmpDir/grandfantasias"
Are you sure the installer is not called  grandfantasia_fr_downloader.exe in this case?
POL_SetupWindow_wait "Installation in progress." "GrandFantasiasMMORPG"
You can use POL_Wine_WaitBefore "$TITLE" instead, that will be one less message that requires localization support.
 
That's it for me...
Pierre.

Editado por: petch