feat(setup): add one-screen installer, uninstaller and silent mode
Titano.Setup reads the TPK1 payload from its own executable and installs per user (%LOCALAPPDATA%\Programs) or for all users (Program Files, relaunched elevated through ShellExecuteEx "runas"). Extraction is hash-verified into a staging folder and committed with rollback; upgrades replace files in place, remove obsolete ones and never touch %LOCALAPPDATA%\Titano. - Components, scope, folder (IFileOpenDialog picker), desktop and Start menu shortcuts (IShellLinkW), start-after-install, language picker - Add/Remove Programs entry, .titano file type, install log - /uninstall [/S] removes only logged files, shortcuts and registry entries; user data only when "Remove my data" is ticked; the uninstaller deletes itself through a temporary helper copy - Silent switches /S /DIR= /COMPONENTS= /ALLUSERS /NODESKTOP /NOSTARTMENU /LAUNCH /LANG= with documented exit codes; running programs are asked to close, never killed Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
25 files changed
+2183
-11
No files matched your search
@@ -0,0 +1,41 @@
|
||||
namespace Titano.Setup.Cli;
|
||||
|
||||
/// <summary>Process exit codes of Titano.Setup (stable contract for silent deployments).</summary>
|
||||
internal enum SetupExitCode
|
||||
{
|
||||
Success = 0,
|
||||
|
||||
/// <summary>Installation or removal did not complete; the setup log in %TEMP%\Titano Setup has details.</summary>
|
||||
Failed = 1,
|
||||
|
||||
InvalidArguments = 2,
|
||||
|
||||
/// <summary>The installer carries no payload or the payload is damaged.</summary>
|
||||
PayloadInvalid = 3,
|
||||
|
||||
/// <summary>All-users operation and the administrator prompt was declined.</summary>
|
||||
ElevationDeclined = 4,
|
||||
|
||||
/// <summary>An installed program did not close when asked to.</summary>
|
||||
ProgramRunning = 5,
|
||||
|
||||
/// <summary><c>/uninstall</c> found no installation.</summary>
|
||||
NotInstalled = 6,
|
||||
|
||||
DiskFull = 7,
|
||||
|
||||
/// <summary>The window was closed before anything changed.</summary>
|
||||
Cancelled = 8,
|
||||
|
||||
/// <summary>
|
||||
/// Internal: an instance relaunched with administrator rights finished and asks its unelevated parent to start
|
||||
/// the program, so the program does not run elevated. The parent turns it into <see cref="Success"/>.
|
||||
/// </summary>
|
||||
LaunchRequested = 100,
|
||||
}
|
||||
|
||||
/// <summary>A setup failure that maps to a specific exit code and message.</summary>
|
||||
internal sealed class SetupException(SetupExitCode code, string message) : Exception(message)
|
||||
{
|
||||
public SetupExitCode Code { get; } = code;
|
||||
}
|
||||
Reference in new issue
Block a user