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>
30 lines
864 B
C#
30 lines
864 B
C#
using System.Runtime.InteropServices;
|
|
using System.Windows;
|
|
using System.Windows.Interop;
|
|
|
|
namespace ClaudeDo.Installer.Core;
|
|
|
|
public static class DarkTitleBar
|
|
{
|
|
[DllImport("dwmapi.dll", PreserveSig = true)]
|
|
private static extern int DwmSetWindowAttribute(IntPtr hwnd, int attr, ref int attrValue, int attrSize);
|
|
|
|
private const int DWMWA_USE_IMMERSIVE_DARK_MODE = 20;
|
|
|
|
public static void Apply(Window window)
|
|
{
|
|
if (window.IsLoaded)
|
|
SetDarkMode(window);
|
|
else
|
|
window.SourceInitialized += (_, _) => SetDarkMode(window);
|
|
}
|
|
|
|
private static void SetDarkMode(Window window)
|
|
{
|
|
var hwnd = new WindowInteropHelper(window).Handle;
|
|
if (hwnd == IntPtr.Zero) return;
|
|
int value = 1;
|
|
DwmSetWindowAttribute(hwnd, DWMWA_USE_IMMERSIVE_DARK_MODE, ref value, sizeof(int));
|
|
}
|
|
}
|