Skip to content

Commit 1861d05

Browse files
committed
windows: Statically link vcruntime DLL
Otherwise it won't run on some freshly installed machines. Windows complains that `vcruntime140.dll` is missing. Users would have to install the MSVC C++ Redistributable package. This is the same fix as in FrameworkComputer/qmk_hid. The measurements of that binary are: On a local build of `cargo clean; cargo build --release`: Size of .exe before: 857 KB Size of .exe after: 878 KB Note: Only affects release builds! I think that's because the debug version of this DLL isn't redistributable. Signed-off-by: Daniel Schaefer <[email protected]>
1 parent 818691b commit 1861d05

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

inputmodule-control/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,6 @@ rand = "0.8.5"
2020
vis-core = { git = 'https://github.com/Rahix/visualizer2.git', rev = '1fe908012a9c156695921f3b6bb47178e1332b92', optional = true }
2121
[features]
2222
audio-visualizations = ["vis-core"]
23+
24+
[build-dependencies]
25+
static_vcruntime = "2.0"

inputmodule-control/build.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn main() {
2+
static_vcruntime::metabuild();
3+
}

0 commit comments

Comments
 (0)