-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Bump version * Fully switch from `steamy-vdf` (#9) * feat: Switch appmanifest parsing to use `keyvalues-serde` * feat: Add example to showcase `SteamApp` struct changes * chore: Remove lingering debug `println!()` * fix: Switch some fields to optional * feat: Add `dlcappid` and `LauncherPath` to manifest * fix: Add more missing fields to `SteamApp` * Parsing tweaks * Expose `crate::steamapp` types * Placate clippy * Publish v2.0.0-alpha.0 * Experimental switch to iterator based api (#10) * Hack together experimental API * Get tests passing * Dont use the apps listing from `libraryfolders.vdf` * Fix windows build * Remove caching of values * Placate clippy * Custom error type (#29) * Add additional Steam search paths for Linux (#31) * Add additional Steam search paths for Linux * Fix invalid return type for locate_steam_dir * Fix formatting-related CI fail * impl std::error::Error for Error {} (#32) * Remove steamid-ng feature (keep public API stable) (#33) * Add Snap support for linux (#30) * Get things back to compiling and passing (#38) * Update dependencies (#39) * `cargo upgrade` * `cargo upgrade --incompatible` Everything seems to work fine on my machine. We'll see if CI has anything to say otherwise. We should really beef up our test suite too, but now I'm rambling * Switch tests to run in isolated dummy steam installations (#40) * Switch tests to run in isolated dummy steam installations * Placate clippy * Drastically simplify test helpers (#41) * Run `cargo test` in CI (#42) * Run `cargo test` in CI * `#[ignore]` a couple lingering doctests * Placate clippy (#43) * Placate clippy on more platforms (#44) * Run CI on more platforms/channels (#45) * Bundle existing CI jobs into one * Run CI on more platforms * Use `dtolnay/rust-toolchain` action * Setup CI caching * Run CI on stable and beta * Error cleanup (#46) * `ParseErrorInner` should **not** be part of the public API * `LibaryFolders` -> `LibraryFolders` * Make `Error` non-exhaustive * Add path to io error * Add path to parse error * Remove erroneous print * Fixup error for missing app installation * Unfocused polish (#47) * Refactor `StateFlags` * Restructure public api * `cargo fmt` * Rework `locate()` failures (#49) * Move unsupported OS failure to runtime * Move `locate()` behind a feature flag * Port compat tool (#50) * add method to query configured compatibility tool * Update things to better match new structure --------- Co-authored-by: Jan200101 <[email protected]> * Expose `Library::from_dir()` and `InstallDir::library_paths()` (#51) * Expose `Library::from_dir()` * Add a way to get just library paths * Another round of refactors (#52) * Rename `InstallDir` back to `SteamDir` * `FlagIter` -> `StateFlagIter` * `tests::test_helpers` -> `tests::helpers` * Conditionally ignore `shortcuts_extras` test * Provide more context on installation location failure (#53) * Prepare another alpha (#54) * Bump version to v2.0.0-alpha.1 * Make `App` plain data * Docs overhaul (#55) * Finally found an approach to doctest dependecies thats decent * Overhaul landing page * Make github syntax highlighting happy * `cargo fmt` * Overhaul all remaining existing docs * `cargo fmt` * Prepare the v2.0 beta release (#56) * `SteamDir::from_steam_dir` -> `SteamDir::from_dir` * `shortcuts_extra` is now just part of `steamlocate` * Make `app_id` name more consistent * `cargo fmt` * Update the README * Bump version to v2.0.0-beta.0 * Remove need to use `tempfile` (#57) * Remove need to use `tempfile` * Bump version to v2.0.0-beta.1 * Make `app.last_updated` actually optional (#59) * Fix wasm32 in general (#60) * Alias `lastupdated` for `last_updated` (#61) * Add failing test * Alias `last_updated` to `lastupdated` as well * Bump version to v2.0.0-beta.2 (#62) * Temporarily ignore broken test --------- Co-authored-by: Ethan Green <[email protected]> Co-authored-by: Jan <[email protected]>
- Loading branch information
1 parent
4982655
commit 2a518c9
Showing
31 changed files
with
2,311 additions
and
889 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "steamlocate" | ||
version = "1.2.1" | ||
version = "2.0.0-beta.2" | ||
authors = ["William Venner <[email protected]>"] | ||
edition = "2018" | ||
repository = "https://github.com/WilliamVenner/steamlocate-rs" | ||
|
@@ -10,22 +10,38 @@ readme = "README.md" | |
keywords = ["steam", "vdf", "appmanifest", "directory", "steamapps"] | ||
categories = ["os", "hardware-support", "filesystem", "accessibility"] | ||
|
||
[package.metadata.docs.rs] | ||
all-features = true | ||
rustdoc-args = ["--cfg", "docsrs"] | ||
|
||
[features] | ||
default = [] | ||
shortcuts_extras = ["crc"] | ||
steamid_ng = ["steamid-ng"] | ||
default = ["locate"] | ||
locate = ["locate_backend"] | ||
|
||
[dependencies] | ||
steamy-vdf = "0.2" | ||
keyvalues-parser = "0.1" | ||
crc = "3.0" | ||
keyvalues-parser = "0.2" | ||
keyvalues-serde = "0.2" | ||
serde = { version = "1.0.0", features = ["derive"] } | ||
keyvalues-serde = "0.1" | ||
|
||
crc = { version = "3.0", optional = true } | ||
# Platform-specific dependencies used for locating the steam dir | ||
[target."cfg(target_os=\"windows\")".dependencies] | ||
locate_backend = { package = "winreg", version = "0.51", optional = true } | ||
[target."cfg(not(target_os=\"windows\"))".dependencies] | ||
locate_backend = { package = "dirs", version = "5", optional = true } | ||
|
||
[dev-dependencies] | ||
insta = { version = "1.34.0", features = ["ron"] } | ||
wasm-bindgen-test = "0.3.39" | ||
|
||
[[example]] | ||
name = "appmanifest" | ||
required-features = ["locate"] | ||
|
||
steamid-ng = { version = "1", optional = true } | ||
[[example]] | ||
name = "overview" | ||
required-features = ["locate"] | ||
|
||
[target.'cfg(target_os="windows")'.dependencies] | ||
winreg = "0.11" | ||
[target.'cfg(not(target_os="windows"))'.dependencies] | ||
dirs = "5" | ||
[[example]] | ||
name = "shortcuts" | ||
required-features = ["locate"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
use std::{env, process::exit}; | ||
|
||
use steamlocate::SteamDir; | ||
|
||
fn main() { | ||
let args: Vec<_> = env::args().collect(); | ||
if args.len() != 2 || args[1].parse::<u32>().is_err() { | ||
eprintln!("Usage: cargo run --example appmanifest -- <STEAM_APP_ID>"); | ||
exit(1); | ||
} | ||
let app_id: u32 = args[1].parse().expect("<STEAM_APP_ID> should be a u32"); | ||
|
||
let steam_dir = SteamDir::locate().unwrap(); | ||
match steam_dir.find_app(app_id) { | ||
Ok(Some((app, _library))) => println!("Found app - {:#?}", app), | ||
Ok(None) => println!("No app found for {}", app_id), | ||
Err(err) => println!("Failed reading app: {err}"), | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
use steamlocate::SteamDir; | ||
|
||
fn main() { | ||
let steamdir = SteamDir::locate().unwrap(); | ||
println!("Steam Dir - {:?}", steamdir.path()); | ||
|
||
// TODO: use `anyhow` to make error handling here simpler | ||
for maybe_library in steamdir.libraries().unwrap() { | ||
match maybe_library { | ||
Err(err) => eprintln!("Failed reading library: {err}"), | ||
Ok(library) => { | ||
println!(" Library - {:?}", library.path()); | ||
for app in library.apps() { | ||
match app { | ||
Ok(app) => println!( | ||
" App {} - {}", | ||
app.app_id, | ||
app.name.as_deref().unwrap_or("<no-name>") | ||
), | ||
Err(err) => println!(" Failed reading app: {err}"), | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.