-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.ps1
30 lines (26 loc) · 1.19 KB
/
build.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
$candlePath = Get-Command candle.exe | Select-Object -ExpandProperty Source
$lightPath = Get-Command light.exe | Select-Object -ExpandProperty Source
$majorVersion = "1"
$minorVersion = "0"
$patchVersion = "0"
try {
$productWxsFileName = "Product.wxs"
$applicationWxsFileName = "Application.wxs"
$productWixobjFileName = "Product.wixobj"
$applicationWixobjFileName = "Application.wixobj"
$msiFileName = "Product.msi"
$applicationName = "ComposeMultiplatformProject"
$startupProgramName = "ComposeMultiplatformProject"
$manufacturer = "My Manufacturer Name"
& "$candlePath" -dApplicationName="$applicationName" -dStartupProgramName="$startupProgramName" -dManufacturer="$manufacturer" -dMajorVersion="$majorVersion" -dMinorVersion="$minorVersion" -dPatchVersion="$patchVersion" -dPlatform=x64 -arch x64 $productWxsFileName $applicationWxsFileName
& "$lightPath" -ext WixUIExtension -ext WixUtilExtension -cultures:zh-CN -sice:ICE38 -sice:ICE64 -sice:ICE91 $productWixobjFileName $applicationWixobjFileName -out $msiFileName
}
catch {
Write-Error $_
exit 1
}
finally {
Remove-Item Product.wixobj
Remove-Item Application.wixobj
Remove-Item Product.wixpdb
}