tis-firefox-de 56.0.1-5

  • package : tis-firefox-de
  • version : 56.0.1-5
  • description : Firefox butineur Allemand
  • maintainer : Hubert TOUVET
  • date : 2018-02-27 18:59:36

setup.py

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

def install():

    if windows_version() < Version('6.1'):
        error("Firefox >= 53 is not available anymore for Windows XP")
    version = control.version.split('-',1)[0]
    ukey = 'Mozilla Firefox %s (x86 de)'%version
    exe = 'Firefox Setup %s.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_base = 'https://download-installer.cdn.mozilla.net/pub/firefox/releases/latest/win32/de/'
    url_base = 'https://download-installer.cdn.mozilla.net/pub/firefox/releases/43.0/win32/de/'
    index = wgets(url_base)

    # get list of lastest german versions
    re_setup = re.compile(r'<a href=".*/(Firefox%20Setup%20[0-9.]*.exe)">Firefox Setup .*</a>')
    filename = urlparse.unquote(re_setup.findall(index)[0])
    url = url_base+filename
    """
    url = requests.head('https://download.mozilla.org/?product=firefox-latest&os=win&lang=de').headers['Location']
    filename = urlparse.unquote(url.rsplit('/',1)[1])

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

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

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


if __name__ == '__main__':
    update_package()
    

Changelog

No changelog
    

manifest.sha256

[["WAPT/control", "273c16ee3cba07164c39a723f1e13c9f7babba3dee2a596543fc96e1c56e82ee"], ["setup.py", "50ed7b26b57bb6bd1e58e0ff914299e8f94e00f7b9153b7b80ec13cb6f51725e"], ["WAPT/certificate.crt", "79e5388683c0b6cb03f4f81e4e58e3a11463b2b6cf169dd9c453098027dcfaa4"], ["WAPT/wapt.psproj", "795d36d10109ca85357285f79090fac2be856e5830ea31fa913cc55cb825807b"], ["Firefox Setup 56.0.1.exe", "3da829b569841ed0977206ccaf7515e5be2bbc75c01aa8d6df193ccd5b93b29c"]]