summaryrefslogtreecommitdiffstats
path: root/Tools/msi/make_cat.ps1
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2018-12-11 02:52:57 (GMT)
committerGitHub <noreply@github.com>2018-12-11 02:52:57 (GMT)
commit0cd6391fd890368ea1743dac50c366b42f2fd126 (patch)
tree1e2d8fd6c85a08477d3eb4082badd9a50386e63e /Tools/msi/make_cat.ps1
parent1c3de541e64f75046b20cdd27bada1557e550bcd (diff)
downloadcpython-0cd6391fd890368ea1743dac50c366b42f2fd126.zip
cpython-0cd6391fd890368ea1743dac50c366b42f2fd126.tar.gz
cpython-0cd6391fd890368ea1743dac50c366b42f2fd126.tar.bz2
bpo-34977: Add Windows App Store package (GH-11027)
Also adds the PC/layout script for generating layouts on Windows.
Diffstat (limited to 'Tools/msi/make_cat.ps1')
-rw-r--r--Tools/msi/make_cat.ps134
1 files changed, 34 insertions, 0 deletions
diff --git a/Tools/msi/make_cat.ps1 b/Tools/msi/make_cat.ps1
new file mode 100644
index 0000000..7074143
--- /dev/null
+++ b/Tools/msi/make_cat.ps1
@@ -0,0 +1,34 @@
+<#
+.Synopsis
+ Compiles and signs a catalog file.
+.Description
+ Given the CDF definition file, builds and signs a catalog.
+.Parameter catalog
+ The path to the catalog definition file to compile and
+ sign. It is assumed that the .cat file will be the same
+ name with a new extension.
+.Parameter description
+ The description to add to the signature (optional).
+.Parameter certname
+ The name of the certificate to sign with (optional).
+.Parameter certsha1
+ The SHA1 hash of the certificate to sign with (optional).
+#>
+param(
+ [Parameter(Mandatory=$true)][string]$catalog,
+ [string]$description,
+ [string]$certname,
+ [string]$certsha1,
+ [string]$certfile
+)
+
+$tools = $script:MyInvocation.MyCommand.Path | Split-Path -parent;
+Import-Module $tools\sdktools.psm1 -WarningAction SilentlyContinue -Force
+
+Set-Alias MakeCat (Find-Tool "makecat.exe") -Scope Script
+
+MakeCat $catalog
+if (-not $?) {
+ throw "Catalog compilation failed"
+}
+Sign-File -certname $certname -certsha1 $certsha1 -certfile $certfile -description $description -files @($catalog -replace 'cdf$', 'cat')