feat(tools): add pack-installer command

Appends a TPK1 payload to Titano.Setup.exe from repeatable --component
Id=folder options, as release.yml invokes it. Known components (Titano,
Uploader, Server) get display names, default selection, Start menu/desktop
shortcuts and the .titano file type; prints file count and sizes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
Claude committed 2026-10-02 09:58:29 +00:00
1 parent fc8df1f411
commit c591aced94
3 files changed
+112 -2

No files matched your search

+2 -2
View File
@@ -100,7 +100,7 @@ public static class PayloadWriter
var root = Path.TrimEndingDirectorySeparator(Path.GetFullPath(component.Folder));
if (!Directory.Exists(root)) throw new DirectoryNotFoundException($"Component folder '{component.Folder}' does not exist.");
if (output.StartsWith(root + Path.DirectorySeparatorChar, StringComparison.OrdinalIgnoreCase))
throw new ArgumentException($"The installer cannot be written inside the component folder '{component.Folder}'.", nameof(output));
throw new ArgumentException($"The installer cannot be written inside the component folder '{component.Folder}'.");
inputs.AddRange(Directory.EnumerateFiles(root, "*", options)
.Select(f => new Input(component.Id, PayloadPath.FromRelative(Path.GetRelativePath(root, f)), f))
.OrderBy(i => i.Path, StringComparer.Ordinal));
@@ -189,7 +189,7 @@ public static class PayloadWriter
{
using (var stub = new FileStream(stubPath, FileMode.Open, FileAccess.Read, FileShare.Read, BufferSize))
{
if (PayloadReader.HasFooter(stub)) throw new ArgumentException($"'{stubPath}' already carries a payload; use the plain setup program.", nameof(stubPath));
if (PayloadReader.HasFooter(stub)) throw new ArgumentException($"'{stubPath}' already carries a payload; use the plain setup program.");
var buffer = ArrayPool<byte>.Shared.Rent(BufferSize);
try
{