Détails du package smp-winff_1.5.5-2_all.wapt
retour Revenir à la liste des packages

smp-winff

ATTENTION CE DÉPÔT n'est plus compatible 1.3 vous devez migrer en 1.5.1.21 !

Fichier control :

package           : smp-winff
version           : 1.5.5-2
architecture      : all
section           : base
priority          : optional
maintainer        : Simon Fonteneau
description       : Encodeur de vidéo
depends           : 
conflicts         : 
maturity          : 
locale            : 
min_os_version    : 
max_os_version    : 
min_wapt_version  : 1.3.9.3
sources           : 
installed_size    : 
signer            : wapt.lesfourmisduweb.org
signer_fingerprint: 8da83ebdac1a25e820b186510d049f47407b11835b0664fdc5bacd3595b1671d
signature         : jFvcIUQ5WqisUkJZ3Q5PYRRVh3afwluPIlrEleiDJiukhvK8/hMSwX2LneAFDaa08bc5zIgn0+eM/nmOl9j5aZlELd2/YZNmw6AyRcsDylEACKAYIDjbN0/lfTLVdNHWWyATbdV1zaXxqbUElD2L5fbngAsfT9GQaO4JdvjV1zLVR51jjTA/skiiS1kTtCyCrg5AQWP6Z5VCflDiU6qUdeP4h3Q5OpMOqHF2Ev32Lw38cHqu0ZlNMLRSrzSdkZDdsG8LDNN+p1XKJE2PVPuQ801SVgezdd2T4dDZHaqjJ2G4L2Rt1wKSZ/S1TIfVDPWBTN3FPIPCWeH3HBrkEQc50g==
signature_date    : 20171122-013758
signed_attributes : package,version,architecture,section,priority,maintainer,description,depends,conflicts,maturity,locale,min_os_version,max_os_version,min_wapt_version,sources,installed_size,signer,signer_fingerprint,signature_date,signed_attributes






Fichier setup.py :

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

# registry key(s) where WAPT will find how to remove the application(s)
uninstallkey = []



def install():

    def get_vers_winff(soft):
        if isfile(makepath(install_location(soft['key']),'winff.exe')):
            return get_file_properties(makepath(install_location(soft['key']),'winff.exe'))['FileVersion']

    if iswin64():
        install_exe_if_needed('WinFF-1.5.5-setup.exe',silentflags='/VERYSILENT /NORESTART',key='WinFF_is1',min_version='1.5.5.0',get_version=get_vers_winff)
    else:
        install_exe_if_needed('WinFF-1.5.4-setup.exe',silentflags='/VERYSILENT /NORESTART',key='WinFF_is1',min_version='1.5.4.0',get_version=get_vers_winff)






# re def install_exe_if_needed because bug in 1.3.9.3

def install_exe_if_needed(exe,silentflags=None,key=None,min_version=None,killbefore=[],accept_returncodes=[0,1603,3010],timeout=300,get_version=None):
    """Install silently the supplied setup executable file, and add the uninstall key to
    global uninstallkey list if it is defined.

    Check if already installed at the supllied min_version.

    Kill the processes in killbefore list before launching the setup.

    Raises an error if, after the setup install, the uninstall key is not found in registry.

    Args:
        exe (str) : path to the setup exe file
        silentflags (str) : flags to append to the exe command line for silent install
                            if not provided, tries to guess them.
        key (str) : uninstall key to check in registry and to add to uninstallkey global list
        min_version (str) : if installed version is equal or gretaer than this, don't install
                            if not provided (None), guess it from exe setup file properties.
                            if == '': ignore version check.
        kill_before (list of str) : processes to kill before setup, to avoid file locks
                                    issues.
        get_version (callable) : optional func to get installed software version from one entry retunred by installed_softwares
            if not provided, version is taken from 'version' attribute in uninstall registry
    Returns:
        None

    """
    if not isfile(exe):
        error('setup exe file %s not found in package' % exe)
    if silentflags is None:
        silentflags = getsilentflags(exe)
    # use empty string to ignore version checking
    if min_version is None:
        min_version = getproductprops(exe)['version']

    import inspect
    caller_globals = inspect.stack()[1][0].f_globals
    WAPT = caller_globals.get('WAPT',None)
    force = WAPT and WAPT.options.force

    if need_install(key,min_version=min_version or None,force=force,get_version=get_version):
        if killbefore:
            killalltasks(killbefore)
        run(r'"%s" %s' % (exe,silentflags),accept_returncodes=accept_returncodes,timeout=timeout)
        if key and not installed_softwares(uninstallkey=key):
            error('Setup %s has been ran but the uninstall key %s can not be found' % (exe,key))
        if key and min_version is not None and need_install(key,min_version=min_version or None,force=False,get_version=get_version):
            error('Setup %s has been and uninstall key %s found but version is not good' % (exe,key))
    else:
        print('Exe setup %s already installed. Skipping' % exe)
    if key:
        # will try to add key in the caller's (setup.py) uninstallkey list
        if 'uninstallkey' in caller_globals and not key in caller_globals['uninstallkey']:
            caller_globals['uninstallkey'].append(key)