tis-opera 45.0.2552.635-3

  • package : tis-opera
  • version : 45.0.2552.635-3
  • 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-07-20 11:23:14
  • signer : TRANQUIL IT SYSTEMS
  • signature_date : 20170720-112313
  • min_os_version :
  • min_wapt_version :

setup.py

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


uninstallkey = []

def install():
    print('installing smp-operainstaller')
    versionpaquet = control['version'].split('-',1)[0]
    if iswin64():
        install_exe_if_needed("Opera_%s_Setup_x64.exe" % versionpaquet,'/silent /quicklaunchshortcut=0 /pintotaskbar=0 /setdefaultbrowser=0 /launchopera=0 /allusers=1',key='Opera %s' % versionpaquet,min_version=versionpaquet)
    else:
        install_exe_if_needed("Opera_%s_Setup.exe" % versionpaquet,'/silent /quicklaunchshortcut=0 /pintotaskbar=0 /setdefaultbrowser=0 /launchopera=0 /allusers=1',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_sources():
    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_sources()
    

manifest

[["WAPT/icon.png", "133413f432cd4be212a94af867cde6456fa54d33"], ["WAPT/certificate.crt", "0db563dc9077b268ca07ba834322d0fc5e21f8e5"], ["WAPT/wapt.psproj", "557e60050809687d56525e6ac46df9c0e02ccae6"], ["Opera_45.0.2552.635_Setup.exe", "3567e93db667b543be99d68e4ae30d585332fb90"], ["setup.py", "0de7b6b1eec9c5b37d8ff5025727b77f542f132c"], ["Opera_45.0.2552.635_Setup_x64.exe", "09c796e1a8befbbdce4a4c381d9b9fdd9d8bd438"], ["WAPT/control", "aacc93e8371b5ab659c48866fa9b4b0f5d4f3e88"]]