Update steamlocate-rs
While this is an unstable dev release, its only significant change is exactly the one I need: dropping `steam-vdf` and its out-of-date `nom` dependency.
This commit is contained in:
parent
f197b1944b
commit
08d417fd5d
9 changed files with 43 additions and 148 deletions
|
@ -8,7 +8,6 @@ RUN set -e; \
|
|||
cargo new --lib lib/nexusmods; \
|
||||
cargo new --lib lib/sdk; \
|
||||
cargo new --lib lib/serde_sjson; \
|
||||
cargo new --lib lib/steamlocate-rs
|
||||
|
||||
COPY Cargo.toml Cargo.lock /src/dtmt/
|
||||
COPY crates/dtmt/Cargo.toml /src/dtmt/crates/dtmt/
|
||||
|
@ -17,7 +16,6 @@ COPY lib/dtmt-shared/Cargo.toml /src/dtmt/lib/dtmt-shared/
|
|||
COPY lib/nexusmods/Cargo.toml /src/dtmt/lib/nexusmods/
|
||||
COPY lib/sdk/Cargo.toml /src/dtmt/lib/sdk/
|
||||
COPY lib/serde_sjson/Cargo.toml /src/dtmt/lib/serde_sjson/
|
||||
COPY lib/steamlocate-rs/Cargo.toml /src/dtmt/lib/steamlocate-rs/
|
||||
|
||||
# Crates with build scripts cannot be split that way, but they shouldn't change too often
|
||||
COPY lib/luajit2-sys /src/dtmt/lib/luajit2-sys
|
||||
|
|
|
@ -8,7 +8,6 @@ RUN set -e; \
|
|||
cargo new --lib lib/nexusmods; \
|
||||
cargo new --lib lib/sdk; \
|
||||
cargo new --lib lib/serde_sjson; \
|
||||
cargo new --lib lib/steamlocate-rs
|
||||
|
||||
COPY Cargo.toml Cargo.lock /src/dtmt/
|
||||
COPY crates/dtmt/Cargo.toml /src/dtmt/crates/dtmt/
|
||||
|
@ -17,7 +16,6 @@ COPY lib/dtmt-shared/Cargo.toml /src/dtmt/lib/dtmt-shared/
|
|||
COPY lib/nexusmods/Cargo.toml /src/dtmt/lib/nexusmods/
|
||||
COPY lib/sdk/Cargo.toml /src/dtmt/lib/sdk/
|
||||
COPY lib/serde_sjson/Cargo.toml /src/dtmt/lib/serde_sjson/
|
||||
COPY lib/steamlocate-rs/Cargo.toml /src/dtmt/lib/steamlocate-rs/
|
||||
|
||||
# Crates with build scripts cannot be split that way, but they shouldn't change too often
|
||||
COPY lib/luajit2-sys /src/dtmt/lib/luajit2-sys
|
||||
|
|
6
.gitmodules
vendored
6
.gitmodules
vendored
|
@ -1,12 +1,12 @@
|
|||
[submodule "lib/serde_sjson"]
|
||||
path = lib/serde_sjson
|
||||
url = https://git.sclu1034.dev/lucas/serde_sjson.git
|
||||
[submodule "lib/steamlocate-rs"]
|
||||
path = lib/steamlocate-rs
|
||||
url = https://github.com/sclu1034/steamlocate-rs.git
|
||||
[submodule "lib/luajit2-sys"]
|
||||
path = lib/luajit2-sys
|
||||
url = https://github.com/sclu1034/luajit2-sys.git
|
||||
[submodule "lib/color-eyre"]
|
||||
path = lib/color-eyre
|
||||
url = https://github.com/sclu1034/color-eyre.git
|
||||
[submodule "lib/ansi-parser"]
|
||||
path = lib/ansi-parser
|
||||
url = git@gitlab.com:lschwiderski/ansi-parser.git
|
||||
|
|
161
Cargo.lock
generated
161
Cargo.lock
generated
|
@ -658,21 +658,6 @@ dependencies = [
|
|||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crc"
|
||||
version = "3.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe"
|
||||
dependencies = [
|
||||
"crc-catalog",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crc-catalog"
|
||||
version = "2.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5"
|
||||
|
||||
[[package]]
|
||||
name = "crc32fast"
|
||||
version = "1.3.2"
|
||||
|
@ -1023,15 +1008,6 @@ version = "0.1.2"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d"
|
||||
|
||||
[[package]]
|
||||
name = "enum_primitive"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "be4551092f4d519593039259a9ed8daedf0da12e5109c5280338073eaeb81180"
|
||||
dependencies = [
|
||||
"num-traits 0.1.43",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "equivalent"
|
||||
version = "1.0.1"
|
||||
|
@ -1784,8 +1760,8 @@ dependencies = [
|
|||
"byteorder",
|
||||
"color_quant",
|
||||
"jpeg-decoder",
|
||||
"num-rational 0.4.1",
|
||||
"num-traits 0.2.17",
|
||||
"num-rational",
|
||||
"num-traits",
|
||||
"png",
|
||||
]
|
||||
|
||||
|
@ -1931,6 +1907,20 @@ dependencies = [
|
|||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "keyvalues-serde"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "da419ac133bb3ddf0dbf9c12fcc0ce01d994fcb65f6f1713faf15cc689320b5f"
|
||||
dependencies = [
|
||||
"keyvalues-parser",
|
||||
"once_cell",
|
||||
"paste",
|
||||
"regex",
|
||||
"serde",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "kqueue"
|
||||
version = "1.0.8"
|
||||
|
@ -2185,12 +2175,6 @@ dependencies = [
|
|||
"memoffset 0.6.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nom"
|
||||
version = "1.2.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a5b8c256fd9471521bcb84c3cdba98921497f1a331cbc15b8030fc63b82050ce"
|
||||
|
||||
[[package]]
|
||||
name = "nom"
|
||||
version = "4.2.3"
|
||||
|
@ -2250,40 +2234,6 @@ dependencies = [
|
|||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8b7a8e9be5e039e2ff869df49155f1c06bd01ade2117ec783e56ab0932b67a8f"
|
||||
dependencies = [
|
||||
"num-bigint",
|
||||
"num-complex",
|
||||
"num-integer",
|
||||
"num-iter",
|
||||
"num-rational 0.3.2",
|
||||
"num-traits 0.2.17",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-bigint"
|
||||
version = "0.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5f6f7833f2cbf2360a6cfd58cd41a53aa7a90bd4c202f5b1c7dd2ed73c57b2c3"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"num-integer",
|
||||
"num-traits 0.2.17",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-complex"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "747d632c0c558b87dbabbe6a82f3b4ae03720d0646ac5b7b4dae89394be5f2c5"
|
||||
dependencies = [
|
||||
"num-traits 0.2.17",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-integer"
|
||||
version = "0.1.45"
|
||||
|
@ -2291,30 +2241,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"num-traits 0.2.17",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-iter"
|
||||
version = "0.1.43"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"num-integer",
|
||||
"num-traits 0.2.17",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-rational"
|
||||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"num-bigint",
|
||||
"num-integer",
|
||||
"num-traits 0.2.17",
|
||||
"num-traits",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2325,16 +2252,7 @@ checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0"
|
|||
dependencies = [
|
||||
"autocfg",
|
||||
"num-integer",
|
||||
"num-traits 0.2.17",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-traits"
|
||||
version = "0.1.43"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31"
|
||||
dependencies = [
|
||||
"num-traits 0.2.17",
|
||||
"num-traits",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2518,6 +2436,12 @@ dependencies = [
|
|||
"subtle",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "paste"
|
||||
version = "1.0.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c"
|
||||
|
||||
[[package]]
|
||||
name = "path-clean"
|
||||
version = "1.0.1"
|
||||
|
@ -3322,42 +3246,19 @@ version = "1.2.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
|
||||
|
||||
[[package]]
|
||||
name = "steamid-ng"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ffb049f8faa2cba570c5366dbaf88ee5849725b16edb771848639fac92e33673"
|
||||
dependencies = [
|
||||
"enum_primitive",
|
||||
"lazy_static",
|
||||
"num",
|
||||
"regex",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "steamlocate"
|
||||
version = "1.1.1"
|
||||
version = "2.0.0-alpha.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2b1568c4a70a26c4373fe1131ffa4eff055459631b6e40c6bc118615f2d870c3"
|
||||
dependencies = [
|
||||
"crc",
|
||||
"dirs",
|
||||
"keyvalues-parser",
|
||||
"steamid-ng",
|
||||
"steamy-vdf",
|
||||
"keyvalues-serde",
|
||||
"serde",
|
||||
"winreg 0.10.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "steamy-vdf"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "533127ad49314bfe71c3d3fd36b3ebac3d24f40618092e70e1cfe8362c7fac79"
|
||||
dependencies = [
|
||||
"nom 1.2.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "str-buf"
|
||||
version = "1.0.6"
|
||||
|
@ -4483,3 +4384,7 @@ dependencies = [
|
|||
"cc",
|
||||
"pkg-config",
|
||||
]
|
||||
|
||||
[[patch.unused]]
|
||||
name = "ansi-parser"
|
||||
version = "0.9.0"
|
||||
|
|
|
@ -7,7 +7,6 @@ members = [
|
|||
"lib/oodle",
|
||||
"lib/sdk",
|
||||
"lib/serde_sjson",
|
||||
"lib/steamlocate-rs",
|
||||
]
|
||||
|
||||
[patch.crates-io]
|
||||
|
|
1
lib/ansi-parser
Submodule
1
lib/ansi-parser
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 28001c31975ecaefd0133e952dd6bb6386f6c701
|
|
@ -9,7 +9,7 @@ edition = "2021"
|
|||
ansi_term = "0.12.1"
|
||||
color-eyre = "0.6.2"
|
||||
serde = "1.0.152"
|
||||
steamlocate = { path = "../../lib/steamlocate-rs", version = "*" }
|
||||
steamlocate = "2.0.0-alpha.0"
|
||||
time = { version = "0.3.19", features = ["formatting", "local-offset", "macros"] }
|
||||
tracing = "0.1.37"
|
||||
tracing-error = "0.2.0"
|
||||
|
|
|
@ -71,20 +71,15 @@ pub fn collect_game_info() -> Option<GameInfo> {
|
|||
|
||||
let found = dir
|
||||
.app(&STEAMAPP_ID)
|
||||
.and_then(|app| app.vdf.get("LastUpdated").map(|v| (app.path.clone(), v)));
|
||||
.and_then(|app| app.last_updated.map(|v| (app.path.clone(), v)));
|
||||
|
||||
let Some((path, last_updated)) = found else {
|
||||
tracing::debug!("Found Steam, but failed to find game installation");
|
||||
return None;
|
||||
};
|
||||
|
||||
let Some(last_updated) = last_updated
|
||||
.as_value()
|
||||
.and_then(|v| v.to::<i64>())
|
||||
.and_then(|v| OffsetDateTime::from_unix_timestamp(v).ok()) else {
|
||||
tracing::error!("Found Steam game, but couldn't read 'LastUpdate'.");
|
||||
return None;
|
||||
};
|
||||
|
||||
Some(GameInfo { path, last_updated })
|
||||
Some(GameInfo {
|
||||
path,
|
||||
last_updated: last_updated.into(),
|
||||
})
|
||||
}
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 4d6898f632e20ea15d47b0b071daa4f3fa6c9574
|
Loading…
Add table
Reference in a new issue