tis-libreoffice-fresh-helppack
7.0.4.2-0
Help Pack for the LibreOffice Office Suite
7299 downloads

Description
- package : tis-libreoffice-fresh-helppack
- version : 7.0.4.2-0
- architecture : x86
- categories :
- maintainer : Tranquilit
- description : Help Pack for the LibreOffice Office Suite
- locale : en
- target_os : windows
- min_wapt_version : 1.5.1.20
- sources :
- installed_size :
- impacted_process : soffice.exe,sbase.exe,scalc.exe,sdraw.exe,simpress.exe,smath.exe,swriter.exe
- description_fr : Pack Aide pour la Suite Bureautique LibreOffice
- description_pl : Pakiet pomocy dla pakietu LibreOffice Office Suite
- description_de : Hilfspaket für die LibreOffice Office Suite
- description_es : Paquete de ayuda para LibreOffice Office Suite
- description_pt :
- description_it :
- description_nl :
- description_ru :
- editor :
- licence :
- signature_date : 2020-12-17T14:02:05.724907
- Depends :
- Conflicts :
Setup.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
import platform
import time
from setuphelpers import *
import bs4 as BeautifulSoup
uninstallkey = []
def install():
libre_office_exe = ['soffice.exe','sbase.exe','scalc.exe','sdraw.exe','simpress.exe','smath.exe','swriter.exe']
for msi in glob.glob('*.msi'):
install_msi_if_needed(msi,killbefore=libre_office_exe,timeout=1200)
def update_package():
arch = {'x64':'x86_64','x86':'x86'}
dictloc = {'en':'en-US'}
import requests,re
from waptpackage import PackageEntry
pe = PackageEntry()
pe.load_control_from_wapt(os.getcwd())
# Get Proxy informations from WAPT settings
proxies = {}
if isfile(makepath(application_data(),'waptconsole','waptconsole.ini')):
proxywapt = inifile_readstring(makepath(user_local_appdata(),'waptconsole','waptconsole.ini'),'global','http_proxy')
if proxywapt :
proxies = {'http':proxywapt,'https':proxywapt}
url = "https://www.libreoffice.org/download/download"
# Get latest version number from official website
page = requests.get(url,headers={'User-Agent':'Mozilla/5.0 (Windows NT 6.1; Win64; x64)'},verify=True,proxies=proxies).text
bs = BeautifulSoup.BeautifulSoup(page)
bs_raw_string = str(bs.find('span',{'class':'dl_version_number'}).text)
version = bs_raw_string
helppack = "LibreOffice_%s_Win_%s_helppack_%s.msi" % (version,pe.architecture,dictloc.get(pe.locale,pe.locale))
url = "http://download.documentfoundation.org/libreoffice/stable/%s/win/%s/" % (version,arch[pe.architecture]) + helppack
if not isfile(helppack):
wget(url,helppack,proxies=proxies)
lastest_version = get_msi_properties(helppack)['ProductVersion']
allmsi = glob.glob('*.msi')
for msi in allmsi:
if msi.lower() != helppack.lower():
remove_file(msi)
pe.version = lastest_version +'-0'
pe.save_control_to_wapt(os.getcwd())
def build_all_package():
from optparse import OptionParser
import os
import waptguihelper
from waptpackage import PackageEntry
from common import Wapt
import time
global options
parser = OptionParser()
parser.add_option("--wapt-server-passwd", dest="wapt_server_passwd", default=None, help="Password to upload packages to waptserver. (default: %default)")
parser.add_option("-w","--private-key-passwd", dest="private_key_passwd", default='', help="Path to the password of the private key. (default: %default)")
parser.add_option("--wapt-server-user", dest="wapt_server_user", default=None, help="User to upload packages to waptserver. (default: %default)")
parser.add_option("-c","--config", dest="config", default=makepath(user_local_appdata(),'waptconsole','waptconsole.ini'), help="Config file full path (default: %default)")
parser.add_option("--maturity", dest="maturity", default='PROD', help="Set/change package maturity when building package. (default: None)")
(options,args) = parser.parse_args()
all_loc_windows = ['fr','es','en','de','it']
print('Create all Arch and language')
print('Current Dir %s' % os.getcwd())
urlserver = inifile_readstring(options.config,'global','wapt_server')
mycrt = inifile_readstring(options.config,'global','personal_certificate_path')
if options.private_key_passwd:
if isfile(options.private_key_passwd):
passwordkey = { 'keypassword' : open(options.private_key_passwd).read()}
else:
passwordkey = waptguihelper.key_password_dialog('Password for private key',mycrt, '')
if options.wapt_server_passwd :
credentials_url = {}
credentials_url['user'] = options.wapt_server_user
credentials_url['password'] = options.wapt_server_passwd
else:
credentials_url = waptguihelper.login_password_dialog('Credentials for wapt server',urlserver,'admin','')
print(options.config)
myWapt = Wapt(config_filename=options.config)
listlang = ['fr', 'en', 'es', 'it', 'de']
listarch = ['x86','x64']
for lang in listlang:
for arch in listarch:
print ('Build %s - %s' % (lang,arch))
for w in glob.glob('*.wapt'):
remove_file(w)
for w in glob.glob('*.msi'):
remove_file(w)
control = PackageEntry().load_control_from_wapt ('.')
control.architecture = arch
control.locale = lang.split('-')[0].lower()
control.save_control_to_wapt('.')
thepackage = PackageEntry(waptfile=os.getcwd())
time.sleep(5)
thepackage.call_setup_hook('update_package',wapt_context=myWapt)
myWapt.build_upload(os.getcwd(),private_key_passwd=passwordkey['keypassword'],wapt_server_user=credentials_url['user'],wapt_server_passwd=credentials_url['password'],set_maturity=options.maturity)
if __name__ == '__main__':
import sys
if len(sys.argv) > 1 :
build_all_package()
else:
update_package()