mirror of
https://github.com/Stremio/stremio-shell-ng.git
synced 2026-01-11 18:30:30 +00:00
Check for architecture specific updates
Some checks failed
Continuous integration / test (push) Has been cancelled
Some checks failed
Continuous integration / test (push) Has been cancelled
This commit is contained in:
parent
522a4d6a66
commit
be55565ee4
2 changed files with 5 additions and 3 deletions
7
build.rs
7
build.rs
|
|
@ -35,11 +35,12 @@ fn main() {
|
|||
|
||||
//extract libmpv-2
|
||||
let target = std::env::var("TARGET").unwrap();
|
||||
let (archive, flags) = match target.as_str() {
|
||||
"x86_64-pc-windows-msvc" => ("libmpv-2_x64.zip", "/LIBPATH:.\\mpv-x64"),
|
||||
"aarch64-pc-windows-msvc" => ("libmpv-2_arm64.zip", "/LIBPATH:.\\mpv-arm64"),
|
||||
let (arch, archive, flags) = match target.as_str() {
|
||||
"x86_64-pc-windows-msvc" => ("x64", "libmpv-2_x64.zip", "/LIBPATH:.\\mpv-x64"),
|
||||
"aarch64-pc-windows-msvc" => ("arm64", "libmpv-2_arm64.zip", "/LIBPATH:.\\mpv-arm64"),
|
||||
_ => panic!("Unsupported target {}", target),
|
||||
};
|
||||
println!("cargo:rustc-env=ARCH={}", arch);
|
||||
println!("cargo:rustc-link-arg={}", flags);
|
||||
println!("cargo:rerun-if-changed={}", archive);
|
||||
{
|
||||
|
|
|
|||
|
|
@ -194,6 +194,7 @@ impl MainWindow {
|
|||
let mut rng = rand::thread_rng();
|
||||
let index = rng.gen_range(0..UPDATE_ENDPOINT.len());
|
||||
let mut url = Url::parse(UPDATE_ENDPOINT[index]).unwrap();
|
||||
url.query_pairs_mut().append_pair("arch", env!("ARCH"));
|
||||
if release_candidate {
|
||||
url.query_pairs_mut().append_pair("rc", "true");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue