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

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

Changelog

No changelog
    

manifest.sha256

[["WAPT/icon.png", "d2364fd7d7cd0ace56e569bd48b98ba0c15d94a2826ccbd2fbeececd779164ca"], ["WAPT/certificate.crt", "79e5388683c0b6cb03f4f81e4e58e3a11463b2b6cf169dd9c453098027dcfaa4"], ["WAPT/wapt.psproj", "795d36d10109ca85357285f79090fac2be856e5830ea31fa913cc55cb825807b"], ["Opera_45.0.2552.635_Setup.exe", "41d6e4a0278861379685988d71521d82d0c3554916a80dd54a26e3010bd92cc8"], ["setup.py", "ad65e367483c7f48932f66fe61ebe58acb2131a31ac0c763ad6baa6ffab7a1d1"], ["Opera_45.0.2552.635_Setup_x64.exe", "a72c2b10e016132b755c26b662196c8b781e90bbdd4683d31c7d23e20330789a"], ["WAPT/control", "67218ece8dc56d6bd1220557d6043995605a80ef91da1dd5fa776e74577a794d"]]