Skip to content

Conversation

@ethangreen-dev
Copy link
Member

No description provided.

@ethangreen-dev ethangreen-dev merged commit fdf985e into develop May 26, 2025
1 of 3 checks passed
@ethangreen-dev ethangreen-dev deleted the eco-game-import branch May 26, 2025 09:04
fn construct(self: Box<Self>, base: ImportBase) -> Result<GameData, Error> {
let subkey = format!("Software\\{}\\", self.ident.replace('.', "\\"));
let value = reg::get_value_at(HKey::LocalMachine, &subkey, "Install Dir")?;
pub fn get_gamedist(ident: &str, game_def: &GameDef, overrides: &ImportOverrides) -> Result<Option<ActiveDistribution>, Error> {

Check failure

Code scanning / clippy

? couldn't convert the error to error::Error Error

? couldn't convert the error to error::Error
let value = reg::get_value_at(HKey::LocalMachine, &subkey, "Install Dir")?;
pub fn get_gamedist(ident: &str, game_def: &GameDef, overrides: &ImportOverrides) -> Result<Option<ActiveDistribution>, Error> {
let subkey = format!("Software\\{}\\", ident.replace('.', "\\"));
let value = reg::get_value_at(HKey::LocalMachine, &subkey, "Install Dir")?;

Check failure

Code scanning / clippy

? couldn't convert the error to error::Error Error

? couldn't convert the error to error::Error
let value = reg::get_value_at(HKey::LocalMachine, &subkey, "Install Dir")?;
pub fn get_gamedist(ident: &str, game_def: &GameDef, overrides: &ImportOverrides) -> Result<Option<ActiveDistribution>, Error> {
let subkey = format!("Software\\{}\\", ident.replace('.', "\\"));
let value = reg::get_value_at(HKey::LocalMachine, &subkey, "Install Dir")?;

Check failure

Code scanning / clippy

? couldn't convert the error to error::Error Error

? couldn't convert the error to error::Error
}
}
}
pub fn get_gamedist(ident: &str, game_def: &GameDef, overrides: &ImportOverrides) -> Result<Option<ActiveDistribution>, Error> {

Check failure

Code scanning / clippy

? couldn't convert the error to error::Error Error

? couldn't convert the error to error::Error
// I'm going to go for the second option.
// Attempt to get the path of the EGS /Data directory from the registry.
let subkey = r#"Software\WOW64Node\Epic Games\EpicGamesLauncher"#;
let value = reg::get_value_at(HKey::LocalMachine, subkey, "AppDataPath")?;

Check failure

Code scanning / clippy

? couldn't convert the error to error::Error Error

? couldn't convert the error to error::Error
.ok_or_else(|| {
GameError::NotFound(ident.into(), "Gamepass".to_string())
})?;
let game_dir = PathBuf::from(reg::get_value_at(HKey::LocalMachine, &game_root, "Root")?);

Check failure

Code scanning / clippy

? couldn't convert the error to error::Error Error

? couldn't convert the error to error::Error
use project::error::ProjectError;
use project::ProjectKind;
use ts::error::ApiError;
use ts::v1::models::ecosystem::GamePlatform;

Check warning

Code scanning / clippy

unused import: ts::v1::models::ecosystem::GamePlatform Warning

unused import: ts::v1::models::ecosystem::GamePlatform

use serde::{Deserialize, Serialize};

use crate::error::Error;

Check warning

Code scanning / clippy

unused import: crate::error::Error Warning

unused import: crate::error::Error

use crate::error::Error;
use crate::ts::version::Version;
use crate::game::ecosystem;

Check warning

Code scanning / clippy

unused import: crate::game::ecosystem Warning

unused import: crate::game::ecosystem
use crate::error::Error;
use crate::ts::version::Version;
use crate::game::ecosystem;
use crate::game::error::GameError;

Check warning

Code scanning / clippy

unused import: crate::game::error::GameError Warning

unused import: crate::game::error::GameError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants