diff --git a/src/ClaudeDo.Installer/App.xaml.cs b/src/ClaudeDo.Installer/App.xaml.cs index 0388aa0..093f7af 100644 --- a/src/ClaudeDo.Installer/App.xaml.cs +++ b/src/ClaudeDo.Installer/App.xaml.cs @@ -54,9 +54,6 @@ public partial class App : Application sc.AddSingleton(); // Steps (registration order = execution order) - sc.AddSingleton(); - sc.AddSingleton(); - sc.AddSingleton(); sc.AddSingleton(); sc.AddSingleton(); sc.AddSingleton(); diff --git a/src/ClaudeDo.Installer/Steps/DeployBinariesStep.cs b/src/ClaudeDo.Installer/Steps/DeployBinariesStep.cs deleted file mode 100644 index da65934..0000000 --- a/src/ClaudeDo.Installer/Steps/DeployBinariesStep.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System.IO; -using ClaudeDo.Installer.Core; - -namespace ClaudeDo.Installer.Steps; - -public sealed class DeployBinariesStep : IInstallStep -{ - public string Name => "Deploy Binaries"; - - public Task ExecuteAsync(InstallContext ctx, IProgress progress, CancellationToken ct) - { - try - { - var appPublish = Path.Combine(ctx.SourceDirectory, "src", "ClaudeDo.App", "bin", "Release", "net8.0", "win-x64", "publish"); - var workerPublish = Path.Combine(ctx.SourceDirectory, "src", "ClaudeDo.Worker", "bin", "Release", "net8.0", "win-x64", "publish"); - - var appDest = Path.Combine(ctx.InstallDirectory, "app"); - var workerDest = Path.Combine(ctx.InstallDirectory, "worker"); - - if (!Directory.Exists(appPublish)) - return Task.FromResult(StepResult.Fail($"App publish directory not found: {appPublish}")); - if (!Directory.Exists(workerPublish)) - return Task.FromResult(StepResult.Fail($"Worker publish directory not found: {workerPublish}")); - - var appCount = CopyDirectory(appPublish, appDest, progress, ct); - progress.Report($"Copied {appCount} files to {appDest}"); - - var workerCount = CopyDirectory(workerPublish, workerDest, progress, ct); - progress.Report($"Copied {workerCount} files to {workerDest}"); - - return Task.FromResult(StepResult.Ok()); - } - catch (Exception ex) - { - return Task.FromResult(StepResult.Fail(ex.Message)); - } - } - - private static int CopyDirectory(string source, string dest, IProgress progress, CancellationToken ct) - { - Directory.CreateDirectory(dest); - var count = 0; - - foreach (var dir in Directory.GetDirectories(source, "*", SearchOption.AllDirectories)) - { - ct.ThrowIfCancellationRequested(); - var relative = Path.GetRelativePath(source, dir); - Directory.CreateDirectory(Path.Combine(dest, relative)); - } - - foreach (var file in Directory.GetFiles(source, "*", SearchOption.AllDirectories)) - { - ct.ThrowIfCancellationRequested(); - var relative = Path.GetRelativePath(source, file); - var destFile = Path.Combine(dest, relative); - File.Copy(file, destFile, overwrite: true); - count++; - } - - return count; - } -} diff --git a/src/ClaudeDo.Installer/Steps/PublishAppStep.cs b/src/ClaudeDo.Installer/Steps/PublishAppStep.cs deleted file mode 100644 index 91eb1da..0000000 --- a/src/ClaudeDo.Installer/Steps/PublishAppStep.cs +++ /dev/null @@ -1,20 +0,0 @@ -using ClaudeDo.Installer.Core; - -namespace ClaudeDo.Installer.Steps; - -public sealed class PublishAppStep : IInstallStep -{ - public string Name => "Publish ClaudeDo.App"; - - public async Task ExecuteAsync(InstallContext ctx, IProgress progress, CancellationToken ct) - { - progress.Report("Publishing ClaudeDo.App..."); - - var args = "publish src/ClaudeDo.App/ClaudeDo.App.csproj -c Release -r win-x64 --self-contained false"; - var (exitCode, output) = await ProcessRunner.RunAsync("dotnet", args, ctx.SourceDirectory, progress, ct); - - return exitCode == 0 - ? StepResult.Ok() - : StepResult.Fail($"dotnet publish failed with exit code {exitCode}"); - } -} diff --git a/src/ClaudeDo.Installer/Steps/PublishWorkerStep.cs b/src/ClaudeDo.Installer/Steps/PublishWorkerStep.cs deleted file mode 100644 index 0906e60..0000000 --- a/src/ClaudeDo.Installer/Steps/PublishWorkerStep.cs +++ /dev/null @@ -1,20 +0,0 @@ -using ClaudeDo.Installer.Core; - -namespace ClaudeDo.Installer.Steps; - -public sealed class PublishWorkerStep : IInstallStep -{ - public string Name => "Publish ClaudeDo.Worker"; - - public async Task ExecuteAsync(InstallContext ctx, IProgress progress, CancellationToken ct) - { - progress.Report("Publishing ClaudeDo.Worker..."); - - var args = "publish src/ClaudeDo.Worker/ClaudeDo.Worker.csproj -c Release -r win-x64 --self-contained false"; - var (exitCode, output) = await ProcessRunner.RunAsync("dotnet", args, ctx.SourceDirectory, progress, ct); - - return exitCode == 0 - ? StepResult.Ok() - : StepResult.Fail($"dotnet publish failed with exit code {exitCode}"); - } -}