[Wapt] installation silencieuse

Simon Fonteneau sfonteneau at stemarie-aizenay.fr
Wed Jul 29 23:13:35 CEST 2015


Salut

Tu utilise mes script ;-)

Pour plus d'info sur leur utilisations:
http://wiki.lesfourmisduweb.org/index.php/Cr%C3%A9ation_paquet_wapt


Ce que je fait c'est que je désinstalle l'ancienne version avant:


Ceci doit fonctionner :


# -*- coding: utf-8 -*-
from setuphelpers import *

uninstallkey = ['VSDC Free Video Editor_is1']

def install():

      softname = 'VSDC Free Video Editor'
      versionsoft = '3.2.1.373'

      check_installed = installed_softwares(softname)
      # si cette liste globale n est pas vide, on check chaque logiciel
      if check_installed:
            # boucle pour chaque logiciel trouvée
            for uninstall in check_installed:
                  if uninstall['version'] == versionsoft :
                        print(u'The software is already installed' )
                        return (0);
                  if uninstall['version'] > versionsoft :
                        print(u'The software is already installed and its
version is newer than the version of the package' )
                        return (0);

      #Recherche du Logiciel logiciel
      check_installed_soft = installed_softwares(softname)
      # si cette liste globale n est pas vide on remove chaque logiciel
      if check_installed_soft:
          # boucle pour chaque logiciel trouvee
             for uninstall in check_installed_soft:
                # Si la version est differente que la version du fichier
controle:
                if uninstall['version'] < versionsoft:
                   print(u'remove old software' )
                   # Surpression grece a la a la uninstall string présente
dans la uninstall key.
                   cmd = WAPT.uninstall_cmd(uninstall['key'])
                   run(cmd)


      print('installing smp-vsdcfreevideoeditor')
      run(r'"video_editor.exe" /VERYSILENT')

      check_installed_out = installed_softwares(softname)
      if check_installed_out:
          for uninstall in check_installed_out:
                     if uninstall['version'] == versionsoft:
                               print(u'The software installation was
successful')
                               return (0);
          for uninstall in check_installed_out:
                     if uninstall['version'] > versionsoft:
                        print(u'The software is already installed and its
version is newer than the version of the package' )
                        return (0);
          for uninstall in check_installed_out:
                     if uninstall['version'] != versionsoft:
                               error('The output verification has found a
old version of software')
      error('End audit did not find the software.')



Simon

Le 29 juillet 2015 16:52, Yohann Pla <Yohann.Pla at lemarsan.fr> a écrit :

>  Bonjour,
>
>
> je souhaite déployer VSDC free video editor (
> http://www.videosoftdev.com/fr/free-video-editor) sur certains de mes
> postes. j'ai donc créé le paquet et editer le setup.py
>
> je me suis inspiré d'un script qui fonctionne pour Gimp et je l'ai adapté
> pour VSDC :
>
> import platform
> from setuphelpers import *
>
> uninstallkey=['VSDC Free Video Editor_is1']
>
> def install():
>
>    softname = 'VideoEditor'
>    versionsoft = '3.2.0.370-0'
>    check_installed = installed_softwares(softname)
>    # si cette liste globale n est pas vide, on check chaque logiciel
>    if check_installed:
>             # boucle pour chaque logiciel trouvée
>             for uninstall in check_installed:
>                   if uninstall['version'] == versionsoft :
>                         print(u'The software is already installed' )
>                         return (0);
>                   if uninstall['version'] > versionsoft :
>                         print(u'The software is already installed and its
> version is newer than the version of the package' )
>                         return (0);
>
>
>    global uninstallkey
>    print("installing exe")
>    print run('video_editor.exe /SUPPRESSMSGBOXES /VERYSILENT /SP-')
>    return 0
>
>    check_installed_out = installed_softwares(softname)
>    if check_installed_out:
>           for uninstall in check_installed_out:
>                      if uninstall['version'] == versionsoft:
>                                print(u'The software installation was
> successful')
>                                return (0);
>           for uninstall in check_installed_out:
>                      if uninstall['version'] > versionsoft:
>                         print(u'The software is already installed and its
> version is newer than the version of the package' )
>                         return (0);
>           for uninstall in check_installed_out:
>                      if uninstall['version'] != versionsoft:
>                                error('The output verification has found a
> old version of software')
>    error('End audit did not find the software.')
>
>
> je voudrais que cette installation soit complétement silencieuse.
> Sauf qu'un problème survient car quand le programme vient verifier la
> presence d'une version deja installé et qu'il en trouve une, une boite de
> dialogue s'ouvre alors pour me demander si je veux désinstaller la version
> existante.
>  Et ce meme avec les paramètres optionnels  /SUPPRESSMSGBOXES
> /VERYSILENT.
> je ne vois pas comment supprimer cette boite de dialogue .
> le reste de l'installation se passe sans problème qu'on est répondu oui
> ou non a la question.
> La désinstallation par wapt ne fonctionne pas du tout.
>
> merci pour l'aide
>
> Yohann
>    [image: Le Marsan Agglomération] Yohann Pla
> Animateur multimédia  Yohann.Pla at lemarsan.fr
> -
> Le Marsan Agglomération
> 575, avenue du Maréchal FOCH - BP 70171 - 40003 Mont de Marsan cedex
>
> _______________________________________________
> WAPT mailing list
> WAPT at lists.tranquil.it
> http://lists.tranquil.it/listinfo/wapt
>
>


--
-------------- section suivante --------------
Une pi�ce jointe HTML a �t� nettoy�e...
URL: <http://lists.tranquil.it/pipermail/wapt/attachments/20150729/6dba8e2a/attachment-0001.html>


More information about the WAPT mailing list