From 4a96736592fadc6e28eaf4cc9886dd495b7c0fbc Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Fri, 11 Jan 2019 13:17:25 -0700 Subject: [PATCH 1/2] Removed network installers --- .bin/Scripts/functions/update.py | 31 ------------------------------- .bin/Scripts/update_kit.py | 5 ----- 2 files changed, 36 deletions(-) diff --git a/.bin/Scripts/functions/update.py b/.bin/Scripts/functions/update.py index e1cd277d..c703bf71 100644 --- a/.bin/Scripts/functions/update.py +++ b/.bin/Scripts/functions/update.py @@ -182,37 +182,6 @@ def resolve_dynamic_url(source_url, regex): return url -def scan_for_net_installers(server, family_name, min_year): - """Scan network shares for installers.""" - if not server['Mounted']: - mount_network_share(server) - - if server['Mounted']: - for year in os.scandir(r'\\{IP}\{Share}'.format(**server)): - try: - year_ok = int(year.name) < min_year - except ValueError: - year_ok = False # Skip non-year items - if year_ok: - # Don't support outdated installers - continue - for version in os.scandir(year.path): - section = r'Installers\Extras\{}\{}'.format( - family_name, year.name) - if section not in LAUNCHERS: - LAUNCHERS[section] = {} - name = version.name - if re.search(r'(exe|msi)$', name, re.IGNORECASE): - name = name[:-4] - if name not in LAUNCHERS[section]: - LAUNCHERS[section][name] = { - 'L_TYPE': family_name, - 'L_PATH': year.name, - 'L_ITEM': version.name, - } - umount_network_share(server) - - # Data Recovery def update_testdisk(): # Stop running processes diff --git a/.bin/Scripts/update_kit.py b/.bin/Scripts/update_kit.py index 3bc31a72..18bbb69e 100644 --- a/.bin/Scripts/update_kit.py +++ b/.bin/Scripts/update_kit.py @@ -110,11 +110,6 @@ if __name__ == '__main__': width=40, item = item) - ## Search for network Office/QuickBooks installers & add to LAUNCHERS - print_success('Scanning for network installers') - scan_for_net_installers(OFFICE_SERVER, 'Office', min_year=2010) - scan_for_net_installers(QUICKBOOKS_SERVER, 'QuickBooks', min_year=2015) - ## Generate Launchers print_success('Generating launchers') for section in sorted(LAUNCHERS.keys()): From cb072366e0659ca2d7339ab1eee978654ca8852b Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Fri, 11 Jan 2019 13:25:33 -0700 Subject: [PATCH 2/2] Bugfix Office sections * Addresses issue #86 --- .bin/Scripts/Launch.cmd | 2 +- .bin/Scripts/functions/update.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.bin/Scripts/Launch.cmd b/.bin/Scripts/Launch.cmd index 3a3ed6a5..18c304f2 100644 --- a/.bin/Scripts/Launch.cmd +++ b/.bin/Scripts/Launch.cmd @@ -163,7 +163,7 @@ rem Prep set "args=-aoa -bso0 -bse0 -bsp0 -p%ARCHIVE_PASSWORD%" set "config=%L_ITEM%" set "dest=%client_dir%\Office\ODT" -set "odt_exe=%L_PATH%\setup.exe" +set "odt_exe=setup.exe" set "source=%cbin%\_Office.7z" rem Extract diff --git a/.bin/Scripts/functions/update.py b/.bin/Scripts/functions/update.py index c703bf71..07fe6e8f 100644 --- a/.bin/Scripts/functions/update.py +++ b/.bin/Scripts/functions/update.py @@ -626,21 +626,21 @@ def update_office(): shutil.copytree(include_path, dest) # Download and extract - _odt = 'odt.exe' - _out_path = r'{}\odt' + _out_path = r'{}\odt'.format(global_vars['TmpDir']) download_to_temp('odt.exe', SOURCE_URLS['Office Deployment Tool']) cmd = [ - odt, - r'/extract:{}\odt'.format(global_vars['TmpDir']), + r'{}\odt.exe'.format(global_vars['TmpDir']), + r'/extract:{}\odt'.format(_out_path), '/quiet', ] run_program(cmd) shutil.move( - _out_path, + r'{}\setup.exe'.format(_out_path), r'{}\_Office'.format(global_vars['CBinDir'])) # Cleanup - remove_from_temp(odt.exe) + remove_from_temp('odt') + remove_from_temp('odt.exe') def update_classic_start_skin():