tis-firefox 64.0.2-1

  • package : tis-firefox
  • version : 64.0.2-1
  • architecture : x64
  • locale : it
  • description : Firefox Web Browser
  • maintainer : Kevin Guerineau, TIS <technique@tranquil-it-systems.fr>
  • date : 2019-01-11 14:53:51
  • min_wapt_version : 1.5
  • min_os_version : 6.1
  • max_os_version :
  • impacted_process : firefox.exe

setup.py

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

uninstallkey = []

def install():

    waptversion = Version(__version__)

    if waptversion > Version('1.5') :

        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]
        arch = control.architecture
        locale = control.locale
        if locale == 'es':
            locale_uninstall = 'es-ES'
            ukey = 'Mozilla Firefox %s (%s %s)'%(version,arch,locale_uninstall)
        elif locale == 'en':
            locale_uninstall == 'es-US'
            ukey = 'Mozilla Firefox %s (%s %s)'%(version,arch,locale_uninstall)
        else:
            ukey = 'Mozilla Firefox %s (%s %s)'%(version,arch,locale)

        exe = 'Firefox Setup %s_%s_%s.exe'%(version,arch,locale)
        install_exe_if_needed(exe,'-ms',key=ukey,min_version=version,killbefore='firefox.exe')

        for mms in installed_softwares('MozillaMaintenanceService'):
            if uninstall_key_exists(mms['key']):
                run(uninstall_cmd(mms['key']))

        diskfreespaceafter = get_disk_free_space(programfiles)

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

    else:
        error('This package is not compatible with your WAPT version. Please upgrade to WAPT 1.5 or more.')




def update_package(language='fr',architecture='x64'):
    """updates the package / control version with the latest stable firefox version"""
    import re,requests,urlparse,glob

    if architecture=='x64':
        osarch = 'win64'
    elif architecture =='x86':
        osarch = 'win'
    else :
        raise Exception ('unsupported architecture')

    proxies = {}
    if isfile(makepath(application_data(),'waptconsole','waptconsole.ini')):
        proxywapt = inifile_readstring(makepath(user_local_appdata(),'waptconsole','waptconsole.ini'),'global','http_proxy')
        if proxywapt :
            proxies = {'http':proxywapt,'https':proxywapt}

    #proxy = {'http':'http://srvproxy:3128','https':'http://srvproxy:3128'}
    #proxy = {}
    # 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-ssl&os=%s&lang=%s' % (osarch,language),proxies=proxies).headers['Location']

    #url = requests.head('https://download.mozilla.org/?product=firefox-latest-ssl&os=win64&lang=fr',proxies=proxy).headers['Location']
    filename = urlparse.unquote(url.rsplit('/',1)[1])

    # updates control version from filename, increment package version.
    control = PackageEntry().load_control_from_wapt ('.')

    if architecture=='x64':
        filename = urlparse.unquote(url.rsplit('/',1)[1]).replace('.exe','_x64_%s.exe' % language)
        control.version = '%s-0' % (re.findall('Firefox Setup (.*)\_x64\_%s.exe' % language,filename)[0])
        control.architecture = 'x64'
    else:
        filename = urlparse.unquote(url.rsplit('/',1)[1]).replace('.exe','_x86_%s.exe' % language)
        control.version = '%s-0' % (re.findall('Firefox Setup (.*)_x86_%s.exe' % language ,filename)[0])
        control.architecture = 'x86'

    if not isfile(filename):
        print('Downloading %s from %s'%(filename,url))
        wget(url,filename,proxies=proxies)
    else:
        print('local file already up to date')

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

   # Removes old exe x64
    exes = glob.glob('*.exe')
    for fn in exes:
        if fn != filename:
            remove_file(fn)

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


    control.locale = language
    control.save_control_to_wapt('.')


if __name__ == '__main__':
    import argparse
    parser = argparse.ArgumentParser(description='Update firefox esr package')
    parser.add_argument('--language', dest='language', help='language code (fr/en/de/es)')
    parser.add_argument('--architecture', dest='architecture', help='architecture x86 or x64')

    args = parser.parse_args()
    language = args.language.strip()
    architecture = args.architecture.strip()
    print ('updating package for language %s and architecture %s' % (language,architecture))
    update_package(language=language,architecture=architecture)

    

Changelog

No changelog
    

manifest.sha256

WAPT/icon.png 948e4bf2f1c1595091315354eb9fd9fb8f77d6675a2dd24337e35d9b7a4966a1
WAPT/certificate.crt 13fb474c5c23c135a77aba592eb8821b9ecbcc463f5b7312312b87b20eac6779
WAPT/wapt.psproj df3e2fa87fea9c7bdfcc22039b9ef7303f092898882d9f3f4233f5d92f90b3c7
Firefox Setup 64.0.2_x64_it.exe 078b0f9b83ff35f0e5b16de64a16b6bff0675afea63413247725456a7b0051fe
setup.py 2390752eafb4d6d0b394daee642de12bbaf6b1b23a2fb0b573714b888d831def
WAPT/control 4514dac7d70028da64ba11d01557b2cdd0bddafa4c605a441070fa2772080e3d

Forum feed

WAPT Packages / Paquets WAPT • Re: Date - base de registre

CODE :

from setuphelpers import *import timedef install():    registry_setstring(HKEY_LOCAL_MACHINE, r'SOFTWARE\APPLILOC\FireFox ESR Portable', 'InstallDate' ,  time.strftime('%Y%m%d') , type=REG_SZ)

Statistiques: Publié par htouvet — 10 janv. 2019 - 18:03


WAPT Packages / Paquets WAPT • Re: Tester si un paquet est intallé

CODE :

def install():    if WAPT.is_installed('tis-firefox'):       print(u'Paquet firefox installé')

Statistiques: Publié par htouvet — 10 janv. 2019 - 17:25


WAPT Packages / Paquets WAPT • Date - base de registre
Bonjour,
Je suis plus que newbie sur wapt, alors excusez ma question ...;-)
Comment écrie la date du jour dans la base de registre ?
J'ai écrit cette ligne, mais c'est KO

CODE :

registry_setstring(HKEY_LOCAL_MACHINE, r'SOFTWARE\APPLILOC\FireFox ESR Portable', 'InstallDate' , datetime, type=REG_SZ)
J'ai essayé d'ajouter :

CODE :

import datetimedate = datetime.date.now()str(date)
Merci d'avance à tous ceux qui voudront bien m'aider !
Gilles

Statistiques: Publié par gillesr13 — 03 janv. 2019 - 15:35