Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .github/workflows/rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ name: SteamFlow Rust Build
on:
push:
paths:
- "SteamFlow/**"
- "src/**"
- "assets/**"
- "Cargo.toml"
- "Cargo.lock"
- ".github/workflows/rust.yaml"
pull_request:

Expand Down Expand Up @@ -40,16 +43,16 @@ jobs:
uses: dtolnay/rust-toolchain@stable

- name: Build SteamFlow (release)
run: cargo build --release --manifest-path SteamFlow/Cargo.toml
run: cargo build --release

- name: Install cargo-deb
run: cargo install cargo-deb --locked

- name: Build .deb package
run: cargo deb --no-build --manifest-path SteamFlow/Cargo.toml
run: cargo deb --no-build

- name: Upload .deb artifact
uses: actions/upload-artifact@v4
with:
name: steamflow-deb
path: SteamFlow/target/debian/*.deb
path: target/debian/*.deb
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ sudo apt-get install build-essential pkg-config libssl-dev libx11-dev libxi-dev
## Build and Run
```bash
git clone https://github.com/OpenSteamClient/OpenSteamClient.git --recursive
cd OpenSteamClient/SteamFlow
cd OpenSteamClient
cargo run --release
```

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion SteamFlow/README.md → STEAMFLOW_TECHNICAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Guard data is persisted through `FileGuardDataStore::user_cache()` so repeated S

## Run
```bash
cargo run --manifest-path SteamFlow/Cargo.toml
cargo run
```

## Install/download pipeline
Expand Down
File renamed without changes
File renamed without changes.
File renamed without changes.
10 changes: 8 additions & 2 deletions SteamFlow/src/config.rs → src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,15 @@ impl LauncherConfig {

impl Default for LauncherConfig {
fn default() -> Self {
let home = std::env::var("HOME").unwrap_or_else(|_| "~".to_string());
let steam_library_path = detect_steam_path()
.map(|path| path.to_string_lossy().to_string())
.unwrap_or_else(|| {
let home = std::env::var("HOME").unwrap_or_else(|_| "~".to_string());
format!("{home}/Games/SteamFlow")
});

Self {
steam_library_path: format!("{home}/Games/SteamFlow"),
steam_library_path,
proton_version: "experimental".to_string(),
enable_cloud_sync: true,
use_shared_compat_data: false,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
24 changes: 16 additions & 8 deletions SteamFlow/src/library.rs → src/library.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,18 @@ pub async fn scan_installed_app_paths() -> Result<HashMap<u32, String>> {
}

pub async fn scan_installed_app_paths_pathbuf() -> Result<HashMap<u32, PathBuf>> {
let config_path = if let Ok(cfg) = load_launcher_config().await {
let config_path = load_launcher_config().await.ok().and_then(|cfg| {
let p = PathBuf::from(cfg.steam_library_path);
if p.join("steamapps").exists() || p.join("Steam").join("steamapps").exists() {
Some(p)
} else {
None
}
} else {
None
};
});

let root = config_path
.unwrap_or_else(|| detect_steam_path().unwrap_or_else(|| PathBuf::from("~/.steam/steam")));
.or_else(detect_steam_path)
.unwrap_or_else(default_steam_root);
println!("Scanning Library Root: {:?}", root);
scan_library(&root).await
}
Expand All @@ -86,7 +85,12 @@ pub async fn scan_library(root_path: &Path) -> Result<HashMap<u32, PathBuf>> {
let mut libraries = vec![root_path.to_path_buf()];

let library_folders_path = root_path.join("steamapps").join("libraryfolders.vdf");
let extra_libraries = parse_library_folders(library_folders_path).await?;
let extra_libraries = parse_library_folders(library_folders_path)
.await
.unwrap_or_else(|e| {
println!("Warning: Could not parse libraryfolders.vdf: {}", e);
Vec::new()
});
libraries.extend(extra_libraries);

libraries.sort();
Expand All @@ -108,8 +112,12 @@ pub async fn scan_library(root_path: &Path) -> Result<HashMap<u32, PathBuf>> {
continue;
}

if let Some((app_id, install_dir)) = parse_app_manifest_install_path(&path).await? {
installed.insert(app_id, install_dir);
match parse_app_manifest_install_path(&path).await {
Ok(Some((app_id, install_dir))) => {
installed.insert(app_id, install_dir);
}
Ok(None) => {}
Err(e) => println!("Skipping bad manifest {:?}: {}", path, e),
}
}
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 7 additions & 6 deletions SteamFlow/src/ui.rs → src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,14 +235,15 @@ impl SteamLauncher {
DownloadProgressState::Completed => {
self.status = "Install completed".to_string();
if let Some(appid) = self.active_download_appid {
let installed_paths = self
.runtime
.block_on(scan_installed_app_paths())
.unwrap_or_default();

for g in &mut self.library {
if g.app_id == appid {
g.is_installed = true;
let install_dir = std::env::temp_dir()
.join("steamflow_downloads")
.join(appid.to_string());
g.install_path =
Some(install_dir.to_string_lossy().to_string());
g.install_path = installed_paths.get(&appid).cloned();
g.is_installed = g.install_path.is_some();
}
}
}
Expand Down
Loading