tis-handbrake 1.0.7-1

  • package : tis-handbrake
  • version : 1.0.7-1
  • description : HandBrake est un outil pour convertir la vidéo de presque n'importe quel format à une sélection de codecs modernes et largement pris en charge.
  • maintainer : Simon Fonteneau
  • date : 2017-09-13 10:19:14
  • signer : TRANQUIL IT SYSTEMS
  • signature_date : 20170913-101914
  • min_os_version :
  • min_wapt_version :
  • Depends :

setup.py

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

uninstallkey = []



def install():
    print('installing handbrake ')
    versionpaquet = control['version'].split('-',1)[0]
    if iswin64():
        if installed_softwares('HandBrake'):
            key = WAPT.uninstall_cmd('HandBrake')
            if r'C:\Program Files (x86)' in key[0]:
                 run(WAPT.uninstall_cmd('HandBrake'))
        install_exe_if_needed('HandBrake-%s-x86_64-Win_GUI.exe' % versionpaquet,silentflags='/S -',key='HandBrake',min_version=versionpaquet,killbefore=['HandBrake.exe'])
    else:
        install_exe_if_needed('HandBrake-%s-i686-Win_GUI.exe' % versionpaquet,silentflags='/S -',key='HandBrake',min_version=versionpaquet,killbefore=['HandBrake.exe'])
    remove_desktop_shortcut('HandBrake')



# Pour mettre a jour le paquet depuis les sources Officiel : CTRL + F9
# Puis faire un build-upload !




def update_package():


    realversion = None
    for line in wgets('https://handbrake.fr/').splitlines() :
      if not realversion :
        if  'Download HandBrake' in line :
         realversion = line[line.find('Download HandBrake') + 19:line.find('</b><br>')]


    os.chdir(os.path.dirname(__file__))

    from waptpackage import PackageEntry
    pe = PackageEntry()
    pe.load_control_from_wapt(os.getcwd())

    pe.version = realversion + '-0'
    pe.save_control_to_wapt(os.getcwd())


# je liste tous les fichiers exe dans le package et si la version ne correspond pas je supprime le fichier
    allexe = glob.glob('*.exe')
    for exe in allexe:
        if exe != 'HandBrake-%s-x86_64-Win_GUI.exe' % realversion :
            if exe != 'HandBrake-%s-i686-Win_GUI.exe' % realversion :
                remove_file(exe)


# Je telecharge
    if not isfile('HandBrake-%s-x86_64-Win_GUI.exe' % realversion ) :
        wget('https://download.handbrake.fr/handbrake/releases/%s/HandBrake-%s-x86_64-Win_GUI.exe' % (realversion,realversion) ,os.getcwd())
    if not isfile('HandBrake-%s-i686-Win_GUI.exe' % realversion ) :
        wget('https://download.handbrake.fr/handbrake/releases/%s/HandBrake-%s-i686-Win_GUI.exe' % (realversion,realversion) ,os.getcwd())



    print('Update finished, you can now do a build-upload ')



if __name__ == '__main__':
    update_package()




    

manifest

[["HandBrake-1.0.7-x86_64-Win_GUI.exe", "602e342cd786227812c34040574084ca95bad479"], ["WAPT/icon.png", "52447f42fad7c2250be0d10669362b81fdd3e67b"], ["WAPT/certificate.crt", "0db563dc9077b268ca07ba834322d0fc5e21f8e5"], ["WAPT/wapt.psproj", "03737258cc2fccafb573c2be21e85d953e5fea2b"], ["HandBrake-1.0.7-i686-Win_GUI.exe", "a3b5a28475ccf4d31a8d72e4de49a2302859110f"], ["setup.py", "84a029d75dd6c44db3aaf079e79e85fa1e502f9e"], ["WAPT/control", "600cc06caefa0ff5dbbdc11db07b26835b643835"]]