[Windows] Rework flutter build helper
This commit is contained in:
@@ -3,7 +3,20 @@ $buildNumber = "$(Get-Date -Format 'yyyyMMddHHmmss')"
|
||||
|
||||
cd $PSScriptRoot
|
||||
|
||||
# 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
|
||||
|
||||
# Build the Windows application using Flutter
|
||||
flutter build windows --build-name=$buildName --build-number=$buildNumber
|
||||
# Build the Windows installer using Inno Setup Compiler (ISCC.exe)
|
||||
ISCC.exe ./busylight-buddy-windows-installer-builder.iss
|
||||
ISCC.exe $issFile
|
||||
Reference in New Issue
Block a user