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 : 2018-02-27 19:06:05

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()
    

Changelog

No changelog
    

manifest.sha256

[["WAPT/icon.png", "d2364fd7d7cd0ace56e569bd48b98ba0c15d94a2826ccbd2fbeececd779164ca"], ["WAPT/certificate.crt", "79e5388683c0b6cb03f4f81e4e58e3a11463b2b6cf169dd9c453098027dcfaa4"], ["WAPT/wapt.psproj", "795d36d10109ca85357285f79090fac2be856e5830ea31fa913cc55cb825807b"], ["Opera_48.0.2685.39_Setup_x64.exe", "537fc1270d5dbcb515782c122dc417ac124ebd78dd2fed229fde7a5fc6b71298"], ["setup.py", "83258296b8b060529c3dc39bddc3e3494ed62cbda09093afda868c832e95659e"], ["Opera_48.0.2685.39_Setup.exe", "0ced493b5c3aed9c25d45ebcda7e589166e8a21d3578d581a5ef1bb0554e0f96"], ["WAPT/control", "0d869b5da4f478d50444430d45da12df1d8a16dad0950a9d7cdcdd6e59ec95dd"]]