El Foro

fonction Check_cdrom

personnaliser le message d'insertion du cdrom

Autor Respuestas
Tophu Monday 2 July 2007 at 22:31
Tophu

Avoir quelque chose comme ça:
Check_cdrom ()
{
     if [ "$2" != "" ]
     then
          message "$2"
     else
          message "$LNG_MOUNT_CDROM"
     fi
     if [ ! "$CDROM" = "" ]
     then
          if [ ! -e "$CDROM/$1" ]
          then
               erreur "$LNG_WINE_ERRORCDROM"
          exit 0
          fi
     fi
}

au lieu de ceci:
Check_cdrom ()
{
     message "$LNG_MOUNT_CDROM"
     if [ ! "$CDROM" = "" ]
     then
          if [ ! -e "$CDROM/$1" ]
          then
               erreur "$LNG_WINE_ERRORCDROM"
          exit 0
          fi
     fi
}

pour cette appelle de fonction:

Check_cdrom "chemin du setup.exe" "message d'insertion du cdrom personnalisé"
#ou
Check_cdrom "chemin du setup.exe"
Quentin PÂRIS Monday 2 July 2007 at 23:24
Quentin PÂRISAnonymous

On veut que le script soit international. Donc on évite ce genre de chose.
Tophu Monday 2 July 2007 at 23:50
Tophu

Si je modifie un peu

Check_cdrom ()
{
     if [ "$2" != "" ]
     then
          message "$LNG_MOUNT_CDROM ($2)"
     else
          message "$LNG_MOUNT_CDROM"
     fi
     if [ ! "$CDROM" = "" ]
     then
          if [ ! -e "$CDROM/$1" ]
          then
               erreur "$LNG_WINE_ERRORCDROM"
          exit 0
          fi
     fi
}



Check_cdrom "chemin du fichier" "designation du cdrom"
#ou
Check_cdrom "chemin du fichier"
Quentin PÂRIS Tuesday 3 July 2007 at 10:06
Quentin PÂRISAnonymous

Et il y aurait quoi dans "designation du cdrom" ?
Christhaal Tuesday 3 July 2007 at 11:00
Christhaal

Genre "CD numéro 1" ou "CD INSTALLATION" non?

Quentin PÂRIS Tuesday 3 July 2007 at 11:14
Quentin PÂRISAnonymous

La script doit être international ! Si vous faite ça, il y a que les francophones qui pourraient comprendre.
Estas Aqui: Index > > fonction Check_cdrom