tis-firefox-esr-en 52.4.1-19

  • package : tis-firefox-esr-en
  • version : 52.4.1-19
  • description : Web browser english US Web Firefox ESR extended support
  • maintainer : TIS <technique@tranquil-it-systems.fr>
  • date : 2017-10-10 13:30:54
  • signer : TRANQUIL IT SYSTEMS
  • signature_date : 20171010-133047
  • min_os_version :
  • min_wapt_version : 1.3.5

setup.py

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

uninstallkey = []



def install():
    version = control.version.split('-',1)[0]
    ukey = 'Mozilla Firefox %s ESR (x86 en-US)'%version

    exe = 'Firefox Setup %sesr.exe'%version
    install_exe_if_needed(exe,'-ms',key=ukey,min_version=version,killbefore='firefox.exe')


def update_package():
    """updates the package / control version with the latest stable firefox version"""
    import re,requests,urlparse,glob

    # get index of all dowloads
    url = requests.head('https://download.mozilla.org/?product=firefox-esr-latest&os=win&lang=en-US',proxies={}).headers['Location']
    filename = urlparse.unquote(url.rsplit('/',1)[1])

    if not isfile(filename):
        print('Downloading %s from %s'%(filename,url))
        wget(url,filename)

        # updates control version from filename, increment package version.
        control = PackageEntry().load_control_from_wapt ('.')
        control.version = '%s-%s'%(re.findall('Firefox Setup (.*)esr\.exe',filename)[0],int(control.version.split('-',1)[1])+1)
        control.save_control_to_wapt('.')

    # removes old exe
    if isfile(filename):
        exes = glob.glob('Firefox*.exe')
        for fn in exes:
            if fn != filename:
                remove_file(fn)

if __name__ == '__main__':
    update_package()


    

manifest

[["WAPT/icon.png", "e9148eecf1132466e00621255540168529d53f2d"], ["WAPT/certificate.crt", "0db563dc9077b268ca07ba834322d0fc5e21f8e5"], ["WAPT/wapt.psproj", "557e60050809687d56525e6ac46df9c0e02ccae6"], ["setup.py", "6049a7a62fa37b1d774ed8df96074728aaed7dce"], ["Firefox Setup 52.4.1esr.exe", "ff14e5227a346d3946444f1124b4f596dd182757"], ["WAPT/control", "cdb6a0e9496aaa9cf6c298adf0647986581197d9"], ["WAPT/changelog.txt", "7509afe969f313063000fcf4a599506d87846ec4"]]