Détails du package smp-libreoffice-stable_6.1.5.2-1_x86_all.wapt
retour Revenir à la liste des packages



ATTENTION CE DÉPÔT n'est plus compatible 1.3 vous devez migrer en 1.5.1.21 !

Fichier control :

package           : smp-libreoffice-stable
version           : 6.1.5.2-1
architecture      : x86
section           : base
priority          : optional
maintainer        : lesfourmisduweb.org
description       : Suite Bureautique LibreOffice
depends           : 
conflicts         : smp-libreoffice-evolution
maturity          : 
locale            : all
target_os         : windows
min_os_version    : 
max_os_version    : 
min_wapt_version  : 1.5.1.20
sources           : https://fr.libreoffice.org/download/libreoffice-stable/
installed_size    : 396451840
impacted_process  : soffice.exe,sbase.exe,scalc.exe,sdraw.exe,simpress.exe,smath.exe,swriter.exe
description_fr    : 
description_pl    : 
description_de    : 
description_es    : 
audit_schedule    : 
editor            : 
keywords          : 
licence           : 
homepage          : 
package_uuid      : 1f645640-ff6c-4718-8e49-03d25626ac52
signer            : wapt.lesfourmisduweb.org
signer_fingerprint: 8da83ebdac1a25e820b186510d049f47407b11835b0664fdc5bacd3595b1671d
signature         : Aw3yx3l1FjcryQJe6prsWU3JdCduR8z0bq/NE3ybqHFbcQAghxYDxnBAFJCLFwFdaccDLq6FlFMfkdNsxPWh+es4Vh/fO4zyt25SpvfLDMmaAbnR3ckgfxmDRVJDLe5oE5eWHLfYQUB0UjEZijHeALUgoV58+Ebu7Z25Bk3BoY76Zuzj4+LhfEK+DYg1yN7LKpO95at5CPp18byAeE1eLD3mlRa7FTgqwZGUocJWSEe11eYy0paO9snlVX/Gp1gUhs+DRQ7dvofA2QBHETGmZ6SOjFx1eky1kcWMoqBIfs0kzL8uT0PEJZaq6zQuxCP6rN68GvDh2OzzlB+z9kiv3w==
signature_date    : 2019-02-07T23:36:19.979000
signed_attributes : package,version,architecture,section,priority,maintainer,description,depends,conflicts,maturity,locale,target_os,min_os_version,max_os_version,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,audit_schedule,editor,keywords,licence,homepage,package_uuid,signer,signer_fingerprint,signature_date,signed_attributes






Fichier setup.py :

#!/usr/bin/python
# -*- coding: utf-8 -*-

import platform
import time
from setuphelpers import *

uninstallkey = []

def install():

    diskfreespacebefore = get_disk_free_space(programfiles)

    libre_office_exe = ['soffice.exe','sbase.exe','scalc.exe','sdraw.exe','simpress.exe','smath.exe','swriter.exe']
    for msi in glob.glob('*.msi'):
        argument = {}
        if not installed_softwares('Microsoft Office'):
            argument = {'SELECT_WORD':1,'SELECT_EXCEL':1,'SELECT_POWERPOINT':1,'CREATEDESKTOPLINK':0,'RebootYesNo':'No','ALLUSER':1,'ISCHECKFORPRODUCTUPDATES':0,'QUICKSTART':0}
        else:
            argument = {'CREATEDESKTOPLINK':0,'RebootYesNo':'No','ALLUSER':1,'ISCHECKFORPRODUCTUPDATES':0,'QUICKSTART':0}
        install_msi_if_needed(msi,killbefore=libre_office_exe,timeout=1200,properties=argument)

    diskfreespaceafter = get_disk_free_space(programfiles)
    difffreespace = diskfreespacebefore - diskfreespaceafter
    print(ur"Espace disque necessaire pour l'installation : " + str(difffreespace))

def update_package():
    htmlSource = wgets("https://www.libreoffice.org/download/download/").splitlines()
    foundoffice = False
    found = False
    for line in htmlSource :
        if 'enterprise' in line:
            found = True
        if found == True:
            if 'http://download.documentfoundation.org/libreoffice/stable/' in line:
                start = line.find("/stable/")
                startversion = start + 8
                end = line.find("/win/")
                realversion = line[startversion:end]
                break
    msix86 = "LibreOffice_%s_Win_x86.msi" % realversion
    url = "http://download.documentfoundation.org/libreoffice/stable/%s/win/" % realversion

    if not isfile(msix86):
        wget(url + "x86/" +msix86,msix86)
    else:
        print(msix86 + ' already exist')

    lastest_version = get_msi_properties(msix86)['ProductVersion']

    allmsi = glob.glob('*.msi')
    for msi in allmsi:
        vers = get_msi_properties(msi)['ProductVersion']
        if vers != lastest_version :
            remove_file(msi)

    # change version of package
    from waptpackage import PackageEntry
    pe = PackageEntry()
    pe.load_control_from_wapt(os.getcwd())
    pe.version = lastest_version +'-0'
    pe.save_control_to_wapt(os.getcwd())

if __name__ == '__main__':
    update_package()