Skip to content

Commit

Permalink
Merge pull request #1894 from mrpalide/fix/add-auto-step-version-on-w…
Browse files Browse the repository at this point in the history
…indows-installer

fix windows installer version
  • Loading branch information
mrpalide authored Oct 30, 2024
2 parents c9e01ae + e2d3126 commit 93ecf50
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/win_installer/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" UpgradeCode="cd7955bc-304e-470f-9c24-eb9f429a8085"
Name="Skywire"
Version="1.3.25"
Version="skywireVersion"
Manufacturer="Skycoin"
Language="1033">

Expand Down
9 changes: 8 additions & 1 deletion scripts/win_installer/script.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,22 @@ function BuildInstaller($arch)
Invoke-WebRequest "https://plaintext.ir/wintun-0.14.1.zip" -OutFile wintun.zip
Expand-Archive wintun.zip
Copy-Item .\wintun\wintun\bin\$wintun_arch\wintun.dll .\build\wintun.dll
$installerVersion = $version -replace '(-.*$)', ''
$productWxs = Get-Content -Path Product.wxs
$newContent = $productWxs -replace "skywireVersion", $installerVersion
Set-Content -Path Product.wxs -Value $newContent

Write-Output "# 5. Building MSI Installer... #"
.\wix\candle.exe UI.wxs Product.wxs -arch $wix_arch > $null
.\wix\candle.exe UI.wxs Product.wxs -arch $wix_arch > $null
.\wix\light.exe -ext WixUIExtension -ext WixUtilExtension -sacl -spdb -out skywire.msi UI.wixobj Product.wixobj > $null
Move-Item skywire.msi ../../$msiName.msi -Force

Write-Output "# ==> Build Completed for $arch_title! #"

Write-Output "# 6. Cleaning Stage... #"
$productWxs = Get-Content -Path Product.wxs
$newContent = $productWxs -replace $installerVersion, "skywireVersion"
Set-Content -Path Product.wxs -Value $newContent
Set-Location ../../
CleanStage

Expand Down

0 comments on commit 93ecf50

Please sign in to comment.