Add package build debug options

This commit is contained in:
Semyon Bezrukov
2025-07-29 13:18:23 +03:00
committed by Alexey Golubev
parent c91e7c846a
commit 2a896b5f91
3 changed files with 15 additions and 5 deletions

View File

@ -1250,3 +1250,7 @@ Root: HKLM; Subkey: "SOFTWARE\Classes\{#sAppProtocol}\Shell\Open\Command"; Value
Type: filesandordirs; Name: {commonappdata}\{#APP_PATH}\*; AfterInstall: RefreshEnvironment;
Type: filesandordirs; Name: "{app}\..\{#UPD_PATH}";
Type: files; Name: "{app}\svcrestart.bat";
#ifdef PREPROCSAVE
#expr SaveToFile(AddBackslash(SourcePath) + "desktop_preprocessed.iss")
#endif

View File

@ -7,7 +7,8 @@
[string]$BuildDir,
[switch]$Sign,
[string]$CertName = "Ascensio System SIA",
[string]$TimestampServer = "http://timestamp.digicert.com"
[string]$TimestampServer = "http://timestamp.digicert.com",
[switch]$Debug
)
$ErrorActionPreference = "Stop"
@ -151,7 +152,6 @@ $AdvInstConfig += `
"NewSync APPDIR $BuildDir\desktop -existingfiles keep -feature Files", `
"NewSync APPDIR\$PluginManagerPath $BuildDir\desktop\$PluginManagerPath -existingfiles delete -feature PluginManager", `
"AddFile APPDIR $LicensePath\3dparty\3DPARTYLICENSE"
# "GenerateReport -buildname $MsiBuild -output_path .\report.pdf", `
if ($Target -ne "commercial") {
$AdvInstConfig += `
"AddFile APPDIR $LicensePath\opensource\LICENSE.txt"
@ -166,6 +166,9 @@ if ($Target -ne "commercial") {
"SetPackageName `"$MsiFile`" -buildname $MsiBuild", `
"AddFile APPDIR $LicensePath\commercial\EULA.txt"
}
if ($Debug) {
$AdvInstConfig += "Save"
}
$AdvInstConfig += `
"Rebuild -buildslist $MsiBuild"
$AdvInstConfig = ";aic", $AdvInstConfig

View File

@ -8,7 +8,8 @@
[string]$BrandingDir,
[switch]$Sign,
[string]$CertName = "Ascensio System SIA",
[string]$TimestampServer = "http://timestamp.digicert.com"
[string]$TimestampServer = "http://timestamp.digicert.com",
[switch]$Debug
)
$ErrorActionPreference = "Stop"
@ -98,8 +99,7 @@ if ($Target -notlike "*update") {
Write-Host "`n[ Build Inno Setup project ]"
$IssFile = "common.iss"
$InnoArgs = "/Qp",
"/DVERSION=$Version",
$InnoArgs = "/DVERSION=$Version",
"/DARCH=$Arch",
"/DBUILD_DIR=$BuildDir"
if ($BrandingDir) {
@ -127,6 +127,9 @@ if ($Sign) {
$InnoArgs += "/DSIGN",
"/Sbyparam=signtool sign /a /v /n `$q$CertName`$q /t $TimestampServer `$f"
}
if ($Debug) {
$InnoArgs += "/DPREPROCSAVE"
}
Write-Host "iscc $InnoArgs $IssFile"
& iscc $InnoArgs $IssFile