Make it build on Windows

Cribbed Windows script from
https://github.com/nlowe/mousiki/commit/51bd789ec65fe87556ef3181cb388c26c3b3eb00
This commit is contained in:
George Hilliard committed 2020-04-29 11:48:03 -05:00
1 parent 9f9b8cd222
commit d3641f3ce0
3 files changed
+25 -1

No files matched your search

+2
View File
@@ -0,0 +1,2 @@
[target.x86_64-pc-windows-msvc]
rustflags = ["-C", "target-feature=+crt-static"]
+9 -1
View File
@@ -24,7 +24,15 @@ jobs:
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- run: choco install gstreamer
- name: Install Gstreamer
run: |
choco install -y --no-progress gstreamer
curl -fsSL "https://gstreamer.freedesktop.org/data/pkg/windows/1.16.2/gstreamer-1.0-devel-msvc-x86_64-1.16.2.msi" -o gstreamer-1.0-devel.msi
echo "Installing gstreamer-1.0-devel"
msiexec /i gstreamer-1.0-devel.msi /qn /norestart
echo "Updating Environment"
echo "::add-path::C:\gstreamer\1.0\x86_64\bin"
echo "::set-env name=GSTREAMER_1_0_ROOT_X86_64::C:\gstreamer\1.0\x86_64\"
- uses: actions-rs/cargo@v1
with:
command: build
+14
View File
@@ -0,0 +1,14 @@
#[cfg(windows)]
fn main() {
use std::env;
let gstreamer_dir = env::var_os("GSTREAMER_1_0_ROOT_X86_64")
.and_then(|x| x.into_string().ok())
.unwrap_or_else(|| r#"C:\gstreamer\1.0\x86_64\"#.to_string());
println!(r"cargo:rustc-link-search=native={}\lib", gstreamer_dir);
}
#[cfg(not(windows))]
fn main() {
}