Merge remote-tracking branch 'upstream/main'

This commit is contained in:
2025-04-22 21:53:52 -04:00
13 changed files with 1033 additions and 467 deletions

View File

@@ -46,6 +46,12 @@ def connect_label_to_checkbox(label, checkbox):
checkbox.toggle()
label.mousePressEvent = toggle_checkbox
def connect_is_enabled_to_checkbox(items, chkbox):
for item in items:
if chkbox.isChecked():
item.setEnabled(True)
else:
item.setEnabled(False)
def check_nusget_updates(app, current_version: str, progress_callback=None) -> str | None:
# Simple function to make a request to the GitHub API and then check if the latest available version is newer.
@@ -76,6 +82,7 @@ def get_config_file() -> pathlib.Path:
def save_config(config_data: dict) -> None:
config_file = get_config_file()
print(f"writing data: {config_data}")
open(config_file, "w").write(json.dumps(config_data))
def update_setting(config_data: dict, setting: str, value: any) -> None:

View File

@@ -167,6 +167,8 @@ def run_nus_download_wii(out_folder: pathlib.Path, tid: str, version: str, pack_
else:
progress_callback.emit(" - No patches could be applied! Is this a stub IOS?")
title = ios_patcher.dump()
# Append "-PATCHED" to the end of the WAD file name to make it clear that it was modified.
wad_file_name = wad_file_name[:-4] + "-PATCHED" + wad_file_name[-4:]
# Have libWiiPy dump the WAD, and write that data out.
version_dir.joinpath(wad_file_name).write_bytes(title.dump_wad())
progress_callback.emit("Download complete!")