From ca9a0eba34c731cb6901fe1ea645d52ec0362e6b Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Sat, 29 Jan 2022 08:56:27 -0700 Subject: [PATCH] Fix available typo --- gui/gui_main.py | 30 +++++++++++++++--------------- resources/cli_menu.py | 18 +++++++++--------- resources/installer.py | 6 +++--- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/gui/gui_main.py b/gui/gui_main.py index 23aed25ad..3dfbf880b 100644 --- a/gui/gui_main.py +++ b/gui/gui_main.py @@ -1036,7 +1036,7 @@ class wx_python_gui: self.frame.Show() # Download installer catalog - avalible_installers = installer.list_downloadable_macOS_installers(self.constants.payload_path, "PublicSeed") + available_installers = installer.list_downloadable_macOS_installers(self.constants.payload_path, "PublicSeed") self.frame.DestroyChildren() sys.stdout = self.stock_stdout @@ -1060,17 +1060,17 @@ class wx_python_gui: # Sort Installers by 'Version' # By default Apple adds new builds to the end of the list, so we need to sort them by version - avalible_installers = {k: v for k, v in sorted(avalible_installers.items(), key=lambda x: x[1]['Version'])} + available_installers = {k: v for k, v in sorted(available_installers.items(), key=lambda x: x[1]['Version'])} i = -20 - if avalible_installers: - for app in avalible_installers: - print(f"macOS {avalible_installers[app]['Version']} ({avalible_installers[app]['Build']} - {utilities.human_fmt(avalible_installers[app]['Size'])} - {avalible_installers[app]['Source']}) - {avalible_installers[app]['Variant']}") - if avalible_installers[app]['Variant'] in ["DeveloperSeed" , "PublicSeed"]: + if available_installers: + for app in available_installers: + print(f"macOS {available_installers[app]['Version']} ({available_installers[app]['Build']} - {utilities.human_fmt(available_installers[app]['Size'])} - {available_installers[app]['Source']}) - {available_installers[app]['Variant']}") + if available_installers[app]['Variant'] in ["DeveloperSeed" , "PublicSeed"]: extra = " Beta" else: extra = "" - self.install_selection = wx.Button(self.frame, label=f"macOS {avalible_installers[app]['Version']}{extra} ({avalible_installers[app]['Build']} - {utilities.human_fmt(avalible_installers[app]['Size'])})", size=(280, 30)) + self.install_selection = wx.Button(self.frame, label=f"macOS {available_installers[app]['Version']}{extra} ({available_installers[app]['Build']} - {utilities.human_fmt(available_installers[app]['Size'])})", size=(280, 30)) i = i + 25 self.install_selection.SetPosition( wx.Point( @@ -1078,7 +1078,7 @@ class wx_python_gui: self.subheader.GetPosition().y + self.subheader.GetSize().height + i ) ) - self.install_selection.Bind(wx.EVT_BUTTON, lambda event, temp=app: self.download_macos_click(f"macOS {avalible_installers[temp]['Version']} ({avalible_installers[temp]['Build']})", avalible_installers[temp]['Link'])) + self.install_selection.Bind(wx.EVT_BUTTON, lambda event, temp=app: self.download_macos_click(f"macOS {available_installers[temp]['Version']} ({available_installers[temp]['Build']})", available_installers[temp]['Link'])) self.install_selection.Centre(wx.HORIZONTAL) else: self.install_selection = wx.StaticText(self.frame, label="No installers available") @@ -1182,12 +1182,12 @@ class wx_python_gui: self.subheader.Centre(wx.HORIZONTAL) i = -7 - avalible_installers = installer.list_local_macOS_installers() - if avalible_installers: + available_installers = installer.list_local_macOS_installers() + if available_installers: print("Installer found") - for app in avalible_installers: - print(f"{avalible_installers[app]['Short Name']}: {avalible_installers[app]['Version']} ({avalible_installers[app]['Build']})") - self.install_selection = wx.Button(self.frame, label=f"{avalible_installers[app]['Short Name']}: {avalible_installers[app]['Version']} ({avalible_installers[app]['Build']})", size=(300, 30)) + for app in available_installers: + print(f"{available_installers[app]['Short Name']}: {available_installers[app]['Version']} ({available_installers[app]['Build']})") + self.install_selection = wx.Button(self.frame, label=f"{available_installers[app]['Short Name']}: {available_installers[app]['Version']} ({available_installers[app]['Build']})", size=(300, 30)) i = i + 25 self.install_selection.SetPosition( wx.Point( @@ -1195,7 +1195,7 @@ class wx_python_gui: self.header.GetPosition().y + self.header.GetSize().height + i ) ) - self.install_selection.Bind(wx.EVT_BUTTON, lambda event, temp=app: self.format_usb_menu(avalible_installers[temp]['Short Name'], avalible_installers[temp]['Path'])) + self.install_selection.Bind(wx.EVT_BUTTON, lambda event, temp=app: self.format_usb_menu(available_installers[temp]['Short Name'], available_installers[temp]['Path'])) self.install_selection.Centre(wx.HORIZONTAL) else: print("No installers found") @@ -1738,7 +1738,7 @@ class wx_python_gui: self.set_terascale_accel_checkbox.SetPosition(wx.Point( self.disable_thunderbolt_checkbox.GetPosition().x, self.disable_thunderbolt_checkbox.GetPosition().y + self.disable_thunderbolt_checkbox.GetSize().height)) - self.set_terascale_accel_checkbox.SetToolTip(wx.ToolTip("This option will determine whether TeraScale 2 acceleration is avalible during Root Volume patching.\nOnly applicable if your system has a AMD TeraScale 2 GPU (ie. MacBookPro8,2/3)")) + self.set_terascale_accel_checkbox.SetToolTip(wx.ToolTip("This option will determine whether TeraScale 2 acceleration is available during Root Volume patching.\nOnly applicable if your system has a AMD TeraScale 2 GPU (ie. MacBookPro8,2/3)")) if self.computer.real_model not in ["MacBookPro8,2", "MacBookPro8,3"]: self.set_terascale_accel_checkbox.Disable() diff --git a/resources/cli_menu.py b/resources/cli_menu.py index ab328a9e7..5a7003b3e 100644 --- a/resources/cli_menu.py +++ b/resources/cli_menu.py @@ -1280,16 +1280,16 @@ B. Exit options = [] title = ["Select the macOS Installer you wish to download"] menu = utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True) - avalible_installers = installer.list_downloadable_macOS_installers(self.constants.payload_path, "DeveloperSeed") - if avalible_installers: + available_installers = installer.list_downloadable_macOS_installers(self.constants.payload_path, "DeveloperSeed") + if available_installers: # Add mirror of 11.2.3 for users who want it options.append([f"macOS {mirror_data.Install_macOS_Big_Sur_11_2_3['Version']} ({mirror_data.Install_macOS_Big_Sur_11_2_3['Build']} - {utilities.human_fmt(mirror_data.Install_macOS_Big_Sur_11_2_3['Size'])} - {mirror_data.Install_macOS_Big_Sur_11_2_3['Source']})", lambda: self.download_install_assistant(mirror_data.Install_macOS_Big_Sur_11_2_3['Link'])]) - for app in avalible_installers: - if avalible_installers[app]['Variant'] in ["DeveloperSeed", "PublicSeed"]: + for app in available_installers: + if available_installers[app]['Variant'] in ["DeveloperSeed", "PublicSeed"]: variant = " Beta" else: variant = "" - options.append([f"macOS {avalible_installers[app]['Version']}{variant} ({avalible_installers[app]['Build']} - {utilities.human_fmt(avalible_installers[app]['Size'])} - {avalible_installers[app]['Source']})", lambda x=app: self.download_install_assistant(avalible_installers[x]['Link'])]) + options.append([f"macOS {available_installers[app]['Version']}{variant} ({available_installers[app]['Build']} - {utilities.human_fmt(available_installers[app]['Size'])} - {available_installers[app]['Source']})", lambda x=app: self.download_install_assistant(available_installers[x]['Link'])]) for option in options: menu.add_menu_option(option[0], function=option[1]) response = menu.start() @@ -1300,10 +1300,10 @@ B. Exit options = [] title = ["Select the macOS Installer you wish to use"] menu = utilities.TUIMenu(title, "Please select an option: ", auto_number=True, top_level=True) - avalible_installers = installer.list_local_macOS_installers() - if avalible_installers: - for app in avalible_installers: - options.append([f"{avalible_installers[app]['Short Name']}: {avalible_installers[app]['Version']} ({avalible_installers[app]['Build']})", lambda x=app: self.list_disks(avalible_installers[x]['Path'])]) + available_installers = installer.list_local_macOS_installers() + if available_installers: + for app in available_installers: + options.append([f"{available_installers[app]['Short Name']}: {available_installers[app]['Version']} ({available_installers[app]['Build']})", lambda x=app: self.list_disks(available_installers[x]['Path'])]) for option in options: menu.add_menu_option(option[0], function=option[1]) response = menu.start() diff --git a/resources/installer.py b/resources/installer.py index d0a8e55cc..3149d520f 100644 --- a/resources/installer.py +++ b/resources/installer.py @@ -106,7 +106,7 @@ def install_macOS_installer(download_path): return False def list_downloadable_macOS_installers(download_path, catalog): - avalible_apps = {} + available_apps = {} if catalog == "DeveloperSeed": link = "https://swscan.apple.com/content/catalogs/others/index-12seed-12-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz" elif catalog == "PublicSeed": @@ -151,7 +151,7 @@ def list_downloadable_macOS_installers(download_path, catalog): size = ia_package["Size"] integrity = ia_package["IntegrityDataURL"] - avalible_apps.update({ + available_apps.update({ item: { "Version": version, "Build": build, @@ -164,7 +164,7 @@ def list_downloadable_macOS_installers(download_path, catalog): }) except KeyError: pass - return avalible_apps + return available_apps def format_drive(disk_id): # Formats a disk for macOS install