From 9fc882533dc7f5f0b0a5cc863ce480952982952c Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sun, 12 May 2019 14:42:44 -0600 Subject: [PATCH] Added smartmontools --- .bin/Scripts/functions/update.py | 36 ++++++++++++++++++++++++++++++++ .bin/Scripts/settings/sources.py | 1 + .bin/Scripts/settings/tools.py | 3 +++ .bin/Scripts/update_kit.py | 1 + 4 files changed, 41 insertions(+) diff --git a/.bin/Scripts/functions/update.py b/.bin/Scripts/functions/update.py index 883da47f..40a07ae7 100755 --- a/.bin/Scripts/functions/update.py +++ b/.bin/Scripts/functions/update.py @@ -968,6 +968,42 @@ def update_shutup10(): 'OOSU10.exe', SOURCE_URLS['ShutUp10']) + +def update_smartmontools(): + # Stop running processes + for process in ['smartctl.exe', 'smartctl64.exe']: + kill_process(process) + + # Remove existing folders + remove_from_kit('smartmontools') + + # Download installer + download_to_temp('smartmontools.exe', SOURCE_URLS['smartmontools']) + _installer = r'{}\smartmontools.exe'.format(global_vars['TmpDir']) + + # Extract 64-bit + extract_temp_to_cbin( + _installer, + 'smartmontools', + mode='e', + sz_args=[r'bin64\smartctl.exe'], + ) + shutil.move( + r'{}\smartctl.exe'.format(global_vars['CBinDir']), + r'{}\smartctl64.exe'.format(global_vars['CBinDir'])) + + # Extract 32-bit + extract_temp_to_cbin( + _installer, + 'smartmontools', + mode='e', + sz_args=[r'bin\drivedb.h', r'bin\smartctl.exe'], + ) + + # Cleanup + remove_item(_installer) + + def update_wiztree(): # Stop running processes for process in ['WizTree.exe', 'WizTree64.exe']: diff --git a/.bin/Scripts/settings/sources.py b/.bin/Scripts/settings/sources.py index 5474cb2b..42a1a399 100644 --- a/.bin/Scripts/settings/sources.py +++ b/.bin/Scripts/settings/sources.py @@ -41,6 +41,7 @@ SOURCE_URLS = { 'SDIO Themes': 'http://snappy-driver-installer.org/downloads/SDIO_Themes.zip', 'SDIO Torrent': 'http://snappy-driver-installer.org/downloads/SDIO_Update.torrent', 'ShutUp10': 'https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe', + 'smartmontools': 'https://700-105252244-gh.circle-artifacts.com/0/builds/smartmontools-win32-setup-7.1-r4914.exe', 'TDSSKiller': 'https://media.kaspersky.com/utilities/VirusUtilities/EN/tdsskiller.exe', 'TestDisk': 'https://www.cgsecurity.org/testdisk-7.1-WIP.win.zip', 'wimlib32': 'https://wimlib.net/downloads/wimlib-1.13.0-windows-i686-bin.zip', diff --git a/.bin/Scripts/settings/tools.py b/.bin/Scripts/settings/tools.py index dd3812e1..58170c0e 100644 --- a/.bin/Scripts/settings/tools.py +++ b/.bin/Scripts/settings/tools.py @@ -43,6 +43,9 @@ TOOLS = { 'SevenZip': { '32': r'7-Zip\7za.exe', '64': r'7-Zip\7za64.exe'}, + 'smartctl': { + '32: r'smartmontools\smartctl.exe', + '64: r'smartmontools\smartctl64.exe'} 'TDSSKiller': { '32': r'TDSSKiller\TDSSKiller.exe'}, 'wimlib-imagex': { diff --git a/.bin/Scripts/update_kit.py b/.bin/Scripts/update_kit.py index a0c9ffda..086535a4 100644 --- a/.bin/Scripts/update_kit.py +++ b/.bin/Scripts/update_kit.py @@ -77,6 +77,7 @@ if __name__ == '__main__': try_and_print(message='Firefox Extensions...', function=update_firefox_ublock_origin, other_results=other_results, width=40) try_and_print(message='PuTTY...', function=update_putty, other_results=other_results, width=40) try_and_print(message='ShutUp10...', function=update_shutup10, other_results=other_results, width=40) + try_and_print(message='smartmontools...', function=update_smartmontools, other_results=other_results, width=40) try_and_print(message='Notepad++...', function=update_notepadplusplus, other_results=other_results, width=40) try_and_print(message='WizTree...', function=update_wiztree, other_results=other_results, width=40) try_and_print(message='XMPlay...', function=update_xmplay, other_results=other_results, width=40)