2026-03-25 12:59:00 +01:00
|
|
|
$buildName = if ($args[1]) { $args[1] } else { "0.0.0" }
|
2026-03-25 17:58:44 +01:00
|
|
|
$buildNumber = "$(Get-Date -Format 'yyyyMMddHHmmss')"
|
2026-03-25 12:59:00 +01:00
|
|
|
|
2026-03-25 12:27:33 +01:00
|
|
|
cd $PSScriptRoot
|
|
|
|
|
|
2026-03-25 18:21:17 +01:00
|
|
|
# Define the file path and the new version value
|
|
|
|
|
$issTplFile = "./busylight-buddy-windows-installer-builder.iss.tpl"
|
|
|
|
|
$issFile = "./busylight-buddy-windows-installer-builder.iss"
|
|
|
|
|
|
|
|
|
|
# Read the content of the file
|
|
|
|
|
$content = Get-Content -Path $issTplFile -Raw
|
|
|
|
|
|
|
|
|
|
# Replace the placeholder with the new version value
|
|
|
|
|
$updatedContent = $content -replace '%%MyAppVersion%%', $buildName
|
|
|
|
|
|
|
|
|
|
# Write the updated content back to the file
|
|
|
|
|
$updatedContent | Set-Content -Path $issFile
|
|
|
|
|
|
2026-03-25 12:27:33 +01:00
|
|
|
# Build the Windows application using Flutter
|
2026-03-25 12:59:00 +01:00
|
|
|
flutter build windows --build-name=$buildName --build-number=$buildNumber
|
2026-03-25 12:27:33 +01:00
|
|
|
# Build the Windows installer using Inno Setup Compiler (ISCC.exe)
|
2026-03-25 18:21:17 +01:00
|
|
|
ISCC.exe $issFile
|