mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 22:36:31 +00:00
updated zip and gdrive upload files.
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
# zip_full.ps1
|
||||
$host.UI.RawUI.WindowTitle = "Full Installer Zipper"
|
||||
Write-Host "`n===== [AZAION SUITE FULL PACKAGER] =====" -ForegroundColor Cyan
|
||||
|
||||
function Show-ProgressBar {
|
||||
param (
|
||||
[string]$Activity,
|
||||
[int]$Steps = 20,
|
||||
[int]$Delay = 30
|
||||
)
|
||||
|
||||
for ($i = 1; $i -le $Steps; $i++) {
|
||||
$percent = [math]::Round(($i / $Steps) * 100)
|
||||
$bar = ("#" * $i).PadRight($Steps)
|
||||
Write-Host -NoNewline "`r[PROGRESS] $Activity [$bar] $percent% "
|
||||
Start-Sleep -Milliseconds $Delay
|
||||
}
|
||||
Write-Host ""
|
||||
}
|
||||
|
||||
Write-Host "[INFO] Preparing to package Full installer..." -ForegroundColor Yellow
|
||||
|
||||
Set-Location -Path (Split-Path -Parent $MyInvocation.MyCommand.Path)
|
||||
Set-Location ..
|
||||
|
||||
$currentDir = Get-Location
|
||||
Write-Host "[INFO] Working directory: $currentDir" -ForegroundColor Gray
|
||||
|
||||
# Locate Full EXE
|
||||
$fullExe = Get-ChildItem -Filter "AzaionSuite.Full.*.exe" | Select-Object -First 1
|
||||
|
||||
if (-not $fullExe) {
|
||||
Write-Host "[ERROR] ❌ No Full build EXE found (AzaionSuite.Full.*.exe)" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host "[OK] ✅ Found Full EXE: $($fullExe.Name)" -ForegroundColor Green
|
||||
|
||||
# Match BIN files
|
||||
$baseName = [System.IO.Path]::GetFileNameWithoutExtension($fullExe.Name)
|
||||
$binFiles = Get-ChildItem -Filter "$baseName-*.bin"
|
||||
|
||||
if ($binFiles.Count -gt 0) {
|
||||
Write-Host "[INFO] Matching BIN files found:" -ForegroundColor Cyan
|
||||
$binFiles | ForEach-Object { Write-Host " - $_" -ForegroundColor DarkCyan }
|
||||
} else {
|
||||
Write-Host "[INFO] No BIN files found. Creating ZIP with only EXE." -ForegroundColor Yellow
|
||||
}
|
||||
|
||||
# Compose final ZIP path
|
||||
$zipName = "$baseName.zip"
|
||||
$zipPath = Join-Path -Path $currentDir -ChildPath $zipName
|
||||
|
||||
# Collect files to zip
|
||||
$toZip = @($fullExe.FullName)
|
||||
$toZip += $binFiles.FullName
|
||||
|
||||
Write-Host "[INFO] Creating ZIP file: $zipName" -ForegroundColor Yellow
|
||||
Show-ProgressBar -Activity "Compressing files..." -Steps 25 -Delay 25
|
||||
|
||||
try {
|
||||
Compress-Archive -Force -Path $toZip -DestinationPath $zipPath -Verbose
|
||||
Write-Host "[SUCCESS] 🎉 ZIP archive created successfully: $zipName" -ForegroundColor Green
|
||||
} catch {
|
||||
Write-Host "[ERROR] ❌ Failed to create ZIP archive: $_" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host "`n[FINISHED] ✅ Full installer packaging complete." -ForegroundColor Cyan
|
||||
Reference in New Issue
Block a user