From 1567bab16b1eeb8ddaf5a8cc09c71bdb0bedbda3 Mon Sep 17 00:00:00 2001 From: Weicao-CatilGrass <1992414357@qq.com> Date: Wed, 10 Dec 2025 10:49:52 +0800 Subject: Add Windows installer and export scripts - Add Inno Setup configuration for Windows installer - Add PowerShell scripts for installation and uninstallation - Create Windows-specific export script - Update existing export script to suppress build output - Include application icon for installer --- setup/windows/uninst.ps1 | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 setup/windows/uninst.ps1 (limited to 'setup/windows/uninst.ps1') diff --git a/setup/windows/uninst.ps1 b/setup/windows/uninst.ps1 new file mode 100644 index 0000000..d5c898d --- /dev/null +++ b/setup/windows/uninst.ps1 @@ -0,0 +1,39 @@ +$profileContent = Get-Content $PROFILE -ErrorAction SilentlyContinue +if ($profileContent) { + $startMarker = "# JustEnoughVCS - Begin #" + $endMarker = "# JustEnoughVCS - End #" + $newContent = @() + $insideBlock = $false + $foundStart = $false + + foreach ($line in $profileContent) { + if ($line.Trim() -eq $startMarker) { + $insideBlock = $true + $foundStart = $true + continue + } + if ($line.Trim() -eq $endMarker) { + $insideBlock = $false + continue + } + if (-not $insideBlock) { + $newContent += $line + } + } + + if ($foundStart -and $insideBlock) { + $newContent = @() + $insideBlock = $false + foreach ($line in $profileContent) { + if ($line.Trim() -eq $startMarker) { + $insideBlock = $true + continue + } + if (-not $insideBlock) { + $newContent += $line + } + } + } + + $newContent | Set-Content $PROFILE +} -- cgit