Compare commits

..

No commits in common. "1797ac466d1c8815e9ceae528043de66d033368c" and "0603733f2bd7efb38255e1d24f4a33e7137c88f3" have entirely different histories.

14 changed files with 27 additions and 43 deletions

View file

@ -1,6 +1,6 @@
[package]
name = "anime-launcher-sdk"
version = "1.17.3"
version = "1.16.10"
authors = ["Nikita Podvirnyi <krypt0nn@vk.com>"]
license = "GPL-3.0"
readme = "README.md"
@ -9,7 +9,7 @@ edition = "2021"
[dependencies.anime-game-core]
git = "https://github.com/an-anime-team/anime-game-core"
tag = "1.22.2"
tag = "1.21.3"
features = ["all"]
# path = "../anime-game-core" # ! for dev purposes only
@ -21,7 +21,7 @@ tracing = "0.1"
serde = { version = "1.0", features = ["derive"], optional = true }
serde_json = { version = "1.0", optional = true }
cached = { version = "0.53", features = ["proc_macro"] }
cached = { version = "0.52", features = ["proc_macro"] }
enum-ordinalize = { version = "4.3", optional = true }
wincompatlib = { version = "0.7.4", features = ["all"], optional = true }

View file

@ -26,6 +26,8 @@ pub mod components;
pub mod prelude {
pub use super::launcher::prelude::*;
pub use super::game::prelude::*;
pub use super::launcher::prelude::*;
pub use super::game::*;
#[cfg(feature = "components")]

View file

@ -48,24 +48,7 @@ impl FpsUnlocker {
}
match downloader.download(dir.join("fpsunlock.exe"), |_, _| {}) {
Ok(_) => {
match Self::from_dir(dir) {
Ok(Some(me)) => Ok(me),
Ok(None) => {
tracing::error!("Invalid hash");
anyhow::bail!("Downloading failed: invalid fps unlocker hash");
}
Err(err) => {
tracing::error!("Downloading failed: {err}");
Err(err.into())
}
}
}
Ok(_) => Ok(Self { dir }),
Err(err) => {
tracing::error!("Downloading failed: {err}");

View file

@ -42,7 +42,7 @@ impl ConfigExt for Config {
#[inline]
fn get() -> anyhow::Result<Self::Schema> {
unsafe {
match CONFIG.as_ref() {
match &CONFIG {
Some(config) => Ok(config.clone()),
None => Self::get_raw()
}

View file

@ -27,6 +27,8 @@ pub mod components;
pub mod prelude {
pub use super::launcher::prelude::*;
pub use super::game::prelude::*;
pub use super::launcher::prelude::*;
pub use super::game::*;
pub use super::patch::*;

View file

@ -7,7 +7,8 @@ use crate::honkai::consts::launcher_dir;
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct Patch {
pub path: PathBuf
pub path: PathBuf,
pub apply_mfplat: bool
}
impl Default for Patch {
@ -16,7 +17,12 @@ impl Default for Patch {
let launcher_dir = launcher_dir().expect("Failed to get launcher dir");
Self {
path: launcher_dir.join("patch")
path: launcher_dir.join("patch"),
// Seems to not be needed with wine 8+
// which is recommended by default, so will work
// for most of users
apply_mfplat: false
}
}
}
@ -29,6 +35,11 @@ impl From<&JsonValue> for Patch {
path: match value.get("path").and_then(|path| path.as_str()).map(PathBuf::from) {
Some(path) => path,
None => default.path
},
apply_mfplat: match value.get("apply_mfplat") {
Some(value) => value.as_bool().unwrap_or(default.apply_mfplat),
None => default.apply_mfplat
}
}
}

View file

@ -1,9 +1,6 @@
use std::io::{Read, Write};
use std::process::{Command, Stdio};
use std::path::PathBuf;
use std::fs::File;
use std::sync::{Arc, Mutex};
use std::sync::atomic::{AtomicUsize, Ordering};
use anime_game_core::honkai::telemetry;

View file

@ -26,6 +26,8 @@ pub mod components;
pub mod prelude {
pub use super::launcher::prelude::*;
pub use super::game::prelude::*;
pub use super::launcher::prelude::*;
pub use super::game::*;
#[cfg(feature = "components")]

View file

@ -1,9 +1,5 @@
use std::io::{Read, Write};
use std::process::{Command, Stdio};
use std::path::PathBuf;
use std::fs::File;
use std::sync::{Arc, Mutex};
use std::sync::atomic::{AtomicUsize, Ordering};
use anime_game_core::pgr::telemetry;

View file

@ -27,6 +27,8 @@ pub mod components;
pub mod prelude {
pub use super::launcher::prelude::*;
pub use super::game::prelude::*;
pub use super::launcher::prelude::*;
pub use super::game::*;
pub use super::patch::*;

View file

@ -1,9 +1,5 @@
use std::io::{Read, Write};
use std::process::{Command, Stdio};
use std::path::PathBuf;
use std::fs::File;
use std::sync::{Arc, Mutex};
use std::sync::atomic::{AtomicUsize, Ordering};
use anime_game_core::star_rail::telemetry;

View file

@ -1,9 +1,5 @@
use std::io::{Read, Write};
use std::process::{Command, Stdio};
use std::path::PathBuf;
use std::fs::File;
use std::sync::{Arc, Mutex};
use std::sync::atomic::{AtomicUsize, Ordering};
use anime_game_core::wuwa::telemetry;

View file

@ -26,6 +26,7 @@ pub mod components;
pub mod prelude {
pub use super::launcher::prelude::*;
pub use super::game::prelude::*;
pub use super::game::*;
#[cfg(feature = "components")]

View file

@ -1,9 +1,5 @@
use std::io::{Read, Write};
use std::process::{Command, Stdio};
use std::path::PathBuf;
use std::fs::File;
use std::sync::{Arc, Mutex};
use std::sync::atomic::{AtomicUsize, Ordering};
use anime_game_core::prelude::*;
use anime_game_core::zzz::telemetry;