@@ -367,15 +367,25 @@ function Build-WiXProject()
367
367
[string ]$FileName ,
368
368
[Parameter (Mandatory = $true )]
369
369
[hashtable ]$Arch ,
370
+ [switch ]$Bundle ,
370
371
[hashtable ]$Properties = @ {}
371
372
)
372
373
373
374
$Name = $FileName.Split (' .' )[0 ]
374
375
$ArchName = $Arch.VSName
375
376
377
+ $ProductVersionArg = $ProductVersion
378
+ if (-not $Bundle )
379
+ {
380
+ # WiX v4 will accept a semantic version string for Bundles,
381
+ # but Packages still require a purely numerical version number,
382
+ # so trim any semantic versionning suffixes
383
+ $ProductVersionArg = [regex ]::Replace($ProductVersion , " [-+].*" , " " )
384
+ }
385
+
376
386
$Properties = $Properties.Clone ()
377
387
TryAdd- KeyValue $Properties ProductArchitecture $ArchName
378
- TryAdd- KeyValue $Properties ProductVersion $ProductVersion
388
+ TryAdd- KeyValue $Properties ProductVersion $ProductVersionArg
379
389
TryAdd- KeyValue $Properties RunWixToolsOutOfProc true
380
390
TryAdd- KeyValue $Properties OutputPath $Arch.MSIRoot
381
391
TryAdd- KeyValue $Properties IntermediateOutputPath BinaryCache\$Name \$ArchName \
@@ -1120,7 +1130,7 @@ function Build-Installer()
1120
1130
DEVTOOLS_ROOT = " $ ( $HostArch.ToolchainInstallRoot ) \" ;
1121
1131
}
1122
1132
1123
- Build-WiXProject installer.wixproj - Arch $HostArch - Properties @ {
1133
+ Build-WiXProject installer.wixproj - Arch $HostArch - Bundle - Properties @ {
1124
1134
OutputPath = " $BinaryCache \" ;
1125
1135
MSI_LOCATION = " $ ( $HostArch.MSIRoot ) \" ;
1126
1136
}
0 commit comments