From 32e7d81621c14c0304370b316857709de3aebd4e Mon Sep 17 00:00:00 2001 From: Caelan Sayler Date: Mon, 10 Jun 2024 21:37:32 +0100 Subject: [PATCH] Compile rust with windows 7 compatible toolchain --- .github/workflows/build.yml | 6 +++++- src/Rust/Cargo.toml | 2 +- src/Rust/build.rs | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f63377a5..c7a92d42 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,9 +46,13 @@ jobs: with: key: "rust-build-windows" workspaces: "src/Rust -> target" + - name: Install Windows7 Rust Toolchain + run: | + rustup toolchain install 1.75.0-x86_64-pc-windows-msvc + rustup target add i686-pc-windows-msvc --toolchain 1.75.0-x86_64-pc-windows-msvc - name: Build Rust working-directory: src/Rust - run: cargo bw86 --release + run: cargo +1.75.0-x86_64-pc-windows-msvc build --target i686-pc-windows-msvc --features windows --release - name: Upload Rust Build Artifacts uses: actions/upload-artifact@v4 with: diff --git a/src/Rust/Cargo.toml b/src/Rust/Cargo.toml index 05274d3d..2ba56f36 100644 --- a/src/Rust/Cargo.toml +++ b/src/Rust/Cargo.toml @@ -39,7 +39,7 @@ lto = true # link-time optimization debug = false # disable debug info debug-assertions = false # disable debug assertions overflow-checks = false # disable overflow checks -# panic = "abort" # abort on panic +panic = "abort" # abort on panic incremental = false # disable incremental compilation codegen-units = 1 # compile all code into a single unit rpath = false # disable rpath diff --git a/src/Rust/build.rs b/src/Rust/build.rs index 6dd4dcba..dd1c538a 100644 --- a/src/Rust/build.rs +++ b/src/Rust/build.rs @@ -30,7 +30,7 @@ fn main() { .set("ProductName", "Velopack") .set("ProductVersion", version) .set("FileDescription", &desc) - .set("LegalCopyright", "Caelan Sayler (c) 2023, Velopack (c) 2024") + .set("LegalCopyright", "Caelan Sayler (c) 2023, Velopack Ltd. (c) 2024") .compile() .unwrap(); }