Skip to content

Commit 4f76b4c

Browse files
committed
Full publisher name and removed MSIXHero usage
1 parent d0b3bf5 commit 4f76b4c

File tree

3 files changed

+44
-13
lines changed

3 files changed

+44
-13
lines changed

CreateMsix.ps1

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,49 @@
11
#!/usr/bin/env pwsh
22

3-
param ([Parameter(Mandatory)] $Version, [Parameter(Mandatory)][SecureString] $CertPassword)
3+
param (
4+
[Parameter(Mandatory)] $Version,
5+
[Parameter(Mandatory)][SecureString] $CertPassword,
6+
$CertPath = "$env:USERPROFILE\Documents\Certificates\EcsactDev.pfx"
7+
)
48

59
$ErrorActionPreference = 'Stop'
610

11+
$MakeAppxPath = "${env:ProgramFiles(x86)}\Windows Kits\10\bin\10.0.22621.0\x64\makeappx.exe"
12+
$SignToolPath = "${env:ProgramFiles(x86)}\Windows Kits\10\bin\10.0.22621.0\x64\signtool.exe"
13+
714
$CertPasswordPlain = ConvertFrom-SecureString -SecureString $CertPassword -AsPlainText
8-
$CertPath = "$env:USERPROFILE\Documents\Certificates\EcsactDev.pfx"
915

1016
try {
1117
((Get-Content -path .\dist\AppxManifest.xml -Raw) -replace '0.0.0.0-placeholder',"$($Version).0") | Set-Content -Path .\dist\AppxManifest.xml
1218
$MsixPath = "ecsact_sdk_$($Version)_windows_x64.msix"
13-
MSIXHeroCLI pack -d dist -p $MsixPath
14-
MSIXHeroCLI sign --file $CertPath -p $CertPasswordPlain $MsixPath
19+
20+
& $SignToolPath sign `
21+
/debug /fd SHA384 `
22+
/f $CertPath `
23+
/p $CertPasswordPlain `
24+
/tr http://timestamp.sectigo.com /td SHA256 `
25+
.\dist\bin\ecsact.exe `
26+
.\dist\bin\ecsact_rtb.exe
27+
28+
if(-not $?) {
29+
throw "Signing dist binaries failed with exit code ${LastExitCode}"
30+
}
31+
32+
& $MakeAppxPath pack /v /o /h SHA384 /d .\dist\ /p $MsixPath
33+
34+
if(-not $?) {
35+
throw "$MakeAppxPath exited with ${LastExitCode}"
36+
}
37+
38+
& $SignToolPath sign `
39+
/debug /fd SHA384 `
40+
/f $CertPath `
41+
/p $CertPasswordPlain `
42+
/tr http://timestamp.sectigo.com /td SHA256 `
43+
$MsixPath
44+
if(-not $?) {
45+
throw "Signing ${MsixPath} failed with exit code ${LastExitCode}"
46+
}
1547
} finally {
1648
git checkout .\dist\AppxManifest.xml
1749
}

UploadMsix.ps1

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
#!/usr/bin/env pwsh
22

3+
param (
4+
[Parameter(Mandatory)] $CertPath,
5+
[Parameter(Mandatory)][SecureString] $CertPassword
6+
)
7+
38
$ErrorActionPreference = 'Stop'
49

510
# GitHub requires TLS 1.2
@@ -18,18 +23,12 @@ git clean dist -dfx
1823
Write-Host "Extracting $ArchivePath to dist..."
1924
Expand-Archive -Path $ArchivePath -DestinationPath dist
2025

21-
((Get-Content -path .\dist\AppxManifest.xml -Raw) -replace '0.0.0.0-placeholder',"$($LatestTag).0") | Set-Content -Path .\dist\AppxManifest.xml
22-
2326
((Get-Content -path .\ecsact_sdk.appinstaller -Raw) -replace '0.0.0.0-placeholder',"$($LatestTag).0") | Set-Content -Path .\ecsact_sdk.appinstaller
2427
((Get-Content -path .\ecsact_sdk.appinstaller -Raw) -replace '0.0.0-placeholder',"$($LatestTag)") | Set-Content -Path .\ecsact_sdk.appinstaller
2528

2629
try {
27-
$MsixPath = "ecsact_sdk_$($LatestTag)_windows_x64.msix"
28-
$CertPassword = Read-Host "Cert Password"
29-
MSIXHeroCLI pack -d dist -p $MsixPath
30-
MSIXHeroCLI sign --file $env:USERPROFILE\Documents\Certificates\EcsactDev.pfx -p $CertPassword $MsixPath
31-
gh release upload $LatestTag $MsixPath ecsact_sdk.appinstaller
30+
. .\CreateMsix.ps1 -CertPath $CertPath -Version $LatestTag -CertPassword $CertPassword
31+
gh release upload $LatestTag $MsixPath ecsact_sdk.appinstaller --clobber
3232
} finally {
33-
git checkout .\dist\AppxManifest.xml
3433
git checkout .\ecsact_sdk.appinstaller
3534
}

dist/AppxManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:uap5="http://schemas.microsoft.com/appx/manifest/uap/windows10/5" xmlns:iot="http://schemas.microsoft.com/appx/manifest/iot/windows10" xmlns:com2="http://schemas.microsoft.com/appx/manifest/com/windows10/2" xmlns:f2="http://schemas.microsoft.com/appx/manifest/foundation/windows10/2" xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10" xmlns:desktop3="http://schemas.microsoft.com/appx/manifest/desktop/windows10/3" xmlns:rescap2="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities/2" xmlns:rescap3="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities/3" xmlns:uap2="http://schemas.microsoft.com/appx/manifest/uap/windows10/2" xmlns:uap4="http://schemas.microsoft.com/appx/manifest/uap/windows10/4" xmlns:ray="http://schemas.raynet.de/msix/manifestextension" xmlns:rescap4="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities/4" xmlns:uap7="http://schemas.microsoft.com/appx/manifest/uap/windows10/7" xmlns:uap6="http://schemas.microsoft.com/appx/manifest/uap/windows10/6" xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3" xmlns:desktop4="http://schemas.microsoft.com/appx/manifest/desktop/windows10/4" xmlns:com="http://schemas.microsoft.com/appx/manifest/com/windows10" xmlns:rescap6="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities/6" xmlns:desktop2="http://schemas.microsoft.com/appx/manifest/desktop/windows10/2" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:build="http://schemas.microsoft.com/developer/appx/2015/build" xmlns:uap8="http://schemas.microsoft.com/appx/manifest/uap/windows10/8" xmlns:desktop10="http://schemas.microsoft.com/appx/manifest/desktop/windows10/10" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities">
3-
<Identity Name="EcsactSdk" Version="0.0.0.0-placeholder" Publisher="CN=Seaube, C=Canada" />
3+
<Identity Name="EcsactSdk" Version="0.4.0.0" Publisher="CN=Seaube Software CORP., O=Seaube Software CORP., S=British Columbia, C=CA" />
44
<Properties>
55
<DisplayName>Ecsact SDK</DisplayName>
66
<PublisherDisplayName>Seaube</PublisherDisplayName>

0 commit comments

Comments
 (0)