Depot API & executor launch (#173)
* feat: depot api downloads * feat: frontend fixes and experimental webview store * feat: sync downloader * feat: cleanup and fixes * feat: encrypted database and fixed resuming * feat: launch option selector * fix: autostart when no options * fix: clippy * fix: clippy x2 * feat: executor launch * feat: executor launch * feat: not installed error handling * feat: better offline handling * feat: dependency popup * fix: cancelation and resuming issues * feat: dedup by platform * feat: new ui for additional components and fix dl manager clog * feat: auto-queue dependencies * feat: depot scanning and ranking * feat: new library fetching stack * In-app store page (Windows + macOS) (#176) * feat: async store loading * feat: fix overscroll behaviour * fix: query params in server protocol * fix: clippy
This commit is contained in:
@@ -1,17 +1,18 @@
|
||||
use std::{fmt::Display, io::Error};
|
||||
use std::{fmt::Display, io::{self, Error}, sync::Arc};
|
||||
|
||||
use serde_with::SerializeDisplay;
|
||||
|
||||
#[derive(SerializeDisplay)]
|
||||
#[derive(SerializeDisplay, Clone)]
|
||||
pub enum ProcessError {
|
||||
NotInstalled,
|
||||
AlreadyRunning,
|
||||
InvalidID,
|
||||
InvalidVersion,
|
||||
IOError(Error),
|
||||
RequiredDependency(String, String),
|
||||
IOError(Arc<Error>),
|
||||
FormatError(String), // String errors supremacy
|
||||
InvalidPlatform,
|
||||
OpenerError(tauri_plugin_opener::Error),
|
||||
OpenerError(Arc<tauri_plugin_opener::Error>),
|
||||
InvalidArguments(String),
|
||||
FailedLaunch(String),
|
||||
}
|
||||
@@ -33,7 +34,17 @@ impl Display for ProcessError {
|
||||
ProcessError::FailedLaunch(game_id) => {
|
||||
&format!("Drop detected that the game {game_id} may have failed to launch properly")
|
||||
}
|
||||
ProcessError::RequiredDependency(game_id, version_id) => &format!(
|
||||
"Missing a required dependency to launch this game: {} {}",
|
||||
game_id, version_id
|
||||
),
|
||||
};
|
||||
write!(f, "{s}")
|
||||
}
|
||||
}
|
||||
|
||||
impl From<io::Error> for ProcessError {
|
||||
fn from(value: io::Error) -> Self {
|
||||
ProcessError::IOError(Arc::new(value))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user