* docs(spike-notes): §25 - the Xbox/GDK titles' layout, read-only, and the launch probe's decision table, written before the run (D77) (beta.33 PR-1) The owner's 11 GDK packages under C:\XboxGames and D:\xbox, read without launching anything: the .GamingRoot files, MicrosoftGame.config / appxmanifest.xml, the WindowsApps junction chain, and the executables refusing FILE_READ_DATA and FILE_EXECUTE to every process outside their package. Then the probe's method and the table that decides what each outcome changes - committed before the probe runs, as the house rule asks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(spike-notes): §25's run - six GDK titles activated through their packages; the image paths, the chains, the tokens, the mitigations, and what a start by path really does (D77, D80) (beta.33 PR-1) The image path and the loader's main-module path are both the Content spelling on every process of every chain; no chain member the guard's rights cannot open; no fuzzy-fragment module; full trust, not an AppContainer, medium integrity; none of the four mitigations. And CreateProcess by path is not error 5, as assumed: the package's launch executable is replaced by an unpackaged gamelaunchhelper.exe that activates the package (the game is never the caller's process nor its descendant), and an Unreal shipping executable runs outside its package. D80 stands on those two measured grounds; the read-only claim is struck and dated in place. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat: games from the Xbox app and the Microsoft Store - the GDK library, a package root as an install-root boundary for the guard and detection, the xbox platform rule (root_file, rules 2026.11.1), the game's own art; Privacy 2.13 (D77-D81) (beta.33 PR-1) The import gains a fifth store, `xbox`: each ready drive's .GamingRoot names the games folders, each <Game>\Content\ holding MicrosoftGame.config beside appxmanifest.xml is a GDK package (read with DTDs prohibited), and Windows' appmodel calls (PackageFamilyNameFromId, GetPackagesByPackageFamily) say whether it is installed for this user. The record: the family name as the store id, Content as the install folder (the spelling the game's own process reports, spike-notes section 25), the AUMID as the launch key; ExecutableLocator picks the process that draws, never gamelaunchhelper.exe. Safety: no install-root boundary matched the Xbox layout, so check 4 walked only an Unreal title's Binaries\WinGDK. A GDK package root is now a boundary for InstallRoot and the native ResolveInstallRoot alike, asked only where no store boundary matched (it can only widen the walk); GamesInstalled joins the native list; one case list, tests/fixtures/install-roots/cases.txt, is read by Catch2 and xUnit both. Detection: an `xbox` platform first in the array (a GDK FINAL FANTASY ships steam_api64.dll), decided by a new root_file signal from the install root's own listing, so a deep walk that ran short cannot make it Unknown. Art: the square logo and the splash image the package names, from inside the package root only. games.platform's vocabulary gains xbox; the importer's fake repository now validates as the real one does. Privacy Policy 2.13 with the wording approved with the plan; TRADEMARKS, 02_SPEC, 15_ROADMAP, 05/06/08/19/20, README, LIMITATIONS and the guide follow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
78 lines
2.9 KiB
C#
78 lines
2.9 KiB
C#
// SPDX-License-Identifier: GPL-3.0-only
|
||
// Copyright (C) 2026 poli0981 - additional terms under GPLv3 section 7: see NOTICE
|
||
|
||
using System.IO;
|
||
using System.Windows.Media;
|
||
using System.Windows.Media.Imaging;
|
||
using FrameLedger.Application.Art;
|
||
using FrameLedger.Application.Import;
|
||
|
||
namespace FrameLedger.App.Tests;
|
||
|
||
/// <summary>Images and stores for the artwork checks (beta.23, D60/D61): PNGs drawn here, never a store's real artwork.</summary>
|
||
internal static class TestImages
|
||
{
|
||
/// <summary>A PNG of <paramref name="width"/> × <paramref name="height"/>, its left part <paramref name="left"/> and the rest <paramref name="right"/>.</summary>
|
||
public static byte[] Png(int width, int height, Color left, Color? right = null, double leftShare = 1)
|
||
{
|
||
int stride = width * 4;
|
||
byte[] pixels = new byte[stride * height];
|
||
for (int y = 0; y < height; y++)
|
||
{
|
||
for (int x = 0; x < width; x++)
|
||
{
|
||
Color c = x < width * leftShare ? left : right ?? left;
|
||
int i = (y * stride) + (x * 4);
|
||
pixels[i] = c.B;
|
||
pixels[i + 1] = c.G;
|
||
pixels[i + 2] = c.R;
|
||
pixels[i + 3] = c.A;
|
||
}
|
||
}
|
||
|
||
BitmapSource image = BitmapSource.Create(width, height, 96, 96, PixelFormats.Bgra32, null, pixels, stride);
|
||
var encoder = new PngBitmapEncoder();
|
||
encoder.Frames.Add(BitmapFrame.Create(image));
|
||
using var output = new MemoryStream();
|
||
encoder.Save(output);
|
||
return output.ToArray();
|
||
}
|
||
|
||
/// <summary>Writes <paramref name="bytes"/> at <paramref name="path"/>, its folder made first; the path.</summary>
|
||
public static string Write(string path, byte[] bytes)
|
||
{
|
||
Directory.CreateDirectory(Path.GetDirectoryName(path)!);
|
||
File.WriteAllBytes(path, bytes);
|
||
return path;
|
||
}
|
||
|
||
/// <summary>A store whose records are the ones given.</summary>
|
||
internal sealed class Store(string platform, params StoreGame[] games) : IStoreLibrarySource
|
||
{
|
||
public string Platform => platform;
|
||
|
||
public int Reads { get; private set; }
|
||
|
||
public ValueTask<IReadOnlyList<StoreGame>> ListAsync(CancellationToken ct = default)
|
||
{
|
||
Reads++;
|
||
return ValueTask.FromResult<IReadOnlyList<StoreGame>>(games);
|
||
}
|
||
}
|
||
|
||
/// <summary>A store app's artwork folder that answers the files given for one id.</summary>
|
||
internal sealed class ArtCache(string platform, string storeId, GameArtFiles files) : IStoreArtCache
|
||
{
|
||
public string Platform => platform;
|
||
|
||
public List<string> Asked { get; } = [];
|
||
|
||
public GameArtFiles Find(StoreGame record)
|
||
{
|
||
ArgumentNullException.ThrowIfNull(record);
|
||
Asked.Add(record.StoreId);
|
||
return string.Equals(record.StoreId, storeId, StringComparison.Ordinal) ? files : GameArtFiles.None;
|
||
}
|
||
}
|
||
}
|