Add software bundle sections
This commit is contained in:
parent
49d7e6d78a
commit
a03d772788
5 changed files with 36 additions and 5 deletions
|
|
@ -117,7 +117,7 @@ BASE_MENUS = {
|
|||
MenuEntry('Firefox', 'auto_install_firefox'),
|
||||
MenuEntry('LibreOffice', 'auto_install_libreoffice'),
|
||||
MenuEntry('Open Shell', 'auto_install_open_shell'),
|
||||
MenuEntry('Software Bundle', no_op),
|
||||
MenuEntry('Software Bundle', 'auto_install_software_bundle'),
|
||||
),
|
||||
'Configure System': (
|
||||
MenuEntry('Chrome Notifications', no_op),
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ SOURCES = {
|
|||
'Samsung Magician': 'https://s3.ap-northeast-2.amazonaws.com/global.semi.static/SAMSUNG_SSD_v5_3_0_181121/CD0C7CC1BE00525FAC4675B9E502899B41D5C3909ECE3AA2FB6B74A766B2A1EA/Samsung_Magician_Installer.zip',
|
||||
'SDIO Themes': 'http://snappy-driver-installer.org/downloads/SDIO_Themes.zip',
|
||||
'SDIO Torrent': 'http://snappy-driver-installer.org/downloads/SDIO_Update.torrent',
|
||||
'Software Bundle': 'https://ninite.com/.net4.8-7zip-chrome-edge-vlc/ninite.exe',
|
||||
'ShutUp10': 'https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe',
|
||||
'smartmontools': 'https://1278-105252244-gh.circle-artifacts.com/0/builds/smartmontools-win32-setup-7.3-r5216.exe',
|
||||
'TDSSKiller': 'https://media.kaspersky.com/utilities/VirusUtilities/EN/tdsskiller.exe',
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ def download_file(out_path, source_url, as_new=False, overwrite=False):
|
|||
_f.write(chunk)
|
||||
|
||||
# Done
|
||||
print(f'\r{" "*len(download_msg)}\r', end='', flush=True)
|
||||
print(f'\033[{len(download_msg)}D\033[0K', end='', flush=True)
|
||||
return out_path
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -441,6 +441,11 @@ def auto_install_open_shell():
|
|||
TRY_PRINT.run('Open Shell...', install_open_shell)
|
||||
|
||||
|
||||
def auto_install_software_bundle():
|
||||
"""Install standard software bundle."""
|
||||
TRY_PRINT.run('Software Bundle...', install_software_bundle)
|
||||
|
||||
|
||||
def auto_install_vcredists():
|
||||
"""Install latest supported Visual C++ runtimes."""
|
||||
TRY_PRINT.run('Visual C++ Runtimes...', install_vcredists)
|
||||
|
|
@ -612,6 +617,31 @@ def install_open_shell():
|
|||
run_program(cmd)
|
||||
|
||||
|
||||
def install_software_bundle():
|
||||
"""Install standard software bundle."""
|
||||
download_tool('Ninite', 'Software Bundle')
|
||||
installer = get_tool_path('Ninite', 'Software Bundle')
|
||||
msg = 'Waiting for installations to finish...'
|
||||
warning = 'NOTE: Press CTRL+c to manually resume if it gets stuck...'
|
||||
|
||||
# Start installations and wait for them to finish
|
||||
print_standard(msg)
|
||||
print_warning(warning, end='', flush=True)
|
||||
proc = popen_program([installer])
|
||||
try:
|
||||
proc.wait()
|
||||
except KeyboardInterrupt:
|
||||
# Assuming user-forced continue
|
||||
pass
|
||||
|
||||
# Clear info lines
|
||||
print(
|
||||
'\r\033[0K' # Cursor to start of current line and clear to end of line
|
||||
'\033[F\033[54C' # Cursor to start of prev line and then move 54 right
|
||||
'\033[0K', # Clear from cursor to end of line
|
||||
end='', flush=True)
|
||||
|
||||
|
||||
def install_vcredists():
|
||||
"""Install latest supported Visual C++ runtimes."""
|
||||
for year in (2012, 2013, 2019):
|
||||
|
|
|
|||
|
|
@ -588,11 +588,11 @@ class TryAndPrint():
|
|||
verbose,
|
||||
)
|
||||
f_exception = None
|
||||
catch_all = catch_all if catch_all else self.catch_all
|
||||
msg_good = msg_good if msg_good else self.msg_good
|
||||
catch_all = catch_all if catch_all is not None else self.catch_all
|
||||
msg_good = msg_good if msg_good is not None else self.msg_good
|
||||
output = None
|
||||
result_msg = 'UNKNOWN'
|
||||
verbose = verbose if verbose else self.verbose
|
||||
verbose = verbose if verbose is not None else self.verbose
|
||||
|
||||
# Build exception tuples
|
||||
e_exceptions = tuple(self._get_exception(e) for e in self.list_errors)
|
||||
|
|
|
|||
Loading…
Reference in a new issue