diff options
| author | Weicao-CatilGrass <1992414357@qq.com> | 2025-12-10 10:49:52 +0800 |
|---|---|---|
| committer | Weicao-CatilGrass <1992414357@qq.com> | 2025-12-10 10:49:52 +0800 |
| commit | 1567bab16b1eeb8ddaf5a8cc09c71bdb0bedbda3 (patch) | |
| tree | c5cc7c708207f3dae1b921c9d576d299a55be1b4 /setup/windows/uninst.ps1 | |
| parent | 5fd3992ff8eea62967288c639985bfe60b9a171b (diff) | |
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
Diffstat (limited to 'setup/windows/uninst.ps1')
| -rw-r--r-- | setup/windows/uninst.ps1 | 39 |
1 files changed, 39 insertions, 0 deletions
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 +} |
