Standalone WPF app (ClaudeDo.Installer) that handles full installation and ongoing configuration of ClaudeDo. Two modes: wizard for first run, tabbed settings panel for subsequent launches. Page-based extensibility via IInstallerPage interface — adding new config sections requires only one new class. Install pipeline: dotnet publish, deploy binaries, write configs, init DB (via SchemaInitializer from ClaudeDo.Data), register Windows Service, create shortcuts. Dark theme matching the Avalonia app (forest teal accent). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
29 lines
825 B
C#
29 lines
825 B
C#
using ClaudeDo.Data;
|
|
using ClaudeDo.Installer.Core;
|
|
|
|
namespace ClaudeDo.Installer.Steps;
|
|
|
|
public sealed class InitDatabaseStep : IInstallStep
|
|
{
|
|
public string Name => "Initialize Database";
|
|
|
|
public Task<StepResult> ExecuteAsync(InstallContext ctx, IProgress<string> progress, CancellationToken ct)
|
|
{
|
|
try
|
|
{
|
|
var expandedPath = Paths.Expand(ctx.DbPath);
|
|
progress.Report($"Initializing database at {expandedPath}");
|
|
|
|
var factory = new SqliteConnectionFactory(expandedPath);
|
|
SchemaInitializer.Apply(factory);
|
|
|
|
progress.Report("Schema applied successfully");
|
|
return Task.FromResult(StepResult.Ok());
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Task.FromResult(StepResult.Fail(ex.Message));
|
|
}
|
|
}
|
|
}
|