Compare commits
11
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d2cb75a8dc | ||
|
|
01188b3009 | ||
|
|
54b89b8e55 | ||
|
|
24dbf013e7 | ||
|
|
5a799899ef | ||
|
|
f318713ba5 | ||
|
|
b9d2c8a5f3 | ||
|
|
8883000098 | ||
|
|
a8acf734ed | ||
|
|
c432355be1 | ||
|
|
9d3a06bf7a |
@@ -30,15 +30,14 @@ jobs:
|
|||||||
dotnet publish windows/ClaudeCheckerWindows.csproj `
|
dotnet publish windows/ClaudeCheckerWindows.csproj `
|
||||||
-c Release -r win-x64 `
|
-c Release -r win-x64 `
|
||||||
--self-contained true `
|
--self-contained true `
|
||||||
-p:PublishSingleFile=true `
|
|
||||||
-p:Version=${{ steps.version.outputs.version }} `
|
-p:Version=${{ steps.version.outputs.version }} `
|
||||||
-o publish
|
-o publish
|
||||||
|
|
||||||
- name: Zip
|
- name: Build installer
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
Copy-Item -Recurse windows/Assets publish/Assets
|
Copy-Item -Recurse windows/Assets publish/Assets
|
||||||
Compress-Archive -Path publish/* -DestinationPath ClaudeChecker-Windows.zip
|
& "C:\Program Files (x86)\Inno Setup 6\iscc.exe" /DAppVersion="${{ steps.version.outputs.version }}" windows\installer.iss
|
||||||
|
|
||||||
- name: Create GitHub pre-release
|
- name: Create GitHub pre-release
|
||||||
env:
|
env:
|
||||||
@@ -46,7 +45,7 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
notes=$(cat windows/RELEASE_NOTES.md 2>/dev/null || echo "Windows beta ${{ steps.version.outputs.version }}")
|
notes=$(cat windows/RELEASE_NOTES.md 2>/dev/null || echo "Windows beta ${{ steps.version.outputs.version }}")
|
||||||
gh release create "$GITHUB_REF_NAME" ClaudeChecker-Windows.zip \
|
gh release create "$GITHUB_REF_NAME" ClaudeChecker-Installer.exe \
|
||||||
--title "$GITHUB_REF_NAME" \
|
--title "$GITHUB_REF_NAME" \
|
||||||
--prerelease \
|
--prerelease \
|
||||||
--notes "$notes"
|
--notes "$notes"
|
||||||
@@ -59,7 +58,7 @@ jobs:
|
|||||||
notes=$(cat windows/RELEASE_NOTES.md 2>/dev/null || echo "Windows beta ${{ steps.version.outputs.version }}")
|
notes=$(cat windows/RELEASE_NOTES.md 2>/dev/null || echo "Windows beta ${{ steps.version.outputs.version }}")
|
||||||
content=$(jq -n \
|
content=$(jq -n \
|
||||||
--arg version "${{ steps.version.outputs.version }}" \
|
--arg version "${{ steps.version.outputs.version }}" \
|
||||||
--arg url "https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/ClaudeChecker-Windows.zip" \
|
--arg url "https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/ClaudeChecker-Installer.exe" \
|
||||||
--arg notes "$notes" \
|
--arg notes "$notes" \
|
||||||
'{version: $version, url: $url, notes: $notes}' | base64 -w0)
|
'{version: $version, url: $url, notes: $notes}' | base64 -w0)
|
||||||
sha=$(gh api "repos/${{ github.repository }}/contents/version-windows-beta.json?ref=main" --jq .sha 2>/dev/null || echo "")
|
sha=$(gh api "repos/${{ github.repository }}/contents/version-windows-beta.json?ref=main" --jq .sha 2>/dev/null || echo "")
|
||||||
|
|||||||
@@ -31,15 +31,14 @@ jobs:
|
|||||||
dotnet publish windows/ClaudeCheckerWindows.csproj `
|
dotnet publish windows/ClaudeCheckerWindows.csproj `
|
||||||
-c Release -r win-x64 `
|
-c Release -r win-x64 `
|
||||||
--self-contained true `
|
--self-contained true `
|
||||||
-p:PublishSingleFile=true `
|
|
||||||
-p:Version=${{ steps.version.outputs.version }} `
|
-p:Version=${{ steps.version.outputs.version }} `
|
||||||
-o publish
|
-o publish
|
||||||
|
|
||||||
- name: Zip
|
- name: Build installer
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
Copy-Item -Recurse windows/Assets publish/Assets
|
Copy-Item -Recurse windows/Assets publish/Assets
|
||||||
Compress-Archive -Path publish/* -DestinationPath ClaudeChecker-Windows.zip
|
& "C:\Program Files (x86)\Inno Setup 6\iscc.exe" /DAppVersion="${{ steps.version.outputs.version }}" windows\installer.iss
|
||||||
|
|
||||||
- name: Create GitHub release
|
- name: Create GitHub release
|
||||||
env:
|
env:
|
||||||
@@ -47,7 +46,7 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
notes=$(cat windows/RELEASE_NOTES.md 2>/dev/null || echo "Windows release ${{ steps.version.outputs.version }}")
|
notes=$(cat windows/RELEASE_NOTES.md 2>/dev/null || echo "Windows release ${{ steps.version.outputs.version }}")
|
||||||
gh release create "$GITHUB_REF_NAME" ClaudeChecker-Windows.zip \
|
gh release create "$GITHUB_REF_NAME" ClaudeChecker-Installer.exe \
|
||||||
--title "$GITHUB_REF_NAME" \
|
--title "$GITHUB_REF_NAME" \
|
||||||
--notes "$notes"
|
--notes "$notes"
|
||||||
|
|
||||||
@@ -59,7 +58,7 @@ jobs:
|
|||||||
notes=$(cat windows/RELEASE_NOTES.md 2>/dev/null || echo "Windows release ${{ steps.version.outputs.version }}")
|
notes=$(cat windows/RELEASE_NOTES.md 2>/dev/null || echo "Windows release ${{ steps.version.outputs.version }}")
|
||||||
content=$(jq -n \
|
content=$(jq -n \
|
||||||
--arg version "${{ steps.version.outputs.version }}" \
|
--arg version "${{ steps.version.outputs.version }}" \
|
||||||
--arg url "https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/ClaudeChecker-Windows.zip" \
|
--arg url "https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/ClaudeChecker-Installer.exe" \
|
||||||
--arg notes "$notes" \
|
--arg notes "$notes" \
|
||||||
'{version: $version, url: $url, notes: $notes}' | base64 -w0)
|
'{version: $version, url: $url, notes: $notes}' | base64 -w0)
|
||||||
sha=$(gh api "repos/${{ github.repository }}/contents/version-windows.json?ref=main" --jq .sha 2>/dev/null || echo "")
|
sha=$(gh api "repos/${{ github.repository }}/contents/version-windows.json?ref=main" --jq .sha 2>/dev/null || echo "")
|
||||||
|
|||||||
@@ -495,8 +495,21 @@ public partial class PopupWindow : Window
|
|||||||
|
|
||||||
private void CopyDiag_Click(object s, RoutedEventArgs e)
|
private void CopyDiag_Click(object s, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
Clipboard.SetText(BuildDiagText());
|
try
|
||||||
CopyDiagButton.Content = "Copied! (IDs redacted)";
|
{
|
||||||
|
// SetDataObject(data, false) skips Flush() — avoids CLIPBRD_E_CANT_OPEN crash
|
||||||
|
var diagText = BuildDiagText();
|
||||||
|
for (int i = 0; i < 5; i++)
|
||||||
|
{
|
||||||
|
try { Clipboard.SetDataObject(diagText, false); break; }
|
||||||
|
catch (Exception) { System.Threading.Thread.Sleep(100); }
|
||||||
|
}
|
||||||
|
CopyDiagButton.Content = "Copied! (IDs redacted)";
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
CopyDiagButton.Content = "Copy failed";
|
||||||
|
}
|
||||||
var t = new DispatcherTimer { Interval = TimeSpan.FromSeconds(1.5) };
|
var t = new DispatcherTimer { Interval = TimeSpan.FromSeconds(1.5) };
|
||||||
t.Tick += (_, _) => { CopyDiagButton.Content = "Copy All"; t.Stop(); };
|
t.Tick += (_, _) => { CopyDiagButton.Content = "Copy All"; t.Stop(); };
|
||||||
t.Start();
|
t.Start();
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ using System;
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.IO.Compression;
|
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -136,9 +135,7 @@ public class UpdateManager : INotifyPropertyChanged
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var tmpDir = Path.Combine(Path.GetTempPath(), $"CCUpdate_{Guid.NewGuid():N}");
|
var installerPath = Path.Combine(Path.GetTempPath(), $"ClaudeCheckerInstaller_{Guid.NewGuid():N}.exe");
|
||||||
Directory.CreateDirectory(tmpDir);
|
|
||||||
var zipPath = Path.Combine(tmpDir, "ClaudeChecker.zip");
|
|
||||||
|
|
||||||
using var http = new HttpClient();
|
using var http = new HttpClient();
|
||||||
var response = await http.GetAsync(DownloadUrl, HttpCompletionOption.ResponseHeadersRead);
|
var response = await http.GetAsync(DownloadUrl, HttpCompletionOption.ResponseHeadersRead);
|
||||||
@@ -148,7 +145,7 @@ public class UpdateManager : INotifyPropertyChanged
|
|||||||
var received = 0L;
|
var received = 0L;
|
||||||
|
|
||||||
await using (var stream = await response.Content.ReadAsStreamAsync())
|
await using (var stream = await response.Content.ReadAsStreamAsync())
|
||||||
await using (var file = File.Create(zipPath))
|
await using (var file = File.Create(installerPath))
|
||||||
{
|
{
|
||||||
var buffer = new byte[81920];
|
var buffer = new byte[81920];
|
||||||
int read;
|
int read;
|
||||||
@@ -157,48 +154,21 @@ public class UpdateManager : INotifyPropertyChanged
|
|||||||
await file.WriteAsync(buffer.AsMemory(0, read));
|
await file.WriteAsync(buffer.AsMemory(0, read));
|
||||||
received += read;
|
received += read;
|
||||||
if (total > 0)
|
if (total > 0)
|
||||||
DownloadProgress = (double)received / total * 0.8;
|
DownloadProgress = (double)received / total;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusMessage = "Unpacking…";
|
|
||||||
DownloadProgress = 0.85;
|
|
||||||
|
|
||||||
var extractDir = Path.Combine(tmpDir, "extracted");
|
|
||||||
ZipFile.ExtractToDirectory(zipPath, extractDir, overwriteFiles: true);
|
|
||||||
|
|
||||||
// Find the installer exe
|
|
||||||
var newExe = FindExe(extractDir);
|
|
||||||
if (newExe == null) throw new Exception("ClaudeChecker.exe not found in update package.");
|
|
||||||
|
|
||||||
DownloadProgress = 0.95;
|
|
||||||
StatusMessage = "Installing…";
|
|
||||||
|
|
||||||
// Write a batch script to replace the exe after we exit
|
|
||||||
var currentExe = Process.GetCurrentProcess().MainModule!.FileName;
|
|
||||||
var script = $"""
|
|
||||||
@echo off
|
|
||||||
timeout /t 2 /nobreak > nul
|
|
||||||
copy /Y "{newExe}" "{currentExe}"
|
|
||||||
start "" "{currentExe}"
|
|
||||||
rmdir /S /Q "{tmpDir}"
|
|
||||||
""";
|
|
||||||
|
|
||||||
var scriptPath = Path.Combine(Path.GetTempPath(), "claudechecker_update.bat");
|
|
||||||
await File.WriteAllTextAsync(scriptPath, script);
|
|
||||||
|
|
||||||
DownloadProgress = 1.0;
|
DownloadProgress = 1.0;
|
||||||
StatusMessage = "Installed! Relaunching…";
|
StatusMessage = "Installing…";
|
||||||
UpdateComplete = true;
|
UpdateComplete = true;
|
||||||
|
|
||||||
await Task.Delay(800);
|
await Task.Delay(500);
|
||||||
|
|
||||||
Process.Start(new ProcessStartInfo
|
Process.Start(new ProcessStartInfo
|
||||||
{
|
{
|
||||||
FileName = "cmd.exe",
|
FileName = installerPath,
|
||||||
Arguments = $"/C \"{scriptPath}\"",
|
Arguments = "/SILENT /CLOSEAPPLICATIONS",
|
||||||
CreateNoWindow = true,
|
UseShellExecute = true,
|
||||||
UseShellExecute = false,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Application.Current.Dispatcher.Invoke(() => Application.Current.Shutdown());
|
Application.Current.Dispatcher.Invoke(() => Application.Current.Shutdown());
|
||||||
@@ -211,13 +181,6 @@ public class UpdateManager : INotifyPropertyChanged
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string? FindExe(string dir)
|
|
||||||
{
|
|
||||||
foreach (var f in Directory.EnumerateFiles(dir, "ClaudeChecker.exe", SearchOption.AllDirectories))
|
|
||||||
return f;
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool IsNewer(string version, string current)
|
public static bool IsNewer(string version, string current)
|
||||||
{
|
{
|
||||||
static (int[] Base, int[]? Pre) Parse(string v)
|
static (int[] Base, int[]? Pre) Parse(string v)
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
#ifndef AppVersion
|
||||||
|
#define AppVersion "0.0.1"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
[Setup]
|
||||||
|
AppName=ClaudeChecker
|
||||||
|
AppVersion={#AppVersion}
|
||||||
|
AppPublisher=superdooper86
|
||||||
|
AppPublisherURL=https://github.com/superdooper86/claudechecker
|
||||||
|
AppSupportURL=https://github.com/superdooper86/claudechecker/issues
|
||||||
|
AppUpdatesURL=https://github.com/superdooper86/claudechecker/releases
|
||||||
|
DefaultDirName={localappdata}\ClaudeChecker
|
||||||
|
DefaultGroupName=ClaudeChecker
|
||||||
|
DisableProgramGroupPage=yes
|
||||||
|
PrivilegesRequired=lowest
|
||||||
|
OutputDir=.
|
||||||
|
OutputBaseFilename=ClaudeChecker-Installer
|
||||||
|
Compression=lzma
|
||||||
|
SolidCompression=yes
|
||||||
|
WizardStyle=modern
|
||||||
|
UninstallDisplayIcon={app}\ClaudeChecker.exe
|
||||||
|
SourceDir=..
|
||||||
|
|
||||||
|
[Languages]
|
||||||
|
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||||
|
|
||||||
|
[Tasks]
|
||||||
|
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
||||||
|
|
||||||
|
[Files]
|
||||||
|
Source: "publish\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs
|
||||||
|
|
||||||
|
[Icons]
|
||||||
|
Name: "{group}\ClaudeChecker"; Filename: "{app}\ClaudeChecker.exe"
|
||||||
|
Name: "{userdesktop}\ClaudeChecker"; Filename: "{app}\ClaudeChecker.exe"; Tasks: desktopicon
|
||||||
|
|
||||||
|
[Run]
|
||||||
|
; Silent install (auto-update): launch automatically
|
||||||
|
Filename: "{app}\ClaudeChecker.exe"; Flags: nowait; Check: WizardSilent
|
||||||
|
; Manual install: show launch checkbox on final page
|
||||||
|
Filename: "{app}\ClaudeChecker.exe"; Description: "{cm:LaunchProgram,ClaudeChecker}"; Flags: nowait postinstall skipifsilent
|
||||||
Reference in New Issue
Block a user