fix(inno): sign installer with signtool
Some checks are pending
Code QL / code-ql (push) Waiting to run
Release / changelog (push) Waiting to run
Release / artifacts (push) Blocked by required conditions

this effectively disables signing the uninstaller
as somehow inno setup doesn't forward environment
variables to the subshell used to run signtool. As
we can't authenticate using environment variables
that way, we also can't sign with our new
certificate. Future thought will need to be given.
This commit is contained in:
Jan De Dobbeleer 2024-11-16 20:16:04 +01:00
parent bf8732ceb1
commit 02e819fc00
2 changed files with 9 additions and 3 deletions

View file

@ -31,9 +31,17 @@ $content = $content.Replace('<VERSION>', $Version)
$ISSName = ".oh-my-posh-$Architecture-$Version.iss"
$content | Out-File -Encoding 'UTF8' $ISSName
# clean paths
$signtool = $signtool -Replace '\\', '/'
$signtoolDlib = $signtoolDlib -Replace '\\', '/'
# package content
$installer = "install-$Architecture"
ISCC.exe /F$installer "/Ssigntool=$signtool sign /v /debug /fd SHA256 /tr http://timestamp.acs.microsoft.com /td SHA256 /dlib $signtoolDlib /dmdf ./metadata.json `$f" $ISSName
ISCC.exe /F$installer $ISSName
# sign installer
& "$signtool" sign /v /debug /fd SHA256 /tr 'http://timestamp.acs.microsoft.com' /td SHA256 /dlib "$signtoolDlib" /dmdf ../../src/metadata.json "./Output/$installer.exe"
# get hash
$zipHash = Get-FileHash "Output/$installer.exe" -Algorithm SHA256
$zipHash.Hash | Out-File -Encoding 'UTF8' "Output/$installer.exe.sha256"

View file

@ -13,8 +13,6 @@ UninstallDisplayIcon={app}\bin\oh-my-posh.exe
PrivilegesRequired=lowest
PrivilegesRequiredOverridesAllowed=dialog
ChangesEnvironment=yes
SignTool=signtool
SignedUninstaller=yes
CloseApplications=no
[Files]