Fix 4c8f1b0f81: First entry of station cargo filter list was broken. (#13382)
[openttd-github.git] / os / windows / winstore / prepare-manifests.ps1
blob4bd1f4cb2ff1a35931967d81d71294cfcedf2ae8
1 [CmdletBinding()]
2 [Alias()]
3 Param
5 # Output folder
6 [Parameter(Mandatory=$true, Position=0)]
7 $OutputFolder,
9 # Publisher ("CN=xyz")
10 [Parameter(Mandatory=$true, Position=1)]
11 $Publisher,
13 # IdentityName
14 [Parameter(Mandatory=$true, Position=2)]
15 $IdentityName,
17 # Version
18 [Parameter(Mandatory=$true, Position=3)]
19 $AppVersion
22 function Prepare-Manifest {
23 param (
24 $Architecture
27 (Get-Content "$($PSScriptRoot)\manifests\Package.appxmanifest").replace('$PUBLISHER$', $Publisher).replace('$IDENTITY_NAME$', $IdentityName).replace('$VERSION$', $AppVersion).replace('$ARCHITECTURE$', $Architecture) | Set-Content "$($OutputFolder)\Package-$($Architecture).appxmanifest"
30 # Prepare the application binary manifests
31 Prepare-Manifest x86
32 Prepare-Manifest x64
33 Prepare-Manifest arm64
35 # Prepare the assets package manifest
36 (Get-Content "$($PSScriptRoot)\manifests\AssetsPackage.appxmanifest").replace('$PUBLISHER$', $Publisher).replace('$IDENTITY_NAME$', $IdentityName).replace('$VERSION$', $AppVersion) | Set-Content "$($OutputFolder)\AssetsPackage.appxmanifest"
38 # Prepare the overall package manifest
39 (Get-Content "$($PSScriptRoot)\manifests\Package.appxmanifest").replace('$PUBLISHER$', $Publisher).replace('$IDENTITY_NAME$', $IdentityName).replace('$VERSION$', $AppVersion).replace(' ProcessorArchitecture="$ARCHITECTURE$"', '') | Set-Content "$($OutputFolder)\Package.appxmanifest"
41 # Copy the PackagingLayout XML file
42 (Get-Content "$($PSScriptRoot)\manifests\PackagingLayout.xml") | Set-Content "$($OutputFolder)\PackagingLayout.xml"