tis-libreoffice-still
7.1.8-22
LibreOffice (Still Branch) is a free and open-source office suite
13880 downloads
See build result See VirusTotal scan

Description
- package : tis-libreoffice-still
- name : LibreOffice Still
- version : 7.1.8-22
- categories : Office
- maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ
- installed_size :
- editor : The Document Foundation
- licence : MPLv2.0 (secondary license GPL, LGPLv3+ or Apache License 2.0)
- signature_date : 2021-12-21T16:45:52.758023
- size : 298.75 Mo
- locale : all
- target_os : windows
- impacted_process : swriter,sweb,soffice,smath,simpress,sdraw,scalc,sbase
- architecture : x86
- Homepage : https://www.libreoffice.org/
- Depends :
- Conflicts :
control
package : tis-libreoffice-still
version : 7.1.8-22
architecture : x86
section : base
priority : optional
name : LibreOffice Still
categories : Office
maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ
description : LibreOffice (Still Branch) is a free and open-source office suite
depends : tis-vcredist
conflicts : tis-libreoffice-fresh
maturity : PROD
locale : all
target_os : windows
min_wapt_version : 1.8
sources : https://www.libreoffice.org/download/download
installed_size :
impacted_process : swriter,sweb,soffice,smath,simpress,sdraw,scalc,sbase
description_fr : LibreOffice (Branche Stable) est une suite bureautique libre et gratuite
description_pl :
description_de :
description_es :
description_pt :
description_it :
description_nl :
description_ru :
audit_schedule :
editor : The Document Foundation
keywords : bureautique,office,suite
licence : MPLv2.0 (secondary license GPL, LGPLv3+ or Apache License 2.0)
homepage : https://www.libreoffice.org/
package_uuid : 5f06aff7-f210-43c0-8b2e-48bcf6f8c6ef
valid_from :
valid_until :
forced_install_on :
changelog : https://wiki.documentfoundation.org/Category:ReleaseNotes
min_os_version : 6.1
max_os_version :
icon_sha256sum : 9c51eebe7a7aa8b0066cc11588899f1add0a10f4b80fcee271d6eca64be46a87
signer : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature : FzKN2ScV1QkPsfFhjE2sUGbGOWxAtVJdhjlKJvWKxOdr1K+rB9O1oaZpdia/vknMMIPZR38CYqkLFu0fJ9vdUZJPTOZIrJx7gXi1Sfz2qB2a3NwoxbOGT8D71FVfkNbcpZL6KvR95ICYmgyHBdK1KpPBvEPNfgPomluC+dfvqG+bztAiUf5yOBDf7vpxzA32UCzTCxuKrQpgoNNzKRmM521lYOoJ7i3lMzG1NJmcSf6jzp/2UoskSqd3AFS4y+wyXBK/QZzNobMs9dLQIlbUTZQA3OYQJ6j8PXRE4u2vpYyuQ1x/j+iPD/1V4JtnTr5DdFXyU9T18Evq0HfSAjJGaQ==
signature_date : 2021-12-21T16:45:52.758023
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes
Setup.py
# -*- coding: utf-8 -*-
from setuphelpers import *
import platform
import bs4 as BeautifulSoup
import winreg
import time
"""
Usable WAPT package functions: install(), uninstall(), session_setup(), audit(), update_package()
Installation procedure: https://wiki.documentfoundation.org/Deployment_and_Migration
"""
# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls
bin_contains = 'LibreOffice_'
silent_args_dict = {"ALLUSERS": 1, "CREATEDESKTOPLINK": 0, "REBOOTYESNO": "No", "ISCHECKFORPRODUCTUPDATES": 0, "VC_REDIST": 0, "QUICKSTART": 0, "ADDLOCAL": "ALL", "REMOVE": "gm_o_Onlineupdate"}
force_register_as_default_mso_app = False # Make sure that LBO will BE the default application for any Office applications
force_no_register_as_default_mso_app = False # Make sure that LBO will NOT BE the default application for any Office applications
def install():
# Declaring local variables
package_version = control.get_software_version()
bin_name = glob.glob('*%s*.msi' % bin_contains)[0]
major_version = package_version.split('.')[0]
# Uninstalling OpenOffice if detected
for uninstall in installed_softwares(name="OpenOffice"):
print("Removing: %s (%s)" % (uninstall['name'], uninstall['version']))
run(uninstall_cmd(uninstall['key']))
wait_uninstallkey_absent(uninstall['key'])
# Uninstalling LibreOffice if too old
for uninstall in installed_softwares(name="LibreOffice"):
if not uninstall['version'].startswith(major_version):
if 'help' in uninstall['name'].lower():
continue
print("Removing: %s (%s)" % (uninstall['name'], uninstall['version']))
killalltasks(control.impacted_process.split(','))
run(uninstall_cmd(uninstall['key']))
wait_uninstallkey_absent(uninstall['key'])
# Defining Office default applications
"""
REGISTER_ALL_MSO_TYPES (default=0) - use LibreOffice as the default application for Microsoft Office file formats
REGISTER_NO_MSO_TYPES (default=0) - don't use LibreOffice as default application for any Microsoft Office file formats
REGISTER_DOC (default=0) - use LibreOffice as the default application for Microsoft Word file format .doc (You can use similar for .xls, .ppt etc.)
"""
if not force_register_as_default_mso_app or not force_no_register_as_default_mso_app:
# Checking if MSO file extensions refer to MSO apps and affect LBO if not
if not get_file_assocation('.doc').startswith('Word') and not get_file_assocation('.docx').startswith('Word'):
silent_args_dict['REGISTER_DOC']=1
silent_args_dict['REGISTER_DOCX']=1
if not get_file_assocation('.xls').startswith('Excel') and not get_file_assocation('.xlsx').startswith('Excel'):
silent_args_dict['REGISTER_XLS']=1
silent_args_dict['REGISTER_XLSX']=1
if not get_file_assocation('.ppt').startswith('PowerPoint') and not get_file_assocation('.pptx').startswith('PowerPoint'):
silent_args_dict['REGISTER_PPT']=1
silent_args_dict['REGISTER_PPTX']=1
if not get_file_assocation('.pub').startswith('Publisher'):
silent_args_dict['REGISTER_PUB']=1
if not force_register_as_default_mso_app or not force_no_register_as_default_mso_app:
# Checking if a version of MSO is installed
count_mso_apps = 0
if installed_softwares(name="Microsoft Office "):
count_mso_apps += 1
if installed_softwares(name="Office 365"):
count_mso_apps += 1
if installed_softwares(name="Microsoft 365"):
count_mso_apps += 1
if force_register_as_default_mso_app:
# Register LBO as default MSO apps
silent_args_dict['REGISTER_ALL_MSO_TYPES']=1
elif force_no_register_as_default_mso_app:
# Do not register LBO as default MSO apps
silent_args_dict['REGISTER_NO_MSO_TYPES']=1
else:
if count_mso_apps == 0:
# Register LBO as default MSO apps if no MSO version was detected
silent_args_dict['REGISTER_ALL_MSO_TYPES']=1
# Installing the software
print("Installing: %s" % bin_name)
install_msi_if_needed(bin_name,
properties=silent_args_dict,
timeout=1200)
def update_package():
# Declaring local variables
result = False
proxies = get_proxies()
if not proxies:
proxies = get_proxies_from_wapt_console()
app_name = control.name
url = 'https://www.libreoffice.org/download/download'
if control.architecture == 'x64':
dl_arch = 'x86_64'
ends_bin_name = '_Win_x64.msi'
else:
dl_arch = 'x86'
ends_bin_name = '_Win_x86.msi'
# Getting latest version from official website
version = bs_find_all(url, 'span', 'class', 'dl_version_number',proxies=proxies)[1].string # [1] for Still, [0] for Fresh
search_url = 'https://download.documentfoundation.org/libreoffice/stable/%s/win/%s/' % (version, dl_arch)
for bs_search in bs_find_all(search_url, 'a', proxies=proxies):
if bin_contains in bs_search['href'] and ends_bin_name in bs_search['href']:
latest_bin = bs_search.string
download_url = search_url + latest_bin
break
print("Latest %s version is: %s" % (app_name, version))
print("Download URL is: %s" % download_url)
# Downloading latest binaries
if not isfile(latest_bin):
print("Downloading: %s" % latest_bin)
wget(download_url, latest_bin, proxies=proxies)
# Checking version from file
version_from_file = get_version_from_binary(latest_bin)
if not version_from_file.startswith(version) and version_from_file != '':
print("Changing version to the version number of the binary (from: %s to: %s)" % (version, version_from_file))
os.rename(latest_bin, bin_contains + version_from_file + ends_bin_name)
version = version_from_file
else:
print("Binary file version corresponds to online version")
# Changing version of the package
if Version(version) > Version(control.get_software_version()):
print("Software version updated (from: %s to: %s)" % (control.get_software_version(), Version(version)))
result = True
else:
print("Software version up-to-date (%s)" % Version(version))
control.version = '%s-%s' % (Version(version), control.version.split('-', 1)[-1])
#control.set_software_version(version)
control.save_control_to_wapt()
# Deleting outdated binaries
remove_outdated_binaries(version)
# Validating update-package-sources
return result
def get_file_assocation(ext):
r"""Return the associated application for a file extension (example : '.doc')
>>> get_file_assocation('.pptx')
'LibreOffice.Pptx'
"""
try:
return winreg.QueryValue(winreg.HKEY_CLASSES_ROOT, ext)
except:
return ''
def get_default_app(suffix):
r"""Return application path associated to a file extension (example: .pptx)
>>> get_default_app('.pptx')
'C:\\Program Files\\LibreOffice\\program\\simpress.exe'
"""
import shlex
import winreg
try:
class_root = winreg.QueryValue(winreg.HKEY_CLASSES_ROOT, suffix)
except:
return ''
with winreg.OpenKey(winreg.HKEY_CLASSES_ROOT, r'{}\shell\open\command'.format(class_root)) as key:
command = winreg.QueryValueEx(key, '')[0]
return shlex.split(command)[0]
def get_proxies():
r"""Return system proxy with the urllib python library
>>> get_proxies()
{'http': 'http://srvproxy.ad.domain.lan:8080',
'https': 'http://srvproxy.ad.domain.lan:8080'}
"""
if platform.python_version_tuple()[0] == '3':
from urllib.request import getproxies
else:
from urllib import getproxies
return getproxies()
def get_proxies_from_wapt_console():
r"""Return proxy information from the current user WAPT console
>>> get_proxies_from_wapt_console()
{'http': 'http://srvproxy.ad.domain.lan:8080',
'https': 'http://srvproxy.ad.domain.lan:8080'}
"""
proxies = {}
if platform.system() == 'Windows':
waptconsole_ini_path = makepath(user_local_appdata(), 'waptconsole', 'waptconsole.ini')
else:
waptconsole_ini_path = makepath(user_home_directory(), '.config', 'waptconsole', 'waptconsole.ini')
if isfile(waptconsole_ini_path):
proxy_wapt = inifile_readstring(waptconsole_ini_path, 'global', 'http_proxy')
if proxy_wapt:
proxies = {'http': proxy_wapt, 'https': proxy_wapt}
return proxies
def get_version_from_binary(filename, property_name='ProductVersion'):
r""" Get installer version from file informations, for now, only exe and msi files are compatibles
Args:
filename (str): path to the file
property_name (str): selected property
Returns:
str: version number
"""
if filename.endswith('.msi'):
return get_msi_properties(filename)[property_name]
else:
return get_file_properties(filename)[property_name]
def remove_outdated_binaries(version, filename_contains=None, list_extensions=['exe','msi','deb','rpm','dmg','pkg']):
r"""Remove files based on the version contained in his filename
Args:
version (str): version number of keeped files
filename_contains (str or list of str): Part of the filename that must be contained (useful for distinguishing architecture and os)
list_extensions (str or list of str): file extensions of verified files
Returns:
None
.. versionadded:: 2.0
"""
if type(list_extensions) != list:
list_extensions = [list_extensions]
if filename_contains:
if type(filename_contains) != list:
filename_contains = [filename_contains]
list_extensions = ['.' + ext for ext in list_extensions if ext[0] != '.']
for file_ext in list_extensions:
for bin_in_dir in glob.glob('*%s' % file_ext):
if not version in bin_in_dir:
remove_file(bin_in_dir)
if filename_contains:
for filename_contain in filename_contains:
if not filename_contain in bin_in_dir:
remove_file(bin_in_dir)
def wait_uninstallkey_absent(key=None,max_loop=120, keywords='', name=None):
if len([f for f in [key,keywords,name] if f]) > 1:
error('Arguments conflict key: %s keywords: %s name: %s' % (key,keywords,name))
if key:
searchparam = 'key %s' % str(key)
elif name:
searchparam = 'name %s' % str(name)
else:
searchparam = 'keywords %s' % str(keywords)
print('Waiting for the removal of key %s from Windows registry' % searchparam)
loop=0
while uninstall_key_exists(key, keywords=keywords, name=name):
loop = loop + 1
if loop > max_loop:
return "timout"
time.sleep(1)
92aafae2969c74d06cbb70d2dadee92385c6ff6c85562e046c13593830f20cd6 : setup.py
9c51eebe7a7aa8b0066cc11588899f1add0a10f4b80fcee271d6eca64be46a87 : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
194c945688bb4f622439e42d792b20ab4b82a1479e63b6819b0330929f786763 : luti.json
1a7fd97895d7070b84110fb5f156fdc05c599c01a5c683cf56a94d00fedc68a3 : LibreOffice_7.1.8_Win_x86.msi
db95edc4534c9a7753284f085ee9ba612710c5f2b12b06a6f1b0b55db69231fe : WAPT/control