feat: add portable mode support and improve update handling
- Add portable.ini marker file creation in GitHub Actions for portable builds - Implement is_portable_mode() command to detect portable execution - Redirect portable users to GitHub releases page for manual updates - Change update URL to point to latest releases page - Integrate portable mode detection in Settings UI
This commit is contained in:
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
@@ -226,6 +226,12 @@ jobs:
|
||||
$portableDir = 'release-assets/CC-Switch-Portable'
|
||||
New-Item -ItemType Directory -Force -Path $portableDir | Out-Null
|
||||
Copy-Item $exePath $portableDir
|
||||
$portableIniPath = Join-Path $portableDir 'portable.ini'
|
||||
$portableContent = @(
|
||||
'# CC Switch portable build marker',
|
||||
'portable=true'
|
||||
)
|
||||
$portableContent | Set-Content -Path $portableIniPath -Encoding UTF8
|
||||
Compress-Archive -Path "$portableDir/*" -DestinationPath 'release-assets/CC-Switch-Windows-Portable.zip' -Force
|
||||
Remove-Item -Recurse -Force $portableDir
|
||||
Write-Host 'Windows portable zip created'
|
||||
|
||||
Reference in New Issue
Block a user