From f0532d1e7dfd6440a981cba8625173c7875f7e39 Mon Sep 17 00:00:00 2001 From: Manuel Quarneti Date: Wed, 11 Nov 2026 00:49:48 +0100 Subject: [PATCH 01/12] breaking: drop windows xp and vista --- .cargo/config.toml | 3 +- .cargo/dist.toml | 15 ++-- Cargo.lock | 73 +++++-------------- Cargo.toml | 44 +++--------- Justfile | 8 +-- build.rs | 48 +++++++------ src/ui/dialogs.rs | 171 +++++++++++++++------------------------------ src/ui/theme.rs | 26 +++++-- 8 files changed, 139 insertions(+), 249 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index e95e1888f..8835301ed 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -6,6 +6,5 @@ AWS_LC_SYS_CFLAGS = "-fno-lto" [alias] build-dist-appimage = "--config .cargo/dist.toml build -Z build-std=std,panic_abort --release --no-default-features --features dist-appimage" -build-dist-windows-modern = "--config .cargo/dist.toml build -Z build-std=std,panic_abort --release --no-default-features --features dist-windows-modern" -build-dist-windows-legacy = "--config .cargo/dist.toml build -Z build-std=std,panic_abort --release --no-default-features --features dist-windows-legacy" +build-dist-windows = "--config .cargo/dist.toml build -Z build-std=std,panic_abort --release --no-default-features --features dist-windows" build-dist-macos = "--config .cargo/dist.toml build -Z build-std=std,panic_abort --release --no-default-features --features dist-macos" diff --git a/.cargo/dist.toml b/.cargo/dist.toml index 35155186a..1496eb677 100644 --- a/.cargo/dist.toml +++ b/.cargo/dist.toml @@ -37,8 +37,9 @@ CXXFLAGS_aarch64_pc_windows_msvc = "/clang:-O3 /clang:-flto /clang:-fuse-ld=lld- CC_i686_win7_windows_msvc = "clang-cl" CXX_i686_win7_windows_msvc = "clang-cl" -CFLAGS_i686_win7_windows_msvc = "/clang:-O3" -CXXFLAGS_i686_win7_windows_msvc = "/clang:-O3" +AR_aarch64_pc_windows_msvc = "llvm-lib" +CFLAGS_i686_win7_windows_msvc = "/clang:-O3 /clang:-fuse-ld=lld-link"" +CXXFLAGS_i686_win7_windows_msvc = "/clang:-O3 /clang:-fuse-ld=lld-link"" CC_x86_64_apple_darwin = "clang" CXX_x86_64_apple_darwin = "clang++" @@ -68,20 +69,14 @@ rustflags = ["-C", "linker-plugin-lto", "-C", "link-arg=-fuse-ld=lld"] [target.x86_64-win7-windows-msvc] linker = "lld-link" -rustflags = [ - "-C", - "target-feature=+crt-static", - "-C", - "linker-plugin-lto", - "-C", - "link-arg=/FORCE:MULTIPLE", -] +rustflags = ["-C", "target-feature=+crt-static", "-C", "linker-plugin-lto"] [target.aarch64-pc-windows-msvc] linker = "lld-link" rustflags = ["-C", "target-feature=+crt-static", "-C", "linker-plugin-lto"] [target.i686-win7-windows-msvc] +linker = "lld-link" rustflags = ["-C", "target-feature=+crt-static"] [target.x86_64-apple-darwin] diff --git a/Cargo.lock b/Cargo.lock index 68c1419d7..7a3447582 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,7 +8,6 @@ version = "6.1.11" dependencies = [ "anyhow", "arrayvec", - "dark-light", "directories", "fs4", "hex", @@ -37,7 +36,6 @@ dependencies = [ "sys-locale", "tempfile", "time", - "tinyfiledialogs", "twbm-idmap", "wgpu", "which-fs", @@ -832,9 +830,9 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.5.4" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f97d3416d5337d15c4b0d78c8c91df922ca143f57ec20e2d1c188333047ef04" +checksum = "2b929dd2a135771f40afabd1073f85eed59c800b7c61901e5c254270497dad64" dependencies = [ "cfg-if", ] @@ -897,21 +895,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f27ae1dd37df86211c42e150270f82743308803d90a6f6e6651cd730d5e1732f" -[[package]] -name = "dark-light" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f66b71ac6b73812b0bf51cda8dd646a268fbb38623f45b2b7907593c323f745" -dependencies = [ - "objc2 0.6.5", - "objc2-foundation 0.3.2", - "wasm-bindgen", - "web-sys", - "windows-sys 0.61.2", - "winreg", - "zbus", -] - [[package]] name = "deranged" version = "0.5.9" @@ -2054,9 +2037,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.32" +version = "1.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69965d2409bff8c8cea3829009fff66a86f05a0570656552ef70f616e8e4bd85" +checksum = "fee3f59f4321dab0c78d828942e7aa09d0bd8ad6e78a501977e6bf3d02938045" dependencies = [ "cc", "libc", @@ -2123,18 +2106,18 @@ dependencies = [ [[package]] name = "lucide-icons" -version = "1.70.0" +version = "1.71.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83bac69fc369b66f6dfcd418a34f474c6b79f6985e7cdf29f1b5319fc0050322" +checksum = "6b0755f5e6d1e359cc48eafd14f366e55d48efaf6abd796a7c3ca15de7ef9726" dependencies = [ "iced", ] [[package]] name = "lzma-rust2" -version = "0.23.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1c46f3fcd2e888afdb01a07efc071cb21300e07c68d32c3e8b01b5c8cb1fcaa" +checksum = "ef1d73c59a56771343712b22ea5615092c612c16ba291c0979e3105dfeec4890" [[package]] name = "macro_rules_attribute" @@ -3370,9 +3353,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.15.1" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f4925028c7eb5d1fcdaf196971378ed9d2c1c4efc7dc5d011256f76c99c0a96" +checksum = "102f35f7de7b06d8c61f1cff6592f5253e0dea431c74867aad5dfd70f44663fb" dependencies = [ "zeroize", ] @@ -3565,9 +3548,9 @@ dependencies = [ [[package]] name = "sevenz-rust2" -version = "0.24.2" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30146010a60b5773ef63f7b0033576c7a0487ecc87a30d97b787ca8e27c85140" +checksum = "e5e465701779cbc6d0d10cf907f175035cfdd50b8d3cb628d7f1f435ef02972f" dependencies = [ "crc32fast", "js-sys", @@ -4021,16 +4004,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "tinyfiledialogs" -version = "3.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e25fa0bc43a6566e2cc6d7ac96df3fa5a57beba34445bead1b368ba8fe9ca568" -dependencies = [ - "cc", - "libc", -] - [[package]] name = "tinyvec" version = "1.13.3" @@ -4483,18 +4456,18 @@ dependencies = [ [[package]] name = "webpki-root-certs" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e49d0e65abc00c142e8f9428da991da9f1a250c39be97459901eb12b9b49f62a" +checksum = "293198dcebfb821155b5092ab94b5a82ff180eddd7241df3bd6e66a4ffd1a585" dependencies = [ "rustls-pki-types", ] [[package]] name = "webpki-roots" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5f280bbb2b287bc8e7de7e3852945a0ff50d1bbcb5ed42b6c7a568c546df171" +checksum = "7265c9301c16a8711c992c2d8da90ee77ef54b1ed51482d6dfeb00dc756b1297" dependencies = [ "rustls-pki-types", ] @@ -5073,16 +5046,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "winreg" -version = "0.56.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d6f32a0ff4a9f6f01231eb2059cc85479330739333e0e58cadf03b6af2cca10" -dependencies = [ - "cfg-if", - "windows-sys 0.61.2", -] - [[package]] name = "winresource" version = "0.1.34" @@ -5292,9 +5255,9 @@ dependencies = [ [[package]] name = "zip" -version = "9.5.0" +version = "9.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700e6c427aff64acdbf02e85fbfd946c2ee12319d1af013092f3a2178914ff8" +checksum = "e3476fd497ac8af5b1ec7b51acab7bef380f7e8dd8e0487595bafd839417a302" dependencies = [ "constant_time_eq", "crc32fast", diff --git a/Cargo.toml b/Cargo.toml index a6f854bbf..ae5414526 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,11 +13,10 @@ OriginalFilename = "TinyWiiBackupManager.exe" LegalCopyright = "Copyright © 2026 Manuel Quarneti. Licensed under GPL-3.0-only." [features] -default = ["native-tls", "static-nod", "dialogs-rfd"] +default = ["native-tls", "static-nod"] native-tls = ["minreq/https-native-tls"] # uses system tls -bundled-tls = ["minreq/https-rustls-probe"] # bundled tls + os certificates -bundled-tls-certs = ["minreq/https-rustls"] # bundled tls + bundled certificates +bundled-tls = ["minreq/https-rustls-probe"] # uses bundled tls + os certificates # bundled compression libraries static-nod = [ @@ -27,29 +26,10 @@ static-nod = [ "nod/compress-zstd-static", ] -dialogs-rfd = ["dep:rfd"] # modern -dialogs-tfd = ["dep:tinyfiledialogs"] # legacy - -yy-thunks = [] -vc-ltl5 = [] - -dist-appimage = ["bundled-tls", "static-nod", "dialogs-rfd"] -dist-flatpak = ["native-tls", "dialogs-rfd"] -dist-windows-modern = [ - "native-tls", - "static-nod", - "dialogs-rfd", - "yy-thunks", - "vc-ltl5", -] -dist-windows-legacy = [ - "bundled-tls-certs", - "static-nod", - "dialogs-tfd", - "yy-thunks", - "vc-ltl5", -] -dist-macos = ["native-tls", "static-nod", "dialogs-rfd"] +dist-appimage = ["bundled-tls", "static-nod"] +dist-flatpak = ["native-tls"] +dist-windows = ["native-tls", "static-nod"] +dist-macos = ["native-tls", "static-nod"] [dependencies] iced = { version = "0.14", default-features = false, features = [ @@ -101,26 +81,22 @@ nod = { git = "https://github.com/wiidev/nod.git", branch = "fix-block-handling" ] } semver = "1" humantime = "2" -rfd = { version = "0.18", optional = true } -tinyfiledialogs = { version = "3", default-features = false, optional = true } +rfd = "0.18" self_cell = "1.3" # free dependency: also dependency of cosmic-text -[target.'cfg(any(target_os = "linux", target_arch = "aarch64"))'.dependencies] +[target.'cfg(any(target_os = "linux", all(target_os = "macos", target_arch = "aarch64")))'.dependencies] mundy = { version = "0.2", default-features = false, features = [ "accent-color", "color-scheme", ] } -[target.'cfg(not(any(target_os = "linux", target_arch = "aarch64")))'.dependencies] -dark-light = { version = "3", default-features = false } - [target.'cfg(target_os = "windows")'.dependencies] wgpu = { version = "27.0", default-features = false, features = [ "std", "parking_lot", "dx12", ] } -winsafe = { version = "0.0.29", features = ["dwm"] } +winsafe = { version = "0.0.29", features = ["dwm", "advapi"] } [target.'cfg(target_os = "linux")'.dependencies] wgpu = { version = "27.0", default-features = false, features = [ @@ -139,7 +115,7 @@ wgpu = { version = "27.0", default-features = false, features = [ [build-dependencies] hex = { version = "0.4", default-features = false } winresource = "0.1" -sevenz-rust2 = { version = "0.24", default-features = false, features = [ +sevenz-rust2 = { version = "0.25", default-features = false, features = [ "util", ] } zip = { version = "9", default-features = false, features = [ diff --git a/Justfile b/Justfile index 75da60ed7..daa754523 100644 --- a/Justfile +++ b/Justfile @@ -50,16 +50,16 @@ package-linux-i686: (_package-linux "i686") [windows] _build-windows target arch variant: - cargo build-dist-windows-{{variant}} --target {{target}} + cargo build-dist-windows --target {{target}} New-Item -ItemType Directory -Force -Path out | Out-Null Copy-Item -Path target\{{target}}\release\TinyWiiBackupManager.exe -Destination out\TinyWiiBackupManager-windows-{{arch}}.exe [windows] -build-windows-x64: (_build-windows "x86_64-win7-windows-msvc" "x64" "modern") +build-windows-x64: (_build-windows "x86_64-win7-windows-msvc" "x64") [windows] -build-windows-arm64: (_build-windows "aarch64-pc-windows-msvc" "arm64" "modern") +build-windows-arm64: (_build-windows "aarch64-pc-windows-msvc" "arm64") [windows] -build-windows-x86: (_build-windows "i686-win7-windows-msvc" "x86" "legacy") +build-windows-x86: (_build-windows "i686-win7-windows-msvc" "x86") # just a copy [windows] diff --git a/build.rs b/build.rs index 78d1977f4..1d9061ca0 100644 --- a/build.rs +++ b/build.rs @@ -6,11 +6,13 @@ use winresource::WindowsResource; use zip::ZipArchive; fn extract_sha1_list(dat_path: &str, list: &mut Vec<[u8; 20]>) { + const ANCHOR: &str = "sha1=\""; + let dat = fs::read_to_string(dat_path).unwrap(); let mut remaining = &dat[..]; - while let Some(found) = remaining.find("sha1=\"") { - remaining = &remaining[found + 6..]; + while let Some(found) = remaining.find(ANCHOR) { + remaining = &remaining[found + ANCHOR.len()..]; let next_quote = remaining.find('"').unwrap(); let sha1 = &remaining[..next_quote]; @@ -28,6 +30,7 @@ fn main() { let out_dir = PathBuf::from(env::var_os("OUT_DIR").unwrap()); let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap(); let target_arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap(); + let target_env = env::var("CARGO_CFG_TARGET_ENV").unwrap(); let wii_dat_path = "assets/Nintendo - Wii - Datfile (3780) (2026-06-15 03-13-28).dat"; let ngc_dat_path = "assets/Nintendo - GameCube - Datfile (2019) (2026-06-13 18-14-01).dat"; @@ -46,7 +49,7 @@ fn main() { fs::write(out_dir.join("sha1_list.bin"), sha1_list.as_flattened()).unwrap(); // lighter and static vcruntime replacement - if cfg!(feature = "vc-ltl5") { + if cfg!(feature = "dist-windows") && target_env == "msvc" { let vc_ltl5_dir = out_dir.join("VC-LTL-Binary"); if !vc_ltl5_dir.exists() { @@ -64,9 +67,9 @@ fn main() { } let (win_ver, arch) = match target_arch.as_str() { - "x86_64" => ("6.0.6000.0", "x64"), // vista - "x86" => ("5.1.2600.0", "Win32"), // xp - "aarch64" => ("10.0.10240.0", "ARM64"), // 10 + "x86_64" => ("6.0.6000.0", "x64"), // vista+ + "x86" => ("6.0.6000.0", "Win32"), // vista+ + "aarch64" => ("10.0.10240.0", "ARM64"), // 10+ _ => unreachable!(), }; @@ -75,17 +78,21 @@ fn main() { .join(win_ver) .join("lib") .join(arch); - assert!(lib_path.exists()); + + println!("cargo:rustc-link-arg=/LIBPATH={}", lib_path.display()); println!("cargo:rustc-link-search=native={}", lib_path.display()); } - // old windows compatibility - if cfg!(feature = "yy-thunks") && target_arch != "aarch64" { + // windows 7 compatibility + if cfg!(feature = "dist-windows") + && target_env == "msvc" + && (target_arch == "x86_64" || target_arch == "x86") + { let yy_thunks_dir = out_dir.join("YY-Thunks-Objs"); if !yy_thunks_dir.exists() { - let resp = minreq::get("https://github.com/Chuyu-Team/YY-Thunks/releases/download/v1.2.3/YY-Thunks-Objs.zip") + let resp = minreq::get("https://github.com/Chuyu-Team/YY-Thunks/releases/download/v1.2.4-Beta.1/YY-Thunks-Lib.zip") .with_timeout(60) .send() .unwrap(); @@ -99,22 +106,19 @@ fn main() { .unwrap(); } - let (obj_filename, arch, win_ver) = match target_arch.as_str() { - "x86_64" => ("YY_Thunks_for_Vista.obj", "x64", "6.00"), - "x86" => ("YY_Thunks_for_WinXP.obj", "x86", "5.01"), + let arch = match target_arch.as_str() { + "x86_64" => "x64", + "x86" => "x86", _ => unreachable!(), }; - let obj_path = yy_thunks_dir.join("objs").join(arch).join(obj_filename); - - assert!(obj_path.exists()); - println!("cargo:rustc-link-arg={}", obj_path.display()); - println!("cargo:rustc-link-lib=dylib=ole32"); - println!("cargo:rustc-link-arg=/SUBSYSTEM:WINDOWS,{win_ver}"); - } + let lib_path = yy_thunks_dir.join("Lib").join("6.1.7600.0").join(arch); + assert!(lib_path.exists()); - if cfg!(feature = "vc-ltl5") || cfg!(feature = "yy-thunks") { - println!("cargo:rustc-link-arg=/VERBOSE:LIB"); + println!("cargo:rustc-link-arg=/LIBPATH={}", lib_path.display()); + println!("cargo:rustc-link-search=native={}", lib_path.display()); + println!("cargo:rustc-link-arg=/SUBSYSTEM:WINDOWS,6.01"); + println!("cargo:rustc-link-lib=ole32"); } // Generate Windows resources diff --git a/src/ui/dialogs.rs b/src/ui/dialogs.rs index 4e65d7fa8..ce6c5ae22 100644 --- a/src/ui/dialogs.rs +++ b/src/ui/dialogs.rs @@ -7,128 +7,91 @@ use crate::{ util::fs::recursive_file_scan, }; use iced::Task; +use rfd::AsyncFileDialog; use smol::stream; use std::{ffi::OsStr, path::PathBuf}; use wii_disc_info::game_id::GameID; +struct Filter<'a> { + name: &'a str, + extensions: &'a [&'a str], +} + #[rustfmt::skip] -const IN_GAME_FILTER_WITH_ZIP: (&[&str], &str) = ( - &[ +const IN_GAME_FILTER_WITH_ZIP: Filter<'static> = Filter { + name: "Wii/NGC rom", + extensions: &[ "iso", "gcm", "wia", "rvz", "wbfs", "ciso", "gcz", "tgc", "zip", "ISO", "GCM", "WIA", "RVZ", "WBFS", "CISO", "GZC", "TGC", "ZIP", - ], - "Wii/NGC rom", -); + ] +}; #[rustfmt::skip] -const IN_GAME_FILTER: (&[&str], &str) = ( - &[ +const IN_GAME_FILTER: Filter<'static> = Filter { + name: "Wii/NGC rom", + extensions: &[ "iso", "gcm", "wia", "rvz", "wbfs", "ciso", "gcz", "tgc", "ISO", "GCM", "WIA", "RVZ", "WBFS", "CISO", "GZC", "TGC", ], - "Wii/NGC rom" -); +}; -#[cfg(feature = "dialogs-rfd")] #[rustfmt::skip] -const OUT_GAME_FILTERS: &[(&[&str], &str)] = &[ - (&["rvz"], "RVZ"), - (&["iso", "gcm"], "ISO"), - (&["wia"], "WIA"), - (&["wbfs"], "WBFS"), - (&["ciso"], "CISO"), - (&["gcz"], "GCZ"), - (&["tgc"], "TGC"), +const OUT_GAME_FILTERS: &[Filter<'static>] = &[ + Filter { name: "RVZ", extensions: &["rvz"] }, + Filter { name: "ISO", extensions: &["iso", "gcm"] }, + Filter { name: "WIA", extensions: &["wia"] }, + Filter { name: "WBFS", extensions: &["wbfs"] }, + Filter { name: "CISO", extensions: &["ciso"] }, + Filter { name: "GCZ", extensions: &["gcz"] }, + Filter { name: "TGC", extensions: &["tgc"] }, ]; -#[cfg(feature = "dialogs-tfd")] #[rustfmt::skip] -const OUT_GAME_FILTERS: (&[&str], &str) = ( - &[ - "rvz", "iso", "gcm", "wia", "wbfs", "ciso", "gcz", "tgc", - ], - "Wii/NGC rom" -); - -#[rustfmt::skip] -const IN_APP_FILTER: (&[&str], &str) = ( - &[ +const IN_APP_FILTER: Filter<'static> = Filter { + name: "Homebrew app", + extensions: &[ "zip", "ZIP" ], - "Homebrew app" -); +}; #[rustfmt::skip] -const IN_WIILOAD_FILTER: (&[&str], &str) = ( - &[ +const IN_WIILOAD_FILTER: Filter<'static> = Filter { + name: "Homebrew app", + extensions: &[ "zip", "dol", "elf", "ZIP", "DOL", "ELF", ], - "Homebrew app" -); - -#[cfg(feature = "dialogs-rfd")] -type Base = rfd::AsyncFileDialog; - -#[cfg(feature = "dialogs-tfd")] -type Base = (); +}; -#[cfg(feature = "dialogs-rfd")] -pub fn init_file_dialog_task() -> Task { +pub fn init_file_dialog_task() -> Task { iced::window::oldest() .and_then(|id| iced::window::run(id, |w| rfd::AsyncFileDialog::new().set_parent(w))) } -#[cfg(feature = "dialogs-tfd")] -pub fn init_file_dialog_task() -> Task { - Task::done(()) -} - -#[cfg(feature = "dialogs-rfd")] -async fn pick_folder(base: Base, title: &'static str) -> Option { +async fn pick_folder(base: AsyncFileDialog, title: &'static str) -> Option { base.set_title(title).pick_folder().await.map(PathBuf::from) } -#[cfg(feature = "dialogs-tfd")] -async fn pick_folder(_base: Base, title: &'static str) -> Option { - smol::unblock(|| tinyfiledialogs::select_folder_dialog(title, "")) - .await - .map(PathBuf::from) -} - -#[cfg(feature = "dialogs-rfd")] async fn pick_file( - base: Base, + base: AsyncFileDialog, title: &'static str, - filter: (&'static [&'static str], &'static str), + filter: Filter<'static>, ) -> Option { base.set_title(title) - .add_filter(filter.1, filter.0) + .add_filter(filter.name, filter.extensions) .pick_file() .await .map(PathBuf::from) } -#[cfg(feature = "dialogs-tfd")] -async fn pick_file( - _base: (), - title: &'static str, - filter: (&'static [&'static str], &'static str), -) -> Option { - smol::unblock(move || tinyfiledialogs::open_file_dialog(title, "", Some(filter))) - .await - .map(PathBuf::from) -} - -#[cfg(feature = "dialogs-rfd")] async fn pick_files( - base: Base, + base: AsyncFileDialog, title: &'static str, - filter: (&'static [&'static str], &'static str), + filter: Filter<'static>, ) -> Vec { base.set_title(title) - .add_filter(filter.1, filter.0) + .add_filter(filter.name, filter.extensions) .pick_files() .await .into_iter() @@ -137,30 +100,17 @@ async fn pick_files( .collect() } -#[cfg(feature = "dialogs-tfd")] -async fn pick_files( - _base: Base, - title: &'static str, - filter: (&'static [&'static str], &'static str), -) -> Vec { - smol::unblock(move || tinyfiledialogs::open_file_dialog_multi(title, "", Some(filter))) - .await - .into_iter() - .flatten() - .map(PathBuf::from) - .collect() -} - -#[cfg(feature = "dialogs-rfd")] async fn save_file( - base: Base, + base: AsyncFileDialog, title: &'static str, filename: String, - filters: &'static [(&'static [&'static str], &'static str)], + filters: &'static [Filter<'static>], ) -> Option { filters .iter() - .fold(base, |d, &(exts, name)| d.add_filter(name, exts)) + .fold(base, |dialog, filter| { + dialog.add_filter(filter.name, filter.extensions) + }) .set_title(title) .set_file_name(filename) .save_file() @@ -168,21 +118,7 @@ async fn save_file( .map(PathBuf::from) } -#[cfg(feature = "dialogs-tfd")] -async fn save_file( - _base: Base, - title: &'static str, - filename: String, - filter: (&'static [&'static str], &'static str), -) -> Option { - smol::unblock(move || { - tinyfiledialogs::save_file_dialog_with_filter(title, &filename, filter.0, filter.1) - }) - .await - .map(PathBuf::from) -} - -pub fn make_pick_mount_point_dialog_task(base: Base) -> Task { +pub fn make_pick_mount_point_dialog_task(base: AsyncFileDialog) -> Task { Task::perform( pick_folder(base, "Select Drive/Mount Point"), |res| match res { @@ -192,7 +128,7 @@ pub fn make_pick_mount_point_dialog_task(base: Base) -> Task { ) } -pub fn make_pick_homebrew_apps_dialog_task(base: Base) -> Task { +pub fn make_pick_homebrew_apps_dialog_task(base: AsyncFileDialog) -> Task { Task::perform( pick_files(base, "Select Homebrew App(s) to import", IN_APP_FILTER), |res| match res { @@ -202,7 +138,7 @@ pub fn make_pick_homebrew_apps_dialog_task(base: Base) -> Task { ) } -pub fn make_pick_in_out_dialogs_task(base: Base) -> Task { +pub fn make_pick_in_out_dialogs_task(base: AsyncFileDialog) -> Task { Task::perform( async move { let in_path = pick_file(base.clone(), "Select Game to convert", IN_GAME_FILTER).await?; @@ -227,7 +163,10 @@ pub fn make_pick_in_out_dialogs_task(base: Base) -> Task { ) } -pub fn make_pick_games_dialog_task(base: Base, existing_ids: Box<[GameID]>) -> Task { +pub fn make_pick_games_dialog_task( + base: AsyncFileDialog, + existing_ids: Box<[GameID]>, +) -> Task { Task::perform( async move { let paths = pick_files(base, "Select Game(s) to import", IN_GAME_FILTER_WITH_ZIP).await; @@ -239,7 +178,7 @@ pub fn make_pick_games_dialog_task(base: Base, existing_ids: Box<[GameID]>) -> T } pub fn make_pick_games_recursively_dialog_task( - base: Base, + base: AsyncFileDialog, existing_ids: Box<[GameID]>, ) -> Task { Task::perform( @@ -247,7 +186,7 @@ pub fn make_pick_games_recursively_dialog_task( let res = pick_folder(base, "Select a directory containing game(s) to import").await; if let Some(path) = res { - let games = recursive_file_scan(path, IN_GAME_FILTER_WITH_ZIP.0); + let games = recursive_file_scan(path, IN_GAME_FILTER_WITH_ZIP.extensions); keep_valid_games(games, &existing_ids).await } else { @@ -258,7 +197,7 @@ pub fn make_pick_games_recursively_dialog_task( ) } -pub fn make_pick_export_game_dest_dialog_task(base: Base, game: Game) -> Task { +pub fn make_pick_export_game_dest_dialog_task(base: AsyncFileDialog, game: Game) -> Task { let ascii_title = twbm_idmap::get_ascii_title(game.id()).unwrap_or(game.title()); let filename = sanitize_title(ascii_title) + ".rvz"; @@ -276,7 +215,7 @@ pub fn make_pick_export_game_dest_dialog_task(base: Base, game: Game) -> Task Task { +pub fn make_pick_file_to_wiiload_dialog_task(base: AsyncFileDialog) -> Task { Task::perform( pick_file(base, "Select a file to send via wiiload", IN_WIILOAD_FILTER), |opt| match opt { diff --git a/src/ui/theme.rs b/src/ui/theme.rs index 6af380d82..814151c92 100644 --- a/src/ui/theme.rs +++ b/src/ui/theme.rs @@ -9,7 +9,7 @@ use iced::{ }, }; -#[cfg(any(target_os = "linux", target_arch = "aarch64"))] +#[cfg(any(target_os = "linux", all(target_os = "macos", target_arch = "aarch64")))] /// works on macos 10.14+, macos arm64 starts at 11 /// enable this on x86_64 if we're dropping support for < 10.14 fn accent() -> Option { @@ -21,19 +21,19 @@ fn accent() -> Option { .map(|accent| Color::from_rgb(accent.red as f32, accent.green as f32, accent.blue as f32)) } -#[cfg(all(target_os = "macos", not(target_arch = "aarch64")))] +#[cfg(all(target_os = "macos", target_arch = "x86_64"))] fn accent() -> Option { None } -#[cfg(all(target_os = "windows", not(target_arch = "aarch64")))] +#[cfg(target_os = "windows")] fn accent() -> Option { let argb = winsafe::DwmGetColorizationColor().ok()?; let [_, r, g, b] = argb.0.to_be_bytes(); Some(Color::from_rgb8(r, g, b)) } -#[cfg(any(target_os = "linux", target_arch = "aarch64"))] +#[cfg(any(target_os = "linux", all(target_os = "macos", target_arch = "aarch64")))] /// works on macos 10.14+, macos arm64 starts at 11 /// enable this on x86_64 if we're dropping support for < 10.14 fn is_dark() -> bool { @@ -44,9 +44,23 @@ fn is_dark() -> bool { .is_some_and(|prefs| prefs.color_scheme == mundy::ColorScheme::Dark) } -#[cfg(not(any(target_os = "linux", target_arch = "aarch64")))] +#[cfg(all(target_os = "macos", target_arch = "x86_64"))] fn is_dark() -> bool { - dark_light::detect().is_ok_and(|mode| mode == dark_light::Mode::Dark) + false +} + +#[cfg(target_os = "windows")] +fn is_dark() -> bool { + use winsafe::{self as w, co, prelude::*}; + + match w::HKEY::CURRENT_USER.RegGetValue( + Some("Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize"), + Some("AppsUseLightTheme"), + co::RRF::RT_REG_DWORD, + ) { + Ok(w::RegistryValue::Dword(val)) => val == 0, + _ => false, + } } fn generate(palette: Palette) -> Extended { From e26cecdbe8e26ea53e73349c8aa2779d00a0e5ee Mon Sep 17 00:00:00 2001 From: Manuel Quarneti Date: Wed, 11 Nov 2026 00:51:31 +0100 Subject: [PATCH 02/12] fix ci --- .cargo/dist.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.cargo/dist.toml b/.cargo/dist.toml index 1496eb677..7cdd0ed48 100644 --- a/.cargo/dist.toml +++ b/.cargo/dist.toml @@ -38,8 +38,8 @@ CXXFLAGS_aarch64_pc_windows_msvc = "/clang:-O3 /clang:-flto /clang:-fuse-ld=lld- CC_i686_win7_windows_msvc = "clang-cl" CXX_i686_win7_windows_msvc = "clang-cl" AR_aarch64_pc_windows_msvc = "llvm-lib" -CFLAGS_i686_win7_windows_msvc = "/clang:-O3 /clang:-fuse-ld=lld-link"" -CXXFLAGS_i686_win7_windows_msvc = "/clang:-O3 /clang:-fuse-ld=lld-link"" +CFLAGS_i686_win7_windows_msvc = "/clang:-O3 /clang:-fuse-ld=lld-link" +CXXFLAGS_i686_win7_windows_msvc = "/clang:-O3 /clang:-fuse-ld=lld-link" CC_x86_64_apple_darwin = "clang" CXX_x86_64_apple_darwin = "clang++" From 9f588a6f0568b7ae6b9b22121980bb3249a809c6 Mon Sep 17 00:00:00 2001 From: Manuel Quarneti Date: Wed, 11 Nov 2026 00:58:11 +0100 Subject: [PATCH 03/12] doc: update changelog --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 395372b95..59af5d614 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,10 +11,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - 💬 When exporting a game, the format is now selectable in the dialog (thanks @davideme ) +### Changed + +- 💬 Windows x86 builds now use the modern (Vista+) dialogs instead of the XP ones +- 🛜 Windows x86 builds now use the windows tls instead of a bundled one + ### Fixed - 🐛 Could not export games as .gcm +### Removed + +- 🔥 Since the builds don't seem to work anymore on Windows XP for some reason, I'm raising the minimum supported windows version to Windows 7. \ + I probably won't work on this by myself (as it's becoming increasingly difficult to test for me), but PRs are welcome + ## [v6.1.11] - 2026-11-03 ### Fixed From abcb47cf8b6af5f39b218fa3226adf346b196fff Mon Sep 17 00:00:00 2001 From: Manuel Quarneti Date: Wed, 11 Nov 2026 00:58:47 +0100 Subject: [PATCH 04/12] trigger ci --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6e0127c6c..dbb2d4eab 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,6 +12,7 @@ on: - "**.rs" - "Cargo.toml" - "Cargo.lock" + - ".cargo/*" - "package/**" - "dockerfiles/**" - "Justfile" From ace00c3bdfc4bef32444afda5eb7608e567a25b3 Mon Sep 17 00:00:00 2001 From: Manuel Quarneti Date: Wed, 11 Nov 2026 01:00:22 +0100 Subject: [PATCH 05/12] fix ci --- .cargo/dist.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cargo/dist.toml b/.cargo/dist.toml index 7cdd0ed48..c2e2b7659 100644 --- a/.cargo/dist.toml +++ b/.cargo/dist.toml @@ -37,7 +37,7 @@ CXXFLAGS_aarch64_pc_windows_msvc = "/clang:-O3 /clang:-flto /clang:-fuse-ld=lld- CC_i686_win7_windows_msvc = "clang-cl" CXX_i686_win7_windows_msvc = "clang-cl" -AR_aarch64_pc_windows_msvc = "llvm-lib" +AR_i686_win7_windows_msvc = "llvm-lib" CFLAGS_i686_win7_windows_msvc = "/clang:-O3 /clang:-fuse-ld=lld-link" CXXFLAGS_i686_win7_windows_msvc = "/clang:-O3 /clang:-fuse-ld=lld-link" From e12a452b57cb211d98361add5a70266eaf831502 Mon Sep 17 00:00:00 2001 From: Manuel Quarneti Date: Wed, 11 Nov 2026 01:01:14 +0100 Subject: [PATCH 06/12] doc: update readme --- README.md | 2 +- package/linux/it.mq1.TinyWiiBackupManager.metainfo.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1dc15d3a0..32a7f8fb6 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ - **Lightweight & fast**: Native app written in Rust and Iced, no Electron! - **Vast platform support**: - - :window: Windows XP+ | x86 (32-bit), x64 (64-bit), arm64 (Qualcomm Snapdragon etc.) + - :window: Windows 7+ | x86 (32-bit), x64 (64-bit), arm64 (Qualcomm Snapdragon etc.) - :apple: macOS 10.12+ | x86_64 (Intel), arm64 (Apple Silicon/M1+) - :penguin: Linux ~2014+ | x86 (32-bit), x86_64 (64-bit), arm64 (Raspberry PIs etc.) diff --git a/package/linux/it.mq1.TinyWiiBackupManager.metainfo.xml b/package/linux/it.mq1.TinyWiiBackupManager.metainfo.xml index 7e7a709f8..6078e6dd7 100644 --- a/package/linux/it.mq1.TinyWiiBackupManager.metainfo.xml +++ b/package/linux/it.mq1.TinyWiiBackupManager.metainfo.xml @@ -14,7 +14,7 @@

✨ Features

  • Native app written in Rust and Iced, no Electron!
  • -
  • Vast platform support: Windows XP+, macOS 10.12+, Linux ~2014+
  • +
  • Vast platform support: Windows 7+, macOS 10.12+, Linux ~2014+

🎮 Game Management

    From 70b7b9f547410ceadc84d463a044e6629354c4d7 Mon Sep 17 00:00:00 2001 From: Manuel Quarneti Date: Wed, 11 Nov 2026 01:05:12 +0100 Subject: [PATCH 07/12] chore: update clang (dockerfiles) --- dockerfiles/Dockerfile.aarch64 | 2 +- dockerfiles/Dockerfile.i686 | 2 +- dockerfiles/Dockerfile.x86_64 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dockerfiles/Dockerfile.aarch64 b/dockerfiles/Dockerfile.aarch64 index e6425589c..2ea50d343 100644 --- a/dockerfiles/Dockerfile.aarch64 +++ b/dockerfiles/Dockerfile.aarch64 @@ -1,6 +1,6 @@ FROM quay.io/pypa/manylinux2014_aarch64 -RUN manylinux-install-clang -v 23.1.3.0 +RUN manylinux-install-clang -v 23.1.5.0 ENV RUSTUP_HOME=/usr/local/rustup \ CARGO_HOME=/usr/local/cargo \ diff --git a/dockerfiles/Dockerfile.i686 b/dockerfiles/Dockerfile.i686 index 651a35d47..580d34693 100644 --- a/dockerfiles/Dockerfile.i686 +++ b/dockerfiles/Dockerfile.i686 @@ -2,7 +2,7 @@ FROM quay.io/pypa/manylinux2014_x86_64 RUN yum install glibc-devel.i686 libgcc.i686 -y -RUN manylinux-install-clang -v 23.1.3.0 +RUN manylinux-install-clang -v 23.1.5.0 ENV RUSTUP_HOME=/usr/local/rustup \ CARGO_HOME=/usr/local/cargo \ diff --git a/dockerfiles/Dockerfile.x86_64 b/dockerfiles/Dockerfile.x86_64 index 001e76ba6..d30c6d0ad 100644 --- a/dockerfiles/Dockerfile.x86_64 +++ b/dockerfiles/Dockerfile.x86_64 @@ -1,6 +1,6 @@ FROM quay.io/pypa/manylinux2014_x86_64 -RUN manylinux-install-clang -v 23.1.3.0 +RUN manylinux-install-clang -v 23.1.5.0 ENV RUSTUP_HOME=/usr/local/rustup \ CARGO_HOME=/usr/local/cargo \ From 0f46a8e562bb5e81c0a3b49c464bb037c6f9499f Mon Sep 17 00:00:00 2001 From: Manuel Quarneti Date: Wed, 11 Nov 2026 01:05:51 +0100 Subject: [PATCH 08/12] fix ci --- Justfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Justfile b/Justfile index daa754523..40c0f7472 100644 --- a/Justfile +++ b/Justfile @@ -49,7 +49,7 @@ package-linux-i686: (_package-linux "i686") # ------- [windows] -_build-windows target arch variant: +_build-windows target arch: cargo build-dist-windows --target {{target}} New-Item -ItemType Directory -Force -Path out | Out-Null Copy-Item -Path target\{{target}}\release\TinyWiiBackupManager.exe -Destination out\TinyWiiBackupManager-windows-{{arch}}.exe From 75212b24742fb7f1d51a0950368233077abd4439 Mon Sep 17 00:00:00 2001 From: Manuel Quarneti Date: Wed, 11 Nov 2026 01:11:17 +0100 Subject: [PATCH 09/12] doc: update changelog --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 59af5d614..40949ef1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,8 +22,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Removed -- 🔥 Since the builds don't seem to work anymore on Windows XP for some reason, I'm raising the minimum supported windows version to Windows 7. \ - I probably won't work on this by myself (as it's becoming increasingly difficult to test for me), but PRs are welcome +- 🔥 Since the builds don't seem to work anymore on Windows XP for some reason, I'm raising again the minimum supported windows version to Windows 7. \ + I probably won't bother working on this by myself (as it's becoming increasingly difficult to test for me), but PRs are welcome ## [v6.1.11] - 2026-11-03 From 53655fe88040a1332346ed7826a045316c0bc69f Mon Sep 17 00:00:00 2001 From: Manuel Quarneti Date: Wed, 11 Nov 2026 01:15:25 +0100 Subject: [PATCH 10/12] fix ci --- build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.rs b/build.rs index 1d9061ca0..4e56f6985 100644 --- a/build.rs +++ b/build.rs @@ -89,7 +89,7 @@ fn main() { && target_env == "msvc" && (target_arch == "x86_64" || target_arch == "x86") { - let yy_thunks_dir = out_dir.join("YY-Thunks-Objs"); + let yy_thunks_dir = out_dir.join("YY-Thunks-Lib"); if !yy_thunks_dir.exists() { let resp = minreq::get("https://github.com/Chuyu-Team/YY-Thunks/releases/download/v1.2.4-Beta.1/YY-Thunks-Lib.zip") From 3b07fdeb424e540b6af47c0dfa3fe0eb4b847e19 Mon Sep 17 00:00:00 2001 From: Manuel Quarneti Date: Wed, 11 Nov 2026 01:21:42 +0100 Subject: [PATCH 11/12] fix compiler warning --- src/ui/theme.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/ui/theme.rs b/src/ui/theme.rs index 814151c92..904d8fa5b 100644 --- a/src/ui/theme.rs +++ b/src/ui/theme.rs @@ -51,14 +51,12 @@ fn is_dark() -> bool { #[cfg(target_os = "windows")] fn is_dark() -> bool { - use winsafe::{self as w, co, prelude::*}; - - match w::HKEY::CURRENT_USER.RegGetValue( + match winsafe::HKEY::CURRENT_USER.RegGetValue( Some("Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize"), Some("AppsUseLightTheme"), - co::RRF::RT_REG_DWORD, + winsafe::co::RRF::RT_REG_DWORD, ) { - Ok(w::RegistryValue::Dword(val)) => val == 0, + Ok(winsafe::RegistryValue::Dword(val)) => val == 0, _ => false, } } From 0d684e171bc580289656c128efff3e890fc3ba59 Mon Sep 17 00:00:00 2001 From: Manuel Quarneti Date: Wed, 11 Nov 2026 01:25:08 +0100 Subject: [PATCH 12/12] fix ci --- build.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.rs b/build.rs index 4e56f6985..6640dd2ec 100644 --- a/build.rs +++ b/build.rs @@ -80,7 +80,7 @@ fn main() { .join(arch); assert!(lib_path.exists()); - println!("cargo:rustc-link-arg=/LIBPATH={}", lib_path.display()); + println!("cargo:rustc-link-arg=/LIBPATH:{}", lib_path.display()); println!("cargo:rustc-link-search=native={}", lib_path.display()); } @@ -115,7 +115,7 @@ fn main() { let lib_path = yy_thunks_dir.join("Lib").join("6.1.7600.0").join(arch); assert!(lib_path.exists()); - println!("cargo:rustc-link-arg=/LIBPATH={}", lib_path.display()); + println!("cargo:rustc-link-arg=/LIBPATH:{}", lib_path.display()); println!("cargo:rustc-link-search=native={}", lib_path.display()); println!("cargo:rustc-link-arg=/SUBSYSTEM:WINDOWS,6.01"); println!("cargo:rustc-link-lib=ole32");