Compare commits
10 commits
0603733f2b
...
1797ac466d
Author | SHA1 | Date | |
---|---|---|---|
|
1797ac466d | ||
|
97e34f7bb5 | ||
|
b173dd0202 | ||
|
7911abbdf9 | ||
|
017d0d164f | ||
|
365e907a4d | ||
|
a17a082434 | ||
|
fde7b26347 | ||
|
0044bf02fe | ||
|
2d26bec891 |
14 changed files with 43 additions and 27 deletions
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "anime-launcher-sdk"
|
name = "anime-launcher-sdk"
|
||||||
version = "1.16.10"
|
version = "1.17.3"
|
||||||
authors = ["Nikita Podvirnyi <krypt0nn@vk.com>"]
|
authors = ["Nikita Podvirnyi <krypt0nn@vk.com>"]
|
||||||
license = "GPL-3.0"
|
license = "GPL-3.0"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
@ -9,7 +9,7 @@ edition = "2021"
|
||||||
|
|
||||||
[dependencies.anime-game-core]
|
[dependencies.anime-game-core]
|
||||||
git = "https://github.com/an-anime-team/anime-game-core"
|
git = "https://github.com/an-anime-team/anime-game-core"
|
||||||
tag = "1.21.3"
|
tag = "1.22.2"
|
||||||
features = ["all"]
|
features = ["all"]
|
||||||
|
|
||||||
# path = "../anime-game-core" # ! for dev purposes only
|
# path = "../anime-game-core" # ! for dev purposes only
|
||||||
|
@ -21,7 +21,7 @@ tracing = "0.1"
|
||||||
serde = { version = "1.0", features = ["derive"], optional = true }
|
serde = { version = "1.0", features = ["derive"], optional = true }
|
||||||
serde_json = { version = "1.0", optional = true }
|
serde_json = { version = "1.0", optional = true }
|
||||||
|
|
||||||
cached = { version = "0.52", features = ["proc_macro"] }
|
cached = { version = "0.53", features = ["proc_macro"] }
|
||||||
enum-ordinalize = { version = "4.3", optional = true }
|
enum-ordinalize = { version = "4.3", optional = true }
|
||||||
|
|
||||||
wincompatlib = { version = "0.7.4", features = ["all"], optional = true }
|
wincompatlib = { version = "0.7.4", features = ["all"], optional = true }
|
||||||
|
|
|
@ -26,8 +26,6 @@ pub mod components;
|
||||||
pub mod prelude {
|
pub mod prelude {
|
||||||
pub use super::launcher::prelude::*;
|
pub use super::launcher::prelude::*;
|
||||||
pub use super::game::prelude::*;
|
pub use super::game::prelude::*;
|
||||||
|
|
||||||
pub use super::launcher::prelude::*;
|
|
||||||
pub use super::game::*;
|
pub use super::game::*;
|
||||||
|
|
||||||
#[cfg(feature = "components")]
|
#[cfg(feature = "components")]
|
||||||
|
|
|
@ -48,7 +48,24 @@ impl FpsUnlocker {
|
||||||
}
|
}
|
||||||
|
|
||||||
match downloader.download(dir.join("fpsunlock.exe"), |_, _| {}) {
|
match downloader.download(dir.join("fpsunlock.exe"), |_, _| {}) {
|
||||||
Ok(_) => Ok(Self { dir }),
|
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())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
tracing::error!("Downloading failed: {err}");
|
tracing::error!("Downloading failed: {err}");
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ impl ConfigExt for Config {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn get() -> anyhow::Result<Self::Schema> {
|
fn get() -> anyhow::Result<Self::Schema> {
|
||||||
unsafe {
|
unsafe {
|
||||||
match &CONFIG {
|
match CONFIG.as_ref() {
|
||||||
Some(config) => Ok(config.clone()),
|
Some(config) => Ok(config.clone()),
|
||||||
None => Self::get_raw()
|
None => Self::get_raw()
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,8 +27,6 @@ pub mod components;
|
||||||
pub mod prelude {
|
pub mod prelude {
|
||||||
pub use super::launcher::prelude::*;
|
pub use super::launcher::prelude::*;
|
||||||
pub use super::game::prelude::*;
|
pub use super::game::prelude::*;
|
||||||
|
|
||||||
pub use super::launcher::prelude::*;
|
|
||||||
pub use super::game::*;
|
pub use super::game::*;
|
||||||
pub use super::patch::*;
|
pub use super::patch::*;
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,7 @@ use crate::honkai::consts::launcher_dir;
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||||
pub struct Patch {
|
pub struct Patch {
|
||||||
pub path: PathBuf,
|
pub path: PathBuf
|
||||||
pub apply_mfplat: bool
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for Patch {
|
impl Default for Patch {
|
||||||
|
@ -17,12 +16,7 @@ impl Default for Patch {
|
||||||
let launcher_dir = launcher_dir().expect("Failed to get launcher dir");
|
let launcher_dir = launcher_dir().expect("Failed to get launcher dir");
|
||||||
|
|
||||||
Self {
|
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
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,11 +29,6 @@ impl From<&JsonValue> for Patch {
|
||||||
path: match value.get("path").and_then(|path| path.as_str()).map(PathBuf::from) {
|
path: match value.get("path").and_then(|path| path.as_str()).map(PathBuf::from) {
|
||||||
Some(path) => path,
|
Some(path) => path,
|
||||||
None => default.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
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
use std::io::{Read, Write};
|
use std::io::{Read, Write};
|
||||||
use std::process::{Command, Stdio};
|
use std::process::{Command, Stdio};
|
||||||
use std::path::PathBuf;
|
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;
|
use anime_game_core::honkai::telemetry;
|
||||||
|
|
||||||
|
|
|
@ -26,8 +26,6 @@ pub mod components;
|
||||||
pub mod prelude {
|
pub mod prelude {
|
||||||
pub use super::launcher::prelude::*;
|
pub use super::launcher::prelude::*;
|
||||||
pub use super::game::prelude::*;
|
pub use super::game::prelude::*;
|
||||||
|
|
||||||
pub use super::launcher::prelude::*;
|
|
||||||
pub use super::game::*;
|
pub use super::game::*;
|
||||||
|
|
||||||
#[cfg(feature = "components")]
|
#[cfg(feature = "components")]
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
|
use std::io::{Read, Write};
|
||||||
use std::process::{Command, Stdio};
|
use std::process::{Command, Stdio};
|
||||||
use std::path::PathBuf;
|
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;
|
use anime_game_core::pgr::telemetry;
|
||||||
|
|
||||||
|
|
|
@ -27,8 +27,6 @@ pub mod components;
|
||||||
pub mod prelude {
|
pub mod prelude {
|
||||||
pub use super::launcher::prelude::*;
|
pub use super::launcher::prelude::*;
|
||||||
pub use super::game::prelude::*;
|
pub use super::game::prelude::*;
|
||||||
|
|
||||||
pub use super::launcher::prelude::*;
|
|
||||||
pub use super::game::*;
|
pub use super::game::*;
|
||||||
pub use super::patch::*;
|
pub use super::patch::*;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
|
use std::io::{Read, Write};
|
||||||
use std::process::{Command, Stdio};
|
use std::process::{Command, Stdio};
|
||||||
use std::path::PathBuf;
|
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;
|
use anime_game_core::star_rail::telemetry;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
|
use std::io::{Read, Write};
|
||||||
use std::process::{Command, Stdio};
|
use std::process::{Command, Stdio};
|
||||||
use std::path::PathBuf;
|
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;
|
use anime_game_core::wuwa::telemetry;
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,6 @@ pub mod components;
|
||||||
pub mod prelude {
|
pub mod prelude {
|
||||||
pub use super::launcher::prelude::*;
|
pub use super::launcher::prelude::*;
|
||||||
pub use super::game::prelude::*;
|
pub use super::game::prelude::*;
|
||||||
|
|
||||||
pub use super::game::*;
|
pub use super::game::*;
|
||||||
|
|
||||||
#[cfg(feature = "components")]
|
#[cfg(feature = "components")]
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
|
use std::io::{Read, Write};
|
||||||
use std::process::{Command, Stdio};
|
use std::process::{Command, Stdio};
|
||||||
use std::path::PathBuf;
|
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::prelude::*;
|
||||||
use anime_game_core::zzz::telemetry;
|
use anime_game_core::zzz::telemetry;
|
||||||
|
|
Loading…
Reference in a new issue