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..c2e2b7659 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_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" 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/.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" diff --git a/CHANGELOG.md b/CHANGELOG.md index 395372b95..40949ef1b 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 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 ### Fixed 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..40c0f7472 100644 --- a/Justfile +++ b/Justfile @@ -49,17 +49,17 @@ package-linux-i686: (_package-linux "i686") # ------- [windows] -_build-windows target arch variant: - cargo build-dist-windows-{{variant}} --target {{target}} +_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 [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/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/build.rs b/build.rs index 78d1977f4..6640dd2ec 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" { - let yy_thunks_dir = out_dir.join("YY-Thunks-Objs"); + // 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-Lib"); 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/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 \ 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

🎮 Game Management