Merge branch 'fix/setup-bundle': .titano project files, per-machine server, services and Run entries handled by setup, per-product data removal
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
49 files changed
+2741
-128
No files matched your search
@@ -60,11 +60,14 @@ internal sealed partial class ChangelogCommand : ICommand
|
||||
|
||||
var sb = new StringBuilder();
|
||||
if (title is not null) sb.Append("# ").AppendLine(title).AppendLine();
|
||||
// The title alone says nothing about the release: the fallback depends on the entries written, not on the text.
|
||||
var written = false;
|
||||
if (breaking.Count > 0)
|
||||
{
|
||||
sb.AppendLine("### Breaking changes");
|
||||
foreach (var e in breaking) sb.AppendLine(e);
|
||||
sb.AppendLine();
|
||||
written = true;
|
||||
}
|
||||
foreach (var (type, heading) in Sections)
|
||||
{
|
||||
@@ -72,8 +75,9 @@ internal sealed partial class ChangelogCommand : ICommand
|
||||
sb.Append("### ").AppendLine(heading);
|
||||
foreach (var e in entries) sb.AppendLine(e);
|
||||
sb.AppendLine();
|
||||
written = true;
|
||||
}
|
||||
if (sb.Length == 0) sb.AppendLine("Maintenance release.");
|
||||
if (!written) sb.AppendLine("Maintenance release.");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
|
||||
@@ -6,18 +6,20 @@ namespace Titano.Tools.Commands;
|
||||
/// <summary>
|
||||
/// <c>pack-installer --setup Titano.Setup.exe --product Titano --version 1.2.3 --component Id=folder … --out file</c>:
|
||||
/// appends a TPK1 payload (BRIEF §18) to the setup program. Known component ids carry their display name, default
|
||||
/// selection, shortcuts and file types; unknown ids are packed as plain, preselected components.
|
||||
/// selection, shortcuts and file types; unknown ids are packed as plain, preselected components. The Server
|
||||
/// installs only for all users: it is registered as a LocalSystem service, which must run from Program Files.
|
||||
/// </summary>
|
||||
internal sealed class PackInstallerCommand : ICommand
|
||||
{
|
||||
private sealed record KnownComponent(string DisplayName, bool DefaultSelected, string Program, bool Desktop, PayloadAssociation? Association);
|
||||
private sealed record KnownComponent(string DisplayName, bool DefaultSelected, string Program, bool Desktop, PayloadAssociation? Association, bool AllUsersOnly = false);
|
||||
|
||||
/// <remarks>The file type's description is the English fallback; setup writes it in its own language (<c>Setup.FileType.*</c>).</remarks>
|
||||
private static readonly Dictionary<string, KnownComponent> Known = new(StringComparer.OrdinalIgnoreCase)
|
||||
{
|
||||
["Titano"] = new("Titano", true, "Titano.exe", Desktop: true,
|
||||
new PayloadAssociation { Component = "Titano", Extension = ".titano", ProgId = "Titano.Project", Description = "Titano project", Target = "Titano.exe" }),
|
||||
["Uploader"] = new("Titano Uploader", true, "Titano.Uploader.exe", Desktop: true, null),
|
||||
["Server"] = new("Titano Server", false, "Titano.Server.exe", Desktop: false, null),
|
||||
["Server"] = new("Titano Server", false, "Titano.Server.exe", Desktop: false, null, AllUsersOnly: true),
|
||||
};
|
||||
|
||||
public string Name => "pack-installer";
|
||||
@@ -49,7 +51,7 @@ internal sealed class PackInstallerCommand : ICommand
|
||||
components.Add(new PayloadComponentSource(id, id, true, folder));
|
||||
continue;
|
||||
}
|
||||
components.Add(new PayloadComponentSource(id, known.DisplayName, known.DefaultSelected, folder));
|
||||
components.Add(new PayloadComponentSource(id, known.DisplayName, known.DefaultSelected, folder, known.AllUsersOnly));
|
||||
if (!File.Exists(Path.Combine(folder, known.Program)))
|
||||
{
|
||||
Console.Error.WriteLine($"warning: {id} has no {known.Program}; no shortcut or file type registered.");
|
||||
|
||||
Reference in new issue
Block a user