parent
8ffe71472e
commit
3932380b4e
7 changed files with 435 additions and 0 deletions
@ -0,0 +1,32 @@ |
|||||||
|
package : fws-thunderbird |
||||||
|
version : 60.3.2-1 |
||||||
|
architecture : all |
||||||
|
section : base |
||||||
|
priority : optional |
||||||
|
maintainer : Daniel Berteaud |
||||||
|
description : Mozilla Thunderbird email client |
||||||
|
depends : |
||||||
|
conflicts : |
||||||
|
maturity : DEV |
||||||
|
locale : fr |
||||||
|
target_os : windows |
||||||
|
min_os_version : 5.0 |
||||||
|
max_os_version : |
||||||
|
min_wapt_version : 1.5 |
||||||
|
sources : |
||||||
|
installed_size : |
||||||
|
impacted_process : thunderbird.exe |
||||||
|
description_fr : Client de messagerie Mozilla Thunderbird |
||||||
|
description_pl : |
||||||
|
description_de : |
||||||
|
description_es : |
||||||
|
audit_schedule : 2d |
||||||
|
editor : |
||||||
|
keywords : email,mail,pop,imap,smtp |
||||||
|
licence : |
||||||
|
homepage : https://www.thunderbird.net/fr/ |
||||||
|
package_uuid : |
||||||
|
signer : Daniel Berteaud |
||||||
|
signer_fingerprint: |
||||||
|
signature_date : |
||||||
|
signed_attributes : |
After Width: | Height: | Size: 13 KiB |
@ -0,0 +1,99 @@ |
|||||||
|
#!/usr/bin/python |
||||||
|
# -*- coding: utf-8 -*- |
||||||
|
# ----------------------------------------------------------------------- |
||||||
|
# This file is part of WAPT |
||||||
|
# Copyright (C) 2013 Tranquil IT Systems http://www.tranquil.it |
||||||
|
# WAPT aims to help Windows systems administrators to deploy |
||||||
|
# setup and update applications on users PC. |
||||||
|
# |
||||||
|
# WAPT is free software: you can redistribute it and/or modify |
||||||
|
# it under the terms of the GNU General Public License as published by |
||||||
|
# the Free Software Foundation, either version 3 of the License, or |
||||||
|
# (at your option) any later version. |
||||||
|
# |
||||||
|
# WAPT is distributed in the hope that it will be useful, |
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||||
|
# GNU General Public License for more details. |
||||||
|
# |
||||||
|
# You should have received a copy of the GNU General Public License |
||||||
|
# along with WAPT. If not, see <http://www.gnu.org/licenses/>. |
||||||
|
# |
||||||
|
# ----------------------------------------------------------------------- |
||||||
|
from setuphelpers import * |
||||||
|
import time |
||||||
|
import subprocess |
||||||
|
|
||||||
|
uninstallkey = [] |
||||||
|
|
||||||
|
def install(): |
||||||
|
waptversion = Version(__version__) |
||||||
|
|
||||||
|
if waptversion > Version('1.5') : |
||||||
|
|
||||||
|
softname = 'Mozilla Thunderbird' |
||||||
|
versionsoft = control['version'].split('-',1)[0] |
||||||
|
|
||||||
|
check_installed = installed_softwares(softname) |
||||||
|
diskfreespacebefore = get_disk_free_space(programfiles) |
||||||
|
|
||||||
|
if check_installed: |
||||||
|
for uninstall in check_installed: |
||||||
|
if iswin64(): |
||||||
|
if 'x86' in uninstall['name'] : |
||||||
|
print(u'Remove Thunderbird x86 for install Thunderbird x64' ) |
||||||
|
if uninstall_key_exists(uninstall['key']): |
||||||
|
killalltasks('thunderbird.exe') |
||||||
|
cmd = WAPT.uninstall_cmd(uninstall['key']) |
||||||
|
run(cmd) |
||||||
|
time.sleep (5) |
||||||
|
|
||||||
|
version = control.version.split('-',1)[0] |
||||||
|
arch = control.architecture |
||||||
|
#locale = control.locale |
||||||
|
locale = 'fr' |
||||||
|
key='Mozilla Thunderbird %s (%s %s)' % (version,'x64' if iswin64() else 'x86',locale) |
||||||
|
install_exe_if_needed(r'win%s\Thunderbird Setup %s.exe' % ('64' if iswin64() else '32',version),silentflags='-ms',key=key ,min_version=version,killbefore=['thunderbird.exe']) |
||||||
|
|
||||||
|
diskfreespaceafter = get_disk_free_space(programfiles) |
||||||
|
difffreespace = diskfreespacebefore - diskfreespaceafter |
||||||
|
print(ur"Needed disk space : " + str(difffreespace)) |
||||||
|
|
||||||
|
else: |
||||||
|
error('This package is not compatible with your WAPT version. Please upgrade to WAPT 1.5 or more.') |
||||||
|
|
||||||
|
def update_package(): |
||||||
|
"""updates the package / control version with the latest stable thunderbird version""" |
||||||
|
import re,requests,urlparse,glob |
||||||
|
|
||||||
|
filename = '' |
||||||
|
url = requests.head('https://download.mozilla.org/?product=thunderbird-latest').headers['Location'] |
||||||
|
filename = urlparse.unquote(url.rsplit('/',1)[1]) |
||||||
|
version = re.findall(r'Thunderbird Setup (.*)\.exe',filename)[0] |
||||||
|
control = PackageEntry().load_control_from_wapt ('.') |
||||||
|
|
||||||
|
if Version(version) > Version(control['version'].split('-',1)[0]): |
||||||
|
print('Updating package to %s' % version) |
||||||
|
for arch in ['32','64']: |
||||||
|
filename = makepath('win%s' % arch, filename) |
||||||
|
url = 'https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/%s/win%s/fr/Thunderbird%sSetup%s%s.exe' % (version,arch,'%20','%20',version) |
||||||
|
if not isfile(filename): |
||||||
|
print('Downloading %s from %s'%(filename,url)) |
||||||
|
wget(url,filename) |
||||||
|
|
||||||
|
# removes old exe |
||||||
|
if isfile(filename): |
||||||
|
exes = glob.glob(r'x%s\Thunderbird*.exe' % arch) |
||||||
|
for fn in exes: |
||||||
|
if fn != filename: |
||||||
|
remove_file(fn) |
||||||
|
|
||||||
|
# updates control version from filename, increment package version. |
||||||
|
control.version = '%s-%s'%(re.findall(r'Thunderbird Setup (.*)\.exe',filename)[0],int(control.version.split('-',1)[1])+1) |
||||||
|
control.save_control_to_wapt('.') |
||||||
|
else: |
||||||
|
print('No update available') |
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__': |
||||||
|
update_package() |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue