mirror of
https://github.com/Stremio/stremio-shell-ng.git
synced 2026-01-11 22:40:32 +00:00
Merge v5.0.15: upgrade with BorderBreaker preserved
This commit is contained in:
commit
cb3b0f4547
18 changed files with 13304 additions and 4259 deletions
4
.cargo/config.toml
Normal file
4
.cargo/config.toml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
[target.x86_64-pc-windows-msvc]
|
||||
rustflags = ["-C", "link-args=/LIBPATH:.\\mpv-x64"]
|
||||
[target.aarch64-pc-windows-msvc]
|
||||
rustflags = ["-C", "link-args=/LIBPATH:.\\mpv-arm64"]
|
||||
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -1598,7 +1598,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "stremio-shell-ng"
|
||||
version = "5.0.13"
|
||||
version = "5.0.15"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bitflags 2.4.2",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "stremio-shell-ng"
|
||||
version = "5.0.13"
|
||||
version = "5.0.15"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
|
|
|
|||
14
build.rs
14
build.rs
|
|
@ -1,5 +1,5 @@
|
|||
use chrono::{Datelike, Local};
|
||||
use std::{env, io::Cursor, path::PathBuf};
|
||||
use std::{env, fs, io::Cursor, path::PathBuf};
|
||||
|
||||
extern crate winres;
|
||||
fn main() {
|
||||
|
|
@ -34,9 +34,17 @@ fn main() {
|
|||
res.compile().unwrap();
|
||||
|
||||
//extract libmpv-2
|
||||
println!("cargo:rerun-if-changed=libmpv-2.zip");
|
||||
let target = std::env::var("TARGET").unwrap();
|
||||
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);
|
||||
{
|
||||
let archive: Vec<u8> = include_bytes!("libmpv-2.zip").to_vec();
|
||||
let archive = fs::read(archive).unwrap();
|
||||
let target_dir = PathBuf::from(".");
|
||||
zip_extract::extract(Cursor::new(archive), &target_dir, true).ok();
|
||||
}
|
||||
|
|
|
|||
BIN
libmpv-2_arm64.zip
Normal file
BIN
libmpv-2_arm64.zip
Normal file
Binary file not shown.
Binary file not shown.
BIN
mpv-arm64/libmpv-2.def
Normal file
BIN
mpv-arm64/libmpv-2.def
Normal file
Binary file not shown.
BIN
mpv-arm64/libmpv-2.dll
Normal file
BIN
mpv-arm64/libmpv-2.dll
Normal file
Binary file not shown.
BIN
mpv-arm64/libmpv-2.exp
Normal file
BIN
mpv-arm64/libmpv-2.exp
Normal file
Binary file not shown.
BIN
mpv-arm64/mpv.lib
Normal file
BIN
mpv-arm64/mpv.lib
Normal file
Binary file not shown.
|
|
@ -1,3 +1,3 @@
|
|||
[toolchain]
|
||||
channel = "stable"
|
||||
targets = ["x86_64-pc-windows-msvc"]
|
||||
targets = ["aarch64-pc-windows-msvc", "x86_64-pc-windows-msvc"]
|
||||
|
|
|
|||
17529
server.js
17529
server.js
File diff suppressed because one or more lines are too long
|
|
@ -22,6 +22,8 @@ struct Opt {
|
|||
help = "Start the app only in system tray and keep the window hidden"
|
||||
)]
|
||||
start_hidden: bool,
|
||||
#[clap(long, help = "Do not show the splash image")]
|
||||
no_splash: bool,
|
||||
#[clap(long, help = "Enable dev tools when pressing F12")]
|
||||
dev_tools: bool,
|
||||
#[clap(long, help = "Disable the server and load the WebUI from localhost")]
|
||||
|
|
@ -92,6 +94,7 @@ fn main() {
|
|||
command,
|
||||
commands_path: Some(commands_path),
|
||||
webui_url,
|
||||
no_splash: opt.no_splash,
|
||||
dev_tools: opt.development || opt.dev_tools,
|
||||
start_hidden: opt.start_hidden,
|
||||
autoupdater_endpoint: opt.autoupdater_endpoint,
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ pub struct MainWindow {
|
|||
pub command: String,
|
||||
pub commands_path: Option<String>,
|
||||
pub webui_url: String,
|
||||
pub no_splash: bool,
|
||||
pub dev_tools: bool,
|
||||
pub start_hidden: bool,
|
||||
pub autoupdater_endpoint: Option<Url>,
|
||||
|
|
@ -141,6 +142,10 @@ impl MainWindow {
|
|||
|
||||
self.window.set_visible(!self.start_hidden);
|
||||
self.tray.tray_show_hide.set_checked(!self.start_hidden);
|
||||
if self.no_splash {
|
||||
self.splash_screen.hide();
|
||||
}
|
||||
|
||||
let player_channel = self.player.channel.borrow();
|
||||
let (player_tx, player_rx) = player_channel
|
||||
.as_ref()
|
||||
|
|
@ -199,6 +204,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");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -232,6 +232,7 @@ impl PartialUi for WebView {
|
|||
}
|
||||
}, true);
|
||||
}catch(e){}
|
||||
window.addEventListener("load", function() {if(initShellComm) try { initShellComm() } catch(e) {}}, false)
|
||||
"##, |_| Ok(())).expect("Cannot add script to webview");
|
||||
Ok(())
|
||||
}).expect("Cannot add content loading");
|
||||
|
|
|
|||
Loading…
Reference in a new issue