tis-libreoffice-evolution 5.4.1.2-31

  • package : tis-libreoffice-evolution
  • version : 5.4.1.2-31
  • architecture : all
  • locale :
  • description : Suite Bureautique LibreOffice Evolution + Aide. D√©sinstalle libreooffice 3.xx et OpenOffice 3.xx
  • maintainer : TIS
  • date : 2018-02-27 19:01:54
  • min_os_version :
  • max_os_version :

setup.py

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

import platform
from setuphelpers import *

uninstallkey = []

def install():

    """
    # FOR x64 install
    msis = glob.glob('*.msi')
    for (msi,name) in msis:
       if iswin64():
          if not 'x64' in msi:
             remove_file(msi)
       else:
          if not 'x86' in msi:
             remove_file(msi)
    """

    libre_office_exe = ['soffice.exe','sbase.exe','scalc.exe','sdraw.exe','simpress.exe','smath.exe','swriter.exe']

    """Called by wapt-get or waptservice to install the package"""
    # uninstall previous libreoffice or openoffice 3.xx
    old_libreoff = installed_softwares('libreoffice 3.')
    old_openoff = installed_softwares('openoffice')
    old_office = old_libreoff + old_openoff
    if old_office:
        for uninstall in old_office:
            if uninstall['version'].startswith('3.'):
                cmd = WAPT.uninstall_cmd(uninstall['key'])
                print(u'uninstalling %s' % (uninstall['name'],))
                run(cmd,timeout=1200)

    for msi in glob.glob('*.msi'):
        args = {}
        if not 'helppack' in msi:
            # don't register extensions if Office is installed
            if not file_assoc('.doc').startswith('word.'):
                args['SELECT_WORD']=1
            if not file_assoc('.xls').startswith('excel'):
                args['SELECT_EXCEL']=1
            if not file_assoc('.ppt').startswith('powerpoint'):
                args['SELECT_POWERPOINT']=1
            args['CREATEDESKTOPLINK']=0
            args['RebootYesNo']='No'
            args['ALLUSER']=1
            args['ISCHECKFORPRODUCTUPDATES']=0
            args['QUICKSTART']=0
        install_msi_if_needed(msi,properties=args,killbefore=libre_office_exe,timeout=1200)


def update_package():
    """updates the package with the latest stable libreoffice version"""
    import re
    # get list of stable versions
    re_versions = re.compile('<td><a href="([\d\.]*)/">')
    index = wgets('http://download.documentfoundation.org/libreoffice/stable/')
    # find latest
    last_version = sorted(re_versions.findall(index))[-1]
    for fn in (
        'LibreOffice_{version}_Win_x86.msi'.format(version=last_version),
        'LibreOffice_{version}_Win_x86_helppack_fr.msi'.format(version=last_version)):
        if not isfile(fn):
            print('Downloading %s'%fn)
            wget('http://download.documentfoundation.org/libreoffice/stable/{version}/win/x86/{fn}'.format(version=last_version,fn=fn),fn)
            #wget('http://download.documentfoundation.org/libreoffice/stable/{version}/win/x86_64/{fn}'.format(version=last_version,fn=fn),fn)
        if not 'helppack' in fn :
            lastest_version = get_msi_properties(fn)['ProductVersion']
            print "Lastest version is " + lastest_version

    # removes old msi
    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())



def file_assoc(ext):
    """Renvoie le type d'application associe à une extension (exemple : .doc)"""
    return registry_readstring(HKEY_CLASSES_ROOT,ext,None).lower()



if __name__ == '__main__':
    update_package()


    

Changelog

No changelog
    

manifest.sha256

WAPT/icon.png 3f684b7ed5fd1b380e8f796ddb42056eb7a44c4005c894a7c44711b064886cdc
WAPT/certificate.crt 79e5388683c0b6cb03f4f81e4e58e3a11463b2b6cf169dd9c453098027dcfaa4
LibreOffice_5.4.1_Win_x86_helppack_fr.msi 5488ff75c0fee2bfd8727d225154d490b3106c544ff799d83e01e7ff6c9eeeea
LibreOffice_5.4.1_Win_x86.msi 9cc38ae442906b4b73fcb65d3656312e70fb773f0451c38ee5efb10407f84fee
setup.py 1143b058e452c5eaf18dc234f4bfe8a186f57ec2b8cabf77c10cdfad511a8b0e
WAPT/control aec5ef7936bb80a72580a817f2d8f4ade5c64773bd69d1d2ee947a00c030c27d
WAPT/wapt.psproj 602f837dd2593d9ce4b1fd8e26f485eae6f5fe53f38129fed2c09062247e9a22