Check Steam update against deployment #35

Closed
opened 2023-02-25 11:41:15 +01:00 by lucas · 4 comments
Owner

Look through Steam's metadata files. There's probably something that records the last update time. Or something that can be mapped against steamdb.info to get the update time.

Then, during deployment, write a file containing the deployment time (and maybe some other info, such as included mods and packages).

On the next deployment (and maybe also when DTMM is started), read that file and check whether there was an update since. If that was the case, notify the user that they will have to reset things first.

Look through Steam's metadata files. There's probably something that records the last update time. Or something that can be mapped against [steamdb.info](https://steamdb.info) to get the update time. Then, during deployment, write a file containing the deployment time (and maybe some other info, such as included mods and packages). On the next deployment (and maybe also when DTMM is started), read that file and check whether there was an update since. If that was the case, notify the user that they will have to reset things first.
lucas added the
kind
feature
status/good first issue
crate/dtmm
stage
actionable
labels 2023-02-25 11:41:15 +01:00
lucas added this to the Mod Manager project 2023-02-25 11:41:15 +01:00
lucas added this to the DTMM v1.0 + DTMT milestone 2023-02-28 16:01:15 +01:00
lucas added a new dependency 2023-03-01 22:35:23 +01:00
Author
Owner
Things to look into: - https://github.com/Corecii/steam-binary-vdf-ts - https://crates.io/crates/vdf-serde - https://crates.io/crates/steam_shortcuts_util - https://crates.io/crates/steamlocate
Author
Owner

The file is actually an .acf. Specifically, <steamapps>/appmanifest_1361210.acf:

"AppState"
{
	"appid"		"1361210"
	"universe"		"1"
	"name"		"Warhammer 40,000: Darktide"
	"StateFlags"		"4"
	"installdir"		"Warhammer 40,000 DARKTIDE"
	"LastUpdated"		"1677615368"
	"SizeOnDisk"		"45767763746"
	"StagingSize"		"0"
	"buildid"		"10655293"
	"LastOwner"		"76561198067280032"
	"AutoUpdateBehavior"		"0"
	"AllowOtherDownloadsWhileRunning"		"0"
	"ScheduledAutoUpdate"		"0"
	"FullValidateAfterNextUpdate"		"1"
	"InstalledDepots"
	{
		"1361211"
		{
			"manifest"		"6269025584426892702"
			"size"		"45124115665"
		}
		"1361212"
		{
			"manifest"		"3846999139056181491"
			"size"		"514170235"
		}
		"1361213"
		{
			"manifest"		"682261956615153626"
			"size"		"129477846"
		}
	}
	"InstallScripts"
	{
		"1361213"		"installers\\installscript.vdf"
	}
	"SharedDepots"
	{
		"228983"		"228980"
		"228988"		"228980"
		"229006"		"228980"
	}
	"UserConfig"
	{
		"language"		"english"
	}
	"MountedConfig"
	{
		"language"		"english"
	}
}

The file looks relatively simple to parse, as it's just quoted strings and maps.

The file is actually an `.acf`. Specifically, `<steamapps>/appmanifest_1361210.acf`: ```acf "AppState" { "appid" "1361210" "universe" "1" "name" "Warhammer 40,000: Darktide" "StateFlags" "4" "installdir" "Warhammer 40,000 DARKTIDE" "LastUpdated" "1677615368" "SizeOnDisk" "45767763746" "StagingSize" "0" "buildid" "10655293" "LastOwner" "76561198067280032" "AutoUpdateBehavior" "0" "AllowOtherDownloadsWhileRunning" "0" "ScheduledAutoUpdate" "0" "FullValidateAfterNextUpdate" "1" "InstalledDepots" { "1361211" { "manifest" "6269025584426892702" "size" "45124115665" } "1361212" { "manifest" "3846999139056181491" "size" "514170235" } "1361213" { "manifest" "682261956615153626" "size" "129477846" } } "InstallScripts" { "1361213" "installers\\installscript.vdf" } "SharedDepots" { "228983" "228980" "228988" "228980" "229006" "228980" } "UserConfig" { "language" "english" } "MountedConfig" { "language" "english" } } ``` The file looks relatively simple to parse, as it's just quoted strings and maps.
Author
Owner
`.acf` seems to be the same format as `.vdf`: https://developer.valvesoftware.com/wiki/KeyValues Parsers exist already: https://docs.rs/keyvalues-parser/latest/keyvalues_parser/
Author
Owner

Closed in #50.

Closed in #50.
lucas closed this issue 2023-03-07 19:53:14 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Depends on
Reference: bitsquid_dt/dtmt#35
No description provided.