[core] Parsers: strict VDF, Steam, Epic, GOG, manual and Domi sources, WinPath, GameId, Launch URIs, merge

This commit is contained in:
2026-11-22 23:26:18 +01:00
parent e85f160f88
commit cf5ba34bed
32 changed files with 1275 additions and 100 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"FormatVersion": 0,
"DisplayName": "Absurd Number",
"InstallLocation": "C:\Games\Absurd",
"InstallLocation": "C:\\Games\\Absurd",
"AppName": 1e999999
}
+1 -1
View File
@@ -1,7 +1,7 @@
{
"FormatVersion": 0,
"DisplayName": "Example Racer - Bonus Cars",
"InstallLocation": "C:\Program Files\Epic Games\ExampleRacer",
"InstallLocation": "C:\\Program Files\\Epic Games\\ExampleRacer",
"AppName": "ExampleRacerBonusCars",
"MainGameAppName": "ExampleRacer_Main-01"
}
+1 -1
View File
@@ -1,5 +1,5 @@
{
"DisplayName": "Injected",
"InstallLocation": "C:\Games\Injected",
"InstallLocation": "C:\\Games\\Injected",
"AppName": "x?action=uninstall&a=../../"
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"DisplayName": "Twice",
"InstallLocation": "C:\Games\Twice",
"InstallLocation": "C:\\Games\\Twice",
"AppName": "TwiceA",
"AppName": "TwiceB"
}
+1 -1
View File
@@ -1,4 +1,4 @@
{
"DisplayName": "No App Name",
"InstallLocation": "C:\Games\NoAppName"
"InstallLocation": "C:\\Games\\NoAppName"
}
+1 -1
View File
@@ -1,5 +1,5 @@
{
"DisplayName": "Trailing",
"InstallLocation": "C:\Games\Trailing",
"InstallLocation": "C:\\Games\\Trailing",
"AppName": "Trailing"
} {"AppName": "Second"}
+1 -1
View File
@@ -1,5 +1,5 @@
{
"DisplayName": "Escape Artist",
"InstallLocation": "C:\Games\..\Windows\System32",
"InstallLocation": "C:\\Games\\..\\Windows\\System32",
"AppName": "EscapeArtist"
}
+1 -1
View File
@@ -1,5 +1,5 @@
{
"DisplayName": "Remote",
"InstallLocation": "\\evil-server\share\Game",
"InstallLocation": "\\\\evil-server\\share\\Game",
"AppName": "Remote"
}
+2 -2
View File
@@ -3,7 +3,7 @@
"bIsIncompleteInstall": false,
"LaunchCommand": "",
"LaunchExecutable": "ExampleRacer/Binaries/Win64/ExampleRacer.exe",
"ManifestLocation": "C:\ProgramData\Epic\EpicGamesLauncher\Data\Manifests",
"ManifestLocation": "C:\\ProgramData\\Epic\\EpicGamesLauncher\\Data\\Manifests",
"bIsApplication": true,
"bIsExecutable": true,
"bIsManaged": false,
@@ -12,7 +12,7 @@
"bCanRunOffline": true,
"DisplayName": "Example Racer",
"InstallationGuid": "00000000000000000000000000000001",
"InstallLocation": "C:\Program Files\Epic Games\ExampleRacer",
"InstallLocation": "C:\\Program Files\\Epic Games\\ExampleRacer",
"CatalogNamespace": "example",
"CatalogItemId": "00000000000000000000000000000002",
"AppName": "ExampleRacer_Main-01",
+1 -1
View File
@@ -1,5 +1,5 @@
{
"DisplayName": "Wrong Type",
"InstallLocation": "C:\Games\WrongType",
"InstallLocation": "C:\\Games\\WrongType",
"AppName": 12345
}
@@ -2,7 +2,7 @@
{
"appid" "1234560"
"universe" "1"
"LauncherPath" "C:\Program Files (x86)\Steam\steam.exe"
"LauncherPath" "C:\\Program Files (x86)\\Steam\\steam.exe"
"name" "Example Quest: The \"Quoted\" Edition"
"StateFlags" "4"
"installdir" "Example Quest"
@@ -2,5 +2,5 @@
{
"appid" "1234571"
"name" "Somewhere Else"
"installdir" "C:\Windows"
"installdir" "C:\\Windows"
}
@@ -2,5 +2,5 @@
{
"appid" "1234570"
"name" "Escape Artist"
"installdir" "..\..\..\Windows\System32"
"installdir" "..\\..\\..\\Windows\\System32"
}
+2 -2
View File
@@ -2,7 +2,7 @@
{
"0"
{
"path" "C:\Program Files (x86)\Steam"
"path" "C:\\Program Files (x86)\\Steam"
"label" ""
"contentid" "1111111111111111111"
"totalsize" "0"
@@ -16,7 +16,7 @@
}
"1"
{
"path" "D:\SteamLibrary"
"path" "D:\\SteamLibrary"
"label" "Games"
"contentid" "2222222222222222222"
"totalsize" "1000000000000"
@@ -2,10 +2,10 @@
{
"0"
{
"path" "D:\SteamLibrary"
"path" "D:\\SteamLibrary"
}
"1"
{
"path" "d:\steamlibrary\\"
"path" "d:\\steamlibrary\\"
}
}
@@ -3,6 +3,6 @@
{
"TimeNextStatsReport" "0"
"ContentStatsID" "-1"
"1" "D:\SteamLibrary"
"1" "D:\\SteamLibrary"
"2" "E:/Games/Steam"
}
@@ -2,6 +2,6 @@
{
"0"
{
"path" "\\evil-server\share\Steam"
"path" "\\\\evil-server\\share\\Steam"
}
}
+1 -1
View File
@@ -156,7 +156,7 @@ fn app_manifest_refuses_blank_or_control_title() {
#[test]
fn app_manifest_refuses_device_name_installdir() {
for bad in ["CON", "nul", "COM1", "lpt9.txt", "a/b", "a\\b", ".", "..", "x:", "dots.", ""] {
for bad in ["CON", "nul", "COM1", "lpt9.txt", "a/b", r"a\\b", ".", "..", "x:", "dots.", ""] {
let acf = format!("\"AppState\" {{ \"appid\" \"10\" \"name\" \"N\" \"installdir\" \"{bad}\" }}");
assert_eq!(steam::app_manifest(acf.as_bytes(), &lib()), Err(ParseError::BadPath("installdir")), "{bad:?}");
}