From a9c874d79ead11eedb052c9306153a888a10b506 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Fri, 10 May 2019 17:28:21 -0600 Subject: [PATCH] Fixed LibreOffice installations --- .bin/Scripts/functions/setup.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.bin/Scripts/functions/setup.py b/.bin/Scripts/functions/setup.py index d90494ac..6e9fac29 100644 --- a/.bin/Scripts/functions/setup.py +++ b/.bin/Scripts/functions/setup.py @@ -235,10 +235,9 @@ def install_libreoffice( use_mso_formats=False, vcredist=False): """Install LibreOffice using specified settings.""" cmd = [ - r'{}\Installers\Extras\Office\LibreOffice.msi'.format( + 'msiexec', '/passive', '/norestart', + '/i', r'{}\Installers\Extras\Office\LibreOffice.msi'.format( global_vars['BaseDir']), - '/qn', - '/norestart', 'REBOOTYESNO=No', 'ISCHECKFORPRODUCTUPDATES=0', 'QUICKSTART={}'.format(1 if quickstart else 0), @@ -249,11 +248,12 @@ def install_libreoffice( cmd.append('REGISTER_ALL_MSO_TYPES=1') else: cmd.append('REGISTER_NO_MSO_TYPES=1') - xcu_file = r'{APPDATA}LibreOffice\4\user\registrymodifications.xcu'.format( - **global_vars) + xcu_dir = r'{APPDATA}\LibreOffice\4\user'.format(**global_vars['Env']) + xcu_file = r'{}\registrymodifications.xcu'.format(xcu_dir) # Set default save format if use_mso_formats and not os.path.exists(xcu_file): + os.makedirs(xcu_dir, exist_ok=True) with open(xcu_file, 'w', encoding='utf-8', newline='\n') as f: f.write(LIBREOFFICE_XCU_DATA)