fix(setup): handle install-folder services, startup entries, shared shortcuts and data
- Windows services whose program lies in the install folder (Titano.Server --install-service) are found in the registry and, through the Service Control Manager, stopped before files are replaced (they join the "programs running" prompt), started again after an upgrade that stopped them, deleted when an upgrade drops their program and on uninstall. An unelevated setup runs that step in an elevated copy (/SERVICES=...). - The Server component installs for all users only (manifest allUsersOnly): choosing it moves a new install to Program Files and disables "Just me" with the reason; a per-user install cannot take it. - Uninstall removes every HKCU Run value that starts a program in the folder (the Uploader's "Start with Windows"). - A shortcut that already starts an existing program elsewhere is neither retargeted nor logged, and a logged shortcut is deleted only while it still starts a program of this folder, so the two products no longer remove each other's "Titano Uploader" shortcuts. - "Remove my data" lists and deletes only the data of this product's programs that no other installed Titano product uses (the desktop app and the Uploader share %LOCALAPPDATA%\Titano and its logs folder). - The .titano file type is named in setup's language (Setup.FileType.*). Setup tests run in Titano.App.Tests on Windows CI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
32 files changed
+1175
-88
No files matched your search
@@ -155,6 +155,12 @@ public sealed class PayloadComponent
|
||||
|
||||
/// <summary>Installed size in bytes (sum of the component's files).</summary>
|
||||
public long EstimatedSize { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Installs only for all users (Program Files): the component runs as a Windows service under LocalSystem, which
|
||||
/// must not start a program from a folder its user can write to.
|
||||
/// </summary>
|
||||
public bool AllUsersOnly { get; init; }
|
||||
}
|
||||
|
||||
/// <summary>One installed file and where its bytes live in the data region.</summary>
|
||||
|
||||
@@ -5,8 +5,8 @@ using Titano.Core.IO;
|
||||
|
||||
namespace Titano.Core.Packaging;
|
||||
|
||||
/// <summary>A component to pack: its manifest identity and the folder whose whole tree it installs.</summary>
|
||||
public sealed record PayloadComponentSource(string Id, string DisplayName, bool DefaultSelected, string Folder);
|
||||
/// <summary>A component to pack: its manifest identity, the folder whose whole tree it installs and whether it needs an all-users install.</summary>
|
||||
public sealed record PayloadComponentSource(string Id, string DisplayName, bool DefaultSelected, string Folder, bool AllUsersOnly = false);
|
||||
|
||||
/// <summary>Everything the packer needs besides the setup program.</summary>
|
||||
public sealed class PayloadSource
|
||||
@@ -48,6 +48,7 @@ public static class PayloadWriter
|
||||
Id = c.Id,
|
||||
DisplayName = c.DisplayName,
|
||||
DefaultSelected = c.DefaultSelected,
|
||||
AllUsersOnly = c.AllUsersOnly,
|
||||
EstimatedSize = files.Where(f => f.Component == c.Id).Sum(f => f.Size),
|
||||
}).ToList();
|
||||
var manifest = new PayloadManifest
|
||||
|
||||
Reference in new issue
Block a user