From ad1d7d71f2ae2d9dec059199d6780ad71dcbd688 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Fri, 11 Jan 2019 12:59:12 -0700 Subject: [PATCH] Fixed ODT sections * Fixes issue #86 --- .bin/Scripts/Launch.cmd | 3 +- .bin/Scripts/functions/update.py | 31 +++++++------- .bin/Scripts/settings/launchers.py | 40 +++++++++++++++---- .bin/Scripts/settings/sources.py | 2 +- .../_Office/{hb_32.xml => 2016_hb_32.xml} | 0 .../_Office/{hb_64.xml => 2016_hb_64.xml} | 0 .../_Office/{hs_32.xml => 2016_hs_32.xml} | 0 .../_Office/{hs_64.xml => 2016_hs_64.xml} | 0 .cbin/_include/_Office/2019_hb_32.xml | 7 ++++ .cbin/_include/_Office/2019_hb_64.xml | 7 ++++ .cbin/_include/_Office/2019_hs_32.xml | 7 ++++ .cbin/_include/_Office/2019_hs_64.xml | 7 ++++ 12 files changed, 78 insertions(+), 26 deletions(-) rename .cbin/_include/_Office/{hb_32.xml => 2016_hb_32.xml} (100%) rename .cbin/_include/_Office/{hb_64.xml => 2016_hb_64.xml} (100%) rename .cbin/_include/_Office/{hs_32.xml => 2016_hs_32.xml} (100%) rename .cbin/_include/_Office/{hs_64.xml => 2016_hs_64.xml} (100%) create mode 100644 .cbin/_include/_Office/2019_hb_32.xml create mode 100644 .cbin/_include/_Office/2019_hb_64.xml create mode 100644 .cbin/_include/_Office/2019_hs_32.xml create mode 100644 .cbin/_include/_Office/2019_hs_64.xml diff --git a/.bin/Scripts/Launch.cmd b/.bin/Scripts/Launch.cmd index 0a0330c6..3a3ed6a5 100644 --- a/.bin/Scripts/Launch.cmd +++ b/.bin/Scripts/Launch.cmd @@ -151,6 +151,7 @@ goto Exit call "%bin%\Scripts\init_client_dir.cmd" /Office set "_odt=False" if %L_PATH% equ 2016 (set "_odt=True") +if %L_PATH% equ 2019 (set "_odt=True") if "%_odt%" == "True" ( goto LaunchOfficeODT ) else ( @@ -161,7 +162,7 @@ if "%_odt%" == "True" ( rem Prep set "args=-aoa -bso0 -bse0 -bsp0 -p%ARCHIVE_PASSWORD%" set "config=%L_ITEM%" -set "dest=%client_dir%\Office\%L_PATH%" +set "dest=%client_dir%\Office\ODT" set "odt_exe=%L_PATH%\setup.exe" set "source=%cbin%\_Office.7z" diff --git a/.bin/Scripts/functions/update.py b/.bin/Scripts/functions/update.py index 2331a604..e1cd277d 100644 --- a/.bin/Scripts/functions/update.py +++ b/.bin/Scripts/functions/update.py @@ -656,23 +656,22 @@ def update_office(): if os.path.exists(include_path): shutil.copytree(include_path, dest) - for year in ['2016']: - # Download and extract - name = 'odt{}.exe'.format(year) - url = 'Office Deployment Tool {}'.format(year) - download_to_temp(name, SOURCE_URLS[url]) - cmd = [ - r'{}\odt{}.exe'.format(global_vars['TmpDir'], year), - r'/extract:{}\{}'.format(global_vars['TmpDir'], year), - '/quiet', - ] - run_program(cmd) - shutil.move( - r'{}\{}'.format(global_vars['TmpDir'], year), - r'{}\_Office\{}'.format(global_vars['CBinDir'], year)) + # Download and extract + _odt = 'odt.exe' + _out_path = r'{}\odt' + download_to_temp('odt.exe', SOURCE_URLS['Office Deployment Tool']) + cmd = [ + odt, + r'/extract:{}\odt'.format(global_vars['TmpDir']), + '/quiet', + ] + run_program(cmd) + shutil.move( + _out_path, + r'{}\_Office'.format(global_vars['CBinDir'])) - # Cleanup - remove_from_temp('odt{}.exe'.format(year)) + # Cleanup + remove_from_temp(odt.exe) def update_classic_start_skin(): diff --git a/.bin/Scripts/settings/launchers.py b/.bin/Scripts/settings/launchers.py index 0456376d..73dc14d1 100644 --- a/.bin/Scripts/settings/launchers.py +++ b/.bin/Scripts/settings/launchers.py @@ -360,36 +360,60 @@ LAUNCHERS = { 'Home and Business 2016 (x32)': { 'L_TYPE': 'Office', 'L_PATH': '2016', - 'L_ITEM': 'hb_32.xml', + 'L_ITEM': '2016_hb_32.xml', 'L_NCMD': 'True', }, 'Home and Business 2016 (x64)': { 'L_TYPE': 'Office', 'L_PATH': '2016', - 'L_ITEM': 'hb_64.xml', + 'L_ITEM': '2016_hb_64.xml', 'L_NCMD': 'True', }, 'Home and Student 2016 (x32)': { 'L_TYPE': 'Office', 'L_PATH': '2016', - 'L_ITEM': 'hs_32.xml', + 'L_ITEM': '2016_hs_32.xml', 'L_NCMD': 'True', }, 'Home and Student 2016 (x64)': { 'L_TYPE': 'Office', 'L_PATH': '2016', - 'L_ITEM': 'hs_64.xml', + 'L_ITEM': '2016_hs_64.xml', 'L_NCMD': 'True', }, - 'Office 365 2016 (x32)': { + 'Home and Business 2019 (x32)': { 'L_TYPE': 'Office', - 'L_PATH': '2016', + 'L_PATH': '2019', + 'L_ITEM': '2019_hb_32.xml', + 'L_NCMD': 'True', + }, + 'Home and Business 2019 (x64)': { + 'L_TYPE': 'Office', + 'L_PATH': '2019', + 'L_ITEM': '2019_hb_64.xml', + 'L_NCMD': 'True', + }, + 'Home and Student 2019 (x32)': { + 'L_TYPE': 'Office', + 'L_PATH': '2019', + 'L_ITEM': '2019_hs_32.xml', + 'L_NCMD': 'True', + }, + 'Home and Student 2019 (x64)': { + 'L_TYPE': 'Office', + 'L_PATH': '2019', + 'L_ITEM': '2019_hs_64.xml', + 'L_NCMD': 'True', + }, + 'Office 365 2019 (x32)': { + 'L_TYPE': 'Office', + 'L_PATH': '2019', 'L_ITEM': '365_32.xml', 'L_NCMD': 'True', }, - 'Office 365 2016 (x64)': { + 'Office 365 2019 (x64)': { 'L_TYPE': 'Office', - 'L_PATH': '2016', + 'L_PATH': '2019', 'L_ITEM': '365_64.xml', 'L_NCMD': 'True', }, diff --git a/.bin/Scripts/settings/sources.py b/.bin/Scripts/settings/sources.py index 2644d4b6..236ba1a8 100644 --- a/.bin/Scripts/settings/sources.py +++ b/.bin/Scripts/settings/sources.py @@ -27,7 +27,7 @@ SOURCE_URLS = { 'NirCmd32': 'https://www.nirsoft.net/utils/nircmd.zip', 'NirCmd64': 'https://www.nirsoft.net/utils/nircmd-x64.zip', 'NotepadPlusPlus': 'https://notepad-plus-plus.org/repository/7.x/7.6.2/npp.7.6.2.bin.minimalist.7z', - 'Office Deployment Tool 2016': 'https://download.microsoft.com/download/2/7/A/27AF1BE6-DD20-4CB4-B154-EBAB8A7D4A7E/officedeploymenttool_10810.33603.exe', + 'Office Deployment Tool': 'https://download.microsoft.com/download/2/7/A/27AF1BE6-DD20-4CB4-B154-EBAB8A7D4A7E/officedeploymenttool_11107-33602.exe', 'ProduKey32': 'http://www.nirsoft.net/utils/produkey.zip', 'ProduKey64': 'http://www.nirsoft.net/utils/produkey-x64.zip', 'PuTTY': 'https://the.earth.li/~sgtatham/putty/latest/w32/putty.zip', diff --git a/.cbin/_include/_Office/hb_32.xml b/.cbin/_include/_Office/2016_hb_32.xml similarity index 100% rename from .cbin/_include/_Office/hb_32.xml rename to .cbin/_include/_Office/2016_hb_32.xml diff --git a/.cbin/_include/_Office/hb_64.xml b/.cbin/_include/_Office/2016_hb_64.xml similarity index 100% rename from .cbin/_include/_Office/hb_64.xml rename to .cbin/_include/_Office/2016_hb_64.xml diff --git a/.cbin/_include/_Office/hs_32.xml b/.cbin/_include/_Office/2016_hs_32.xml similarity index 100% rename from .cbin/_include/_Office/hs_32.xml rename to .cbin/_include/_Office/2016_hs_32.xml diff --git a/.cbin/_include/_Office/hs_64.xml b/.cbin/_include/_Office/2016_hs_64.xml similarity index 100% rename from .cbin/_include/_Office/hs_64.xml rename to .cbin/_include/_Office/2016_hs_64.xml diff --git a/.cbin/_include/_Office/2019_hb_32.xml b/.cbin/_include/_Office/2019_hb_32.xml new file mode 100644 index 00000000..d98dd66a --- /dev/null +++ b/.cbin/_include/_Office/2019_hb_32.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/.cbin/_include/_Office/2019_hb_64.xml b/.cbin/_include/_Office/2019_hb_64.xml new file mode 100644 index 00000000..29e10c4f --- /dev/null +++ b/.cbin/_include/_Office/2019_hb_64.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/.cbin/_include/_Office/2019_hs_32.xml b/.cbin/_include/_Office/2019_hs_32.xml new file mode 100644 index 00000000..3fc1606a --- /dev/null +++ b/.cbin/_include/_Office/2019_hs_32.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/.cbin/_include/_Office/2019_hs_64.xml b/.cbin/_include/_Office/2019_hs_64.xml new file mode 100644 index 00000000..3d2956fd --- /dev/null +++ b/.cbin/_include/_Office/2019_hs_64.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file