diff options
| author | Fela <frayx@live.it> | 2024-11-06 13:47:36 +0400 |
|---|---|---|
| committer | Aliaksei Levin <22669599+levlam@users.noreply.github.com> | 2024-12-05 15:43:52 +0300 |
| commit | 21e68136d5a22b23e12471c3b9168046693bc478 (patch) | |
| tree | 7e4fe4b4a0b6924b57bc15766b72ab0dae3e7ec3 /example/uwp | |
| parent | 6635a068e671cf61842edbebd8a7f98326265cc0 (diff) | |
Improve UWP build script
Diffstat (limited to 'example/uwp')
| -rw-r--r-- | example/uwp/SDKManifest.xml | 2 | ||||
| -rw-r--r-- | example/uwp/build.ps1 | 17 |
2 files changed, 9 insertions, 10 deletions
diff --git a/example/uwp/SDKManifest.xml b/example/uwp/SDKManifest.xml index d6896fcb6..e46a8a0d3 100644 --- a/example/uwp/SDKManifest.xml +++ b/example/uwp/SDKManifest.xml @@ -7,6 +7,6 @@ AppliesTo="WindowsAppContainer" DependsOn="Microsoft.VCLibs, version=14.0" SupportsMultipleVersions="Error" - SupportedArchitectures="x86;x64;ARM"> + SupportedArchitectures="x86;x64;ARM;ARM64"> <File Reference="Telegram.Td.winmd" Implementation="Telegram.Td.dll" /> </FileList> diff --git a/example/uwp/build.ps1 b/example/uwp/build.ps1 index e01270575..4bc4eaee5 100644 --- a/example/uwp/build.ps1 +++ b/example/uwp/build.ps1 @@ -1,6 +1,7 @@ param ( [string]$vcpkg_root = $(throw "-vcpkg_root=<path to vcpkg> is required"), - [string]$arch = "", + [ValidateSet('x86', 'x64', 'ARM', 'ARM64', IgnoreCase = $false)] + [string[]]$arch = @( "x86", "x64", "ARM", "ARM64" ), [string]$mode = "all", [string]$compress = "7z", [switch]$release_only = $false, @@ -11,10 +12,7 @@ $ErrorActionPreference = "Stop" $vcpkg_root = Resolve-Path $vcpkg_root $vcpkg_cmake="${vcpkg_root}\scripts\buildsystems\vcpkg.cmake" -$arch_list = @( "x86", "x64", "ARM", "ARM64" ) -if ($arch) { - $arch_list = @(, $arch) -} +$arch_list = $arch $config_list = @( "Debug", "Release" ) if ($release_only -or $nupkg) { $config_list = @(, "RelWithDebInfo") @@ -56,7 +54,7 @@ function config { ForEach ($arch in $arch_list) { echo "Config Arch = [$arch]" - New-Item -ItemType Directory -Force -Path $arch + New-Item -ItemType Directory -Force -Path $arch.ToLower() cd $arch echo "${td_root}" $fixed_arch = $arch @@ -130,12 +128,13 @@ function export-nupkg { cp ../Telegram.Td.UWP.targets nupkg/build/native ForEach ($arch in $arch_list) { - New-Item -ItemType Directory -Force -Path nupkg/runtimes/win10-${arch}/native + $fixed_arch = $arch.ToLower(); + New-Item -ItemType Directory -Force -Path nupkg/runtimes/win10-${fixed_arch}/native New-Item -ItemType Directory -Force -Path nupkg/lib/uap10.0 ForEach ($config in $config_list) { - cp ${arch}/${config}/* -include "SSLEAY*","LIBEAY*","libcrypto*","libssl*","zlib*","Telegram.Td.pdb","Telegram.Td.pri","Telegram.Td.dll" nupkg/runtimes/win10-${arch}/native - cp ${arch}/${config}/* -include "Telegram.Td.winmd","Telegram.Td.xml" nupkg/lib/uap10.0 + cp ${fixed_arch}/${config}/* -include "SSLEAY*","LIBEAY*","libcrypto*","libssl*","zlib*","Telegram.Td.pdb","Telegram.Td.pri","Telegram.Td.dll" nupkg/runtimes/win10-${fixed_arch}/native + cp ${fixed_arch}/${config}/* -include "Telegram.Td.winmd","Telegram.Td.xml" nupkg/lib/uap10.0 } } |
