tis-firefox-en 60.0.1-33

  • package : tis-firefox-en
  • version : 60.0.1-33
  • description : Firefox Web Browser English
  • maintainer : TIS <technique@tranquil-it-systems.fr>
  • date : 2018-05-23 17:12:45

setup.py

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

uninstallkey = []

def install():

    softname ='Mozilla Firefox'

    diskfreespacebefore = get_disk_free_space(programfiles)

    for uninstall in installed_softwares(softname):
        if 'x86' in uninstall['name']:
            if uninstall_key_exists(uninstall['key']):
                killalltasks('firefox.exe')
                cmd = WAPT.uninstall_cmd(uninstall['key'])
                run(cmd)
                time.sleep (5)

    for uninstall in installed_softwares(softname):
        if 'ESR' in uninstall['name']:
            if uninstall_key_exists(uninstall['key']):
                killalltasks('firefox.exe')
                cmd = WAPT.uninstall_cmd(uninstall['key'])
                run(cmd)
                time.sleep (5)

    version = control.version.split('-',1)[0]
    ukey = 'Mozilla Firefox %s (x86 en-US)'%version
    exe = 'Firefox Setup %s.exe'%version
    install_exe_if_needed(exe,'-ms',key=ukey,min_version=version,killbefore='firefox.exe')

    diskfreespaceafter = get_disk_free_space(programfiles)

    difffreespace = diskfreespacebefore - diskfreespaceafter
    print (ur"Espace disque occupé :" + str(difffreespace))



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/fr/'
    url_base = 'https://download-installer.cdn.mozilla.net/pub/firefox/releases/43.0/win32/fr/'
    index = wgets(url_base)

    # get list of lastest french 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=en-US').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

[["Firefox Setup 60.0.1.exe", "198d014bcb46c37901884c16a7f8ad5441e47d4b1d1ee0eb661779d0b0c57da3"], ["WAPT/icon.png", "948e4bf2f1c1595091315354eb9fd9fb8f77d6675a2dd24337e35d9b7a4966a1"], ["WAPT/certificate.crt", "13fb474c5c23c135a77aba592eb8821b9ecbcc463f5b7312312b87b20eac6779"], ["WAPT/wapt.psproj", "df3e2fa87fea9c7bdfcc22039b9ef7303f092898882d9f3f4233f5d92f90b3c7"], ["setup.py", "894dfbef61df65a81abaa4905f5dfeb894f45f71c5604cfd94d77e1ea3f20ddb"], ["WAPT/control", "9b62e0ff9f460591b0e5a6f2b3f964536e2ed4a82505f692a2ccc7d57d2eef2f"]]