mirror of
https://github.com/djibux/BoilR.git
synced 2026-09-01 14:03:42 +02:00
Add uplay syncrhonization
This commit is contained in:
@@ -64,9 +64,10 @@ impl Platform<ItchGame, ItchErrors> for ItchPlatform {
|
||||
let shortcuts_res = self.get_shortcuts();
|
||||
match shortcuts_res {
|
||||
Ok(_) => SettingsValidity::Valid,
|
||||
Err(err) => SettingsValidity::Invalid{reason:format!("{}",err)}
|
||||
Err(err) => SettingsValidity::Invalid {
|
||||
reason: format!("{}", err),
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +95,7 @@ fn dbpath_to_game(paths: &DbPaths<'_>) -> Option<ItchGame> {
|
||||
#[cfg(target_os = "linux")]
|
||||
pub fn get_default_location() -> String {
|
||||
//If we don't have a home drive we have to just die
|
||||
let home = std::env::var("HOME").expect("Expected a home variable to be defined");
|
||||
let home = std::env::var("HOME").expect("Expected a home variable to be defined");
|
||||
format!("{}/.config/itch/", home)
|
||||
}
|
||||
|
||||
@@ -102,7 +103,11 @@ pub fn get_default_location() -> String {
|
||||
pub fn get_default_location() -> String {
|
||||
let key = "APPDATA";
|
||||
let appdata = std::env::var(key).expect("Expected a APPDATA variable to be defined");
|
||||
Path::new(&appdata).join("itch").to_str().unwrap().to_string()
|
||||
Path::new(&appdata)
|
||||
.join("itch")
|
||||
.to_str()
|
||||
.unwrap()
|
||||
.to_string()
|
||||
//C:\Users\phili\AppData\Local\itch
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
mod settings;
|
||||
mod butler_db_parser;
|
||||
mod itch_game;
|
||||
mod itch_platform;
|
||||
mod butler_db_parser;
|
||||
mod receipt;
|
||||
mod settings;
|
||||
|
||||
pub use settings::*;
|
||||
pub use itch_game::*;
|
||||
pub use itch_platform::*;
|
||||
pub use itch_platform::*;
|
||||
pub use settings::*;
|
||||
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone)]
|
||||
pub(crate) struct Receipt{
|
||||
pub game:Game,
|
||||
pub(crate) struct Receipt {
|
||||
pub game: Game,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone)]
|
||||
pub(crate) struct Game{
|
||||
pub title:String
|
||||
pub(crate) struct Game {
|
||||
pub title: String,
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use serde::{Serialize,Deserialize};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||
pub struct ItchSettings {
|
||||
@@ -6,4 +6,4 @@ pub struct ItchSettings {
|
||||
pub location: Option<String>,
|
||||
#[cfg(target_os = "linux")]
|
||||
pub create_symlinks: bool,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user