mirror of
https://github.com/zealdocs/zeal.git
synced 2024-11-26 15:43:49 +03:00
build(wix): add dev build mode
This commit is contained in:
parent
bbb7c6fbf7
commit
7b5fcbe4c2
@ -1,5 +1,4 @@
|
|||||||
# TODO: This script should be replaced with wixproj and/or CPack.
|
# TODO: This script should be replaced with wixproj and/or CPack.
|
||||||
# TODO: Add Debug mode to override CompressionLevel with "none".
|
|
||||||
|
|
||||||
# Sample command:
|
# Sample command:
|
||||||
# .\build.ps1 -Arch x64 -Version 0.4.0 -PackagePath "c:\tmp\zeal-0.4.0-windows-x64" -SignMsi
|
# .\build.ps1 -Arch x64 -Version 0.4.0 -PackagePath "c:\tmp\zeal-0.4.0-windows-x64" -SignMsi
|
||||||
@ -16,6 +15,7 @@ param(
|
|||||||
[Parameter(Mandatory=$True)]
|
[Parameter(Mandatory=$True)]
|
||||||
[string]$PackagePath,
|
[string]$PackagePath,
|
||||||
|
|
||||||
|
[Switch]$DevBuild,
|
||||||
[Switch]$SignMsi
|
[Switch]$SignMsi
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -32,8 +32,12 @@ function CleanUp {
|
|||||||
|
|
||||||
Write-Output "Building $MsiFilename..."
|
Write-Output "Building $MsiFilename..."
|
||||||
|
|
||||||
|
if ($DevBuild) {
|
||||||
|
$compressionLevelArg = '-dCompressionLevel="none"'
|
||||||
|
}
|
||||||
|
|
||||||
Write-Output "Running candle..."
|
Write-Output "Running candle..."
|
||||||
& candle.exe -nologo -pedantic -wx -arch "$Arch" -dAppVersion="$Version" -dAppPackageDir="$PackagePath" -o "$WixobjFilename" zeal.wxs
|
& candle.exe -nologo -pedantic -wx -arch "$Arch" -dAppVersion="$Version" -dAppPackageDir="$PackagePath" $compressionLevelArg -o "$WixobjFilename" zeal.wxs
|
||||||
if ($LastExitCode -ne 0) {
|
if ($LastExitCode -ne 0) {
|
||||||
CleanUp
|
CleanUp
|
||||||
throw "candle failed with exit code $LastExitCode."
|
throw "candle failed with exit code $LastExitCode."
|
||||||
|
@ -8,6 +8,10 @@
|
|||||||
<?error AppPackageDir must be set ?>
|
<?error AppPackageDir must be set ?>
|
||||||
<?endif?>
|
<?endif?>
|
||||||
|
|
||||||
|
<?ifndef CompressionLevel ?>
|
||||||
|
<?define CompressionLevel="high" ?>
|
||||||
|
<?endif?>
|
||||||
|
|
||||||
<?define AppName="Zeal" ?>
|
<?define AppName="Zeal" ?>
|
||||||
<?define AppManufacturer="Oleg Shparber" ?>
|
<?define AppManufacturer="Oleg Shparber" ?>
|
||||||
<?define AppExeName="zeal.exe" ?>
|
<?define AppExeName="zeal.exe" ?>
|
||||||
@ -39,7 +43,7 @@
|
|||||||
OnlyDetect="yes" Property="CURRENTVERSIONDETECTED" />
|
OnlyDetect="yes" Property="CURRENTVERSIONDETECTED" />
|
||||||
</Upgrade>
|
</Upgrade>
|
||||||
|
|
||||||
<MediaTemplate CompressionLevel="high" EmbedCab="yes" />
|
<MediaTemplate CompressionLevel="$(var.CompressionLevel)" EmbedCab="yes" />
|
||||||
|
|
||||||
<Icon Id="$(var.AppExeName)" SourceFile="$(var.AppPackageDir)\$(var.AppExeName)" />
|
<Icon Id="$(var.AppExeName)" SourceFile="$(var.AppPackageDir)\$(var.AppExeName)" />
|
||||||
<Property Id="ARPPRODUCTICON" Value="$(var.AppExeName)" />
|
<Property Id="ARPPRODUCTICON" Value="$(var.AppExeName)" />
|
||||||
|
Loading…
Reference in New Issue
Block a user