* TreeSizeFree downloads and extracts correctly again
* Compressing tools will skip 7-Zip archives
This commit is contained in:
Alan Mason 2017-11-21 10:34:52 -08:00
parent c47d88aad8
commit 52684ebb4a
2 changed files with 15 additions and 11 deletions

View file

@ -661,7 +661,6 @@ def update_treesizefree():
# Extract files # Extract files
## NOTE: When downloaded using requests it is a .zip.gz? ## NOTE: When downloaded using requests it is a .zip.gz?
source = r'{}\treesizefree.zip.gz'.format(global_vars['TmpDir']) source = r'{}\treesizefree.zip.gz'.format(global_vars['TmpDir'])
download_to_temp(name, url)
extract_generic(source, global_vars['TmpDir']) extract_generic(source, global_vars['TmpDir'])
extract_temp_to_cbin('treesizefree.zip', 'TreeSizeFree-Portable') extract_temp_to_cbin('treesizefree.zip', 'TreeSizeFree-Portable')

View file

@ -20,7 +20,7 @@ if __name__ == '__main__':
os.system('cls') os.system('cls')
## Download ## ## Download ##
print_info('Downloading tools') print_success('Downloading tools')
# Data Recovery # Data Recovery
print_info(' Data Recovery') print_info(' Data Recovery')
@ -57,7 +57,7 @@ if __name__ == '__main__':
try_and_print(message='Visual C++ Runtimes...', function=update_vcredists, other_results=other_results, width=40) try_and_print(message='Visual C++ Runtimes...', function=update_vcredists, other_results=other_results, width=40)
print_info(' Ninite') print_info(' Ninite')
for section in sorted(NINITE_SOURCES.keys()): for section in sorted(NINITE_SOURCES.keys()):
print_success(' {}'.format(section)) print_success(' {}'.format(section))
dest = r'{}\_Ninite\{}'.format(global_vars['CBinDir'], section) dest = r'{}\_Ninite\{}'.format(global_vars['CBinDir'], section)
for name, url in sorted(NINITE_SOURCES[section].items()): for name, url in sorted(NINITE_SOURCES[section].items()):
url = 'https://ninite.com/{}/ninite.exe'.format(url) url = 'https://ninite.com/{}/ninite.exe'.format(url)
@ -87,19 +87,24 @@ if __name__ == '__main__':
print_info(' Uninstallers') print_info(' Uninstallers')
try_and_print(message='IObit Uninstaller...', function=update_iobit_uninstaller, other_results=other_results, width=40) try_and_print(message='IObit Uninstaller...', function=update_iobit_uninstaller, other_results=other_results, width=40)
## Review ##
print_standard('Please review the results and download/extract any missing items to .cbin')
pause('Press Enter to compress the .cbin items')
## Compress ## ## Compress ##
print_info('Compressing tools') print_success('Compressing tools')
print_info(' _Drivers') print_info(' _Drivers')
for item in os.scandir(r'{}\_Drivers'.format(global_vars['CBinDir'])): for item in os.scandir(r'{}\_Drivers'.format(global_vars['CBinDir'])):
try_and_print( if not re.search(r'^(_Drivers|.*7z)$', item.name, re.IGNORECASE):
message='{}...'.format(item.name), try_and_print(
function=compress_and_remove_item, message='{}...'.format(item.name),
other_results = other_results, function=compress_and_remove_item,
width=40, other_results = other_results,
item = item) width=40,
item = item)
print_info(' .cbin') print_info(' .cbin')
for item in os.scandir(global_vars['CBinDir']): for item in os.scandir(global_vars['CBinDir']):
if not re.search(r'^_(Drivers|include)$', item.name, re.IGNORECASE): if not re.search(r'^(_Drivers|_include|.*7z)$', item.name, re.IGNORECASE):
try_and_print( try_and_print(
message='{}...'.format(item.name), message='{}...'.format(item.name),
function=compress_and_remove_item, function=compress_and_remove_item,