tis-opera 48.0.2685.39-1

  • package : tis-opera
  • version : 48.0.2685.39-1
  • description : Opera est un navigateur Web gratuit et multiplate-forme développé par la société norvégienne Opera Software
  • maintainer : Simon Fonteneau
  • date : 2017-10-10 20:21:55
  • signer : TRANQUIL IT SYSTEMS
  • signature_date : 20171010-202145
  • min_os_version : 6.0
  • min_wapt_version :

setup.py

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


uninstallkey = []

def install():
    if windows_version() > Version('5.2'):
        print('installing smp-operainstaller')
        versionpaquet = control['version'].split('-',1)[0]
        if iswin64():
            install_exe_if_needed("Opera_%s_Setup_x64.exe" % versionpaquet,'/install /silent /launchopera 0 /setdefaultbrowser 0',key='Opera %s' % versionpaquet,min_version=versionpaquet)
        else:
            install_exe_if_needed("Opera_%s_Setup.exe" % versionpaquet,'/install /silent /launchopera 0 /setdefaultbrowser 0',key='Opera %s' % versionpaquet,min_version=versionpaquet)

        remove_desktop_shortcut('Opera')

        uninstallkey.remove('Opera %s' % versionpaquet)

        for task in run('schtasks').splitlines() :
            if 'Opera scheduled Autoupdate' in task:
                taskname = task.split('   ')[0]
                run_notfatal('schtasks /Delete /tn "%s" /f' % taskname)



def uninstall():
    for uninstall in installed_softwares('Opera Stable'):
       killalltasks('video_editor.exe')
       cmd = uninstall['uninstall_string'] + ' /silent'
       run(cmd)

def update_package():
    import re

    re_versions = re.compile('<a href="([\d\.]*)/">')
    index = wgets('https://get.geo.opera.com/pub/opera/desktop/')
    # find latest
    last_version = sorted(re_versions.findall(index))[-1]



    if not isfile('Opera_%s_Setup.exe' % last_version):
        wget('https://get.geo.opera.com/pub/opera/desktop/%s/win/Opera_%s_Setup.exe' % (last_version,last_version),'Opera_%s_Setup.exe' % (last_version) )

    if not isfile('Opera_%s_Setup_x64.exe' % last_version):
        wget('https://get.geo.opera.com/pub/opera/desktop/%s/win/Opera_%s_Setup_x64.exe' % (last_version,last_version),'Opera_%s_Setup_x64.exe' % (last_version))

    vers = get_file_properties('Opera_%s_Setup.exe' % last_version)['ProductVersion']

    allexe = glob.glob('*.exe')
    for exe in allexe:
        vers = get_file_properties(exe)['ProductVersion']
        if vers != last_version :
            remove_file(exe)

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

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

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


if __name__ == '__main__':
    update_package()
    

manifest

[["WAPT/icon.png", "133413f432cd4be212a94af867cde6456fa54d33"], ["WAPT/certificate.crt", "0db563dc9077b268ca07ba834322d0fc5e21f8e5"], ["WAPT/wapt.psproj", "557e60050809687d56525e6ac46df9c0e02ccae6"], ["Opera_48.0.2685.39_Setup_x64.exe", "0aa4b704f6fbf5d76c92286ec0335dcd134b64b4"], ["setup.py", "d8b97d5b39b1f4ed9500ed2eb2143f30347d205e"], ["Opera_48.0.2685.39_Setup.exe", "1137111f8441a7444e8b18cbf2d9f9754e6e1867"], ["WAPT/control", "caa3d58750e2abcf13ba27ab0a75c83e94693b22"]]