diff --git a/Assets/dll/chd_capi.dll b/Assets/dll/chd_capi.dll index d83b00b8381..f0f9692f96d 100644 Binary files a/Assets/dll/chd_capi.dll and b/Assets/dll/chd_capi.dll differ diff --git a/Assets/dll/waterboxhost.dll b/Assets/dll/waterboxhost.dll index 73f74ee588c..92083586f58 100644 Binary files a/Assets/dll/waterboxhost.dll and b/Assets/dll/waterboxhost.dll differ diff --git a/ExternalProjects/libchd-rs-capi/build_release.bat b/ExternalProjects/libchd-rs-capi/build_release.bat index 66864f45293..05d411177ec 100644 --- a/ExternalProjects/libchd-rs-capi/build_release.bat +++ b/ExternalProjects/libchd-rs-capi/build_release.bat @@ -1,3 +1,10 @@ -@cargo b --release -@copy target\release\chd_capi.dll ..\..\Assets\dll -@copy target\release\chd_capi.dll ..\..\output\dll +:: To maintain Win7/8/8.1 compat for release builds, we must compile using the *-win7-windows-msvc target +:: This is a "Tier 3" target, which does not have prebuilt binaries (e.g. for standard library) available in rustup +:: The simplest way to use this target is to use the build-std argument, which builds the standard library +:: This requires the user to install the nightly toolchain (build-std is not in stable), then add the rust-src component +:: rustup toolchain install nightly-x86_64-pc-windows-msvc +:: rustup component add rust-src --toolchain nightly-x86_64-pc-windows-msvc +:: These don't need to be done for developer only builds (e.g. debug), only release builds need this +@cargo +nightly-x86_64-pc-windows-msvc b --release -Z build-std --target x86_64-win7-windows-msvc +@copy target\x86_64-win7-windows-msvc\release\chd_capi.dll ..\..\Assets\dll +@copy target\x86_64-win7-windows-msvc\release\chd_capi.dll ..\..\output\dll diff --git a/waterbox/waterboxhost/README.md b/waterbox/waterboxhost/README.md index 0d4edbdef96..e904e6be0cf 100644 --- a/waterbox/waterboxhost/README.md +++ b/waterbox/waterboxhost/README.md @@ -35,7 +35,7 @@ Some more advanced features: ## Building -Standard rust build infrastructure is used and can be installed with `rustup`. At the moment, we're using the `nightly-x86_64-pc-windows-gnu` +Standard rust build infrastructure is used and can be installed with `rustup`. At the moment, we're using the `nightly-x86_64-pc-windows-msvc` chain on Windows, and the `nightly-x86_64-unknown-linux-gnu` chain on linux. I don't know much about crosspiling, but presumably that will work. The linux chain works fine in WSL, anyway. When used in a Windows environment with the right default chain, `build-release.bat` will build waterboxhost.dll and copy it to the right place. When used in a Linux (or WSL) environment with the right default chain, `build-release.sh` diff --git a/waterbox/waterboxhost/build-release.bat b/waterbox/waterboxhost/build-release.bat index fa1e00f0b96..87dc8ddf5fe 100644 --- a/waterbox/waterboxhost/build-release.bat +++ b/waterbox/waterboxhost/build-release.bat @@ -1,3 +1,10 @@ -@cargo b --release -@copy target\release\waterboxhost.dll ..\..\Assets\dll -@copy target\release\waterboxhost.dll ..\..\output\dll +:: To maintain Win7/8/8.1 compat for release builds, we must compile using the *-win7-windows-msvc target +:: This is a "Tier 3" target, which does not have prebuilt binaries (e.g. for standard library) available in rustup +:: The simplest way to use this target is to use the build-std argument, which builds the standard library +:: This requires the user to install the nightly toolchain (build-std is not in stable), then add the rust-src component +:: rustup toolchain install nightly-x86_64-pc-windows-msvc +:: rustup component add rust-src --toolchain nightly-x86_64-pc-windows-msvc +:: These don't need to be done for developer only builds (e.g. debug and/or no-dirty-detection), only release builds need this +@cargo +nightly-x86_64-pc-windows-msvc b --release -Z build-std --target x86_64-win7-windows-msvc +@copy target\x86_64-win7-windows-msvc\release\waterboxhost.dll ..\..\Assets\dll +@copy target\x86_64-win7-windows-msvc\release\waterboxhost.dll ..\..\output\dll