tis-libreoffice-stable
Version : 6.0.6.2-2
- package : tis-libreoffice-stable
- editor :
- version : 6.0.6.2-2
- licence :
- architecture : all
- locale : all
- description : Office Suite LibreOffice stable + Help. Uninstall libreooffice 3.xx and OpenOffice 3.xx
- description_fr : Suite Bureautique LibreOffice stable + Aide. Désinstalle libreooffice 3.xx et OpenOffice 3.xx
- min_os_version : 5.1
- max_os_version :
- min_wapt_version : 1.3.5
- installed_size :
- impacted_process :
- signature_date : 20180809-093452
- maintainer : TIS <technique@tranquil-it-systems.fr>
- Conflicts :
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'] for msi in glob.glob('*.msi'): if not 'helppack' in msi: versionsoft = get_msi_properties(msi)['ProductVersion'] """Called by wapt-get or waptservice to install the package""" old_libreoff = installed_softwares('libreoffice') old_openoff = installed_softwares('openoffice') old_office = old_libreoff + old_openoff if old_office: for uninstall in old_office: if 'openoffice' in uninstall or Version(uninstall['version']) > Version(versionsoft) or uninstall['version'].startswith('3.'): cmd = WAPT.uninstall_cmd(uninstall['key']) killalltasks(libre_office_exe) 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 file_assoc(ext): """Renvoie le type d'application associe à une extension (exemple : .doc)""" return registry_readstring(HKEY_CLASSES_ROOT,ext,None).lower() 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 helpx86 = "LibreOffice_%s_Win_x86_helppack_fr.msi" % realversion 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') if not isfile(helpx86): wget(url + "x86/" +helpx86,helpx86) else: print(helpx86 + ' 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()
Changelog
"""{% trans %}No changelog.{% endtrans %}"""
manifest.sha256
[["WAPT/icon.png", "3f684b7ed5fd1b380e8f796ddb42056eb7a44c4005c894a7c44711b064886cdc"], ["WAPT/certificate.crt", "13fb474c5c23c135a77aba592eb8821b9ecbcc463f5b7312312b87b20eac6779"], ["WAPT/wapt.psproj", "df3e2fa87fea9c7bdfcc22039b9ef7303f092898882d9f3f4233f5d92f90b3c7"], ["LibreOffice_6.0.6_Win_x86_helppack_fr.msi", "b871b1f710b9ecfa4670a9411f0ffbd945708a30368d78cfbd4786551d3cc0c7"], ["LibreOffice_6.0.6_Win_x86.msi", "8438f42ebb988c66b5e20f64a7067a4e14f229d0df3f9bd0bc5fb4939351d2e5"], ["setup.py", "39b9f030b0930b5fc17b42437687eea7f6314252934392f96d0a1d6b9ffbad5c"], ["WAPT/control", "02c161a052311c05c08016118d784914aac8e00617ba9439c8d199719b55fcf8"]]