Use RelWithDebInfo for UWP package (#1467)
* Added -release_only flag for RelWithDebInfo
This commit is contained in:
parent
eecb0476b5
commit
32fe6456e6
@ -2,7 +2,8 @@ param (
|
||||
[string]$vcpkg_root = $(throw "-vcpkg_root=<path to vcpkg> is required"),
|
||||
[string]$arch = "",
|
||||
[string]$mode = "all",
|
||||
[string]$compress = "7z"
|
||||
[string]$compress = "7z",
|
||||
[switch]$release_only = $false
|
||||
)
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
@ -69,13 +70,27 @@ function build {
|
||||
ForEach($arch in $arch_list) {
|
||||
echo "Build Arch = [$arch]"
|
||||
cd $arch
|
||||
if ($release_only) {
|
||||
cmake --build . --config RelWithDebInfo --target tddotnet
|
||||
} else {
|
||||
cmake --build . --config Release --target tddotnet
|
||||
cmake --build . --config Debug --target tddotnet
|
||||
}
|
||||
cd ..
|
||||
}
|
||||
cd ..
|
||||
}
|
||||
|
||||
function export-architecture($arch, $config, $target) {
|
||||
New-Item -ItemType Directory -Force -Path vsix/DesignTime/${target}/${arch}
|
||||
New-Item -ItemType Directory -Force -Path vsix/Redist/${target}/${arch}
|
||||
New-Item -ItemType Directory -Force -Path vsix/References/${target}/${arch}
|
||||
|
||||
cp ${arch}/${config}/* -include "SSLEAY*","LIBEAY*","libcrypto*","libssl*","zlib*" vsix/Redist/${target}/${arch}/
|
||||
cp ${arch}/${config}/* -filter "Telegram.Td.*" -include "*.lib" vsix/DesignTime/${target}/${arch}/
|
||||
cp ${arch}/${config}/* -filter "Telegram.Td.*" -include "*.pdb","*.dll" vsix/Redist/${target}/${arch}/
|
||||
}
|
||||
|
||||
function export {
|
||||
cd build-uwp
|
||||
Remove-Item vsix -Force -Recurse -ErrorAction SilentlyContinue
|
||||
@ -86,23 +101,17 @@ function export {
|
||||
cp ../LICENSE_1_0.txt vsix
|
||||
|
||||
ForEach($arch in $arch_list) {
|
||||
New-Item -ItemType Directory -Force -Path vsix/DesignTime/Debug/${arch}
|
||||
New-Item -ItemType Directory -Force -Path vsix/DesignTime/Retail/${arch}
|
||||
New-Item -ItemType Directory -Force -Path vsix/Redist/Debug/${arch}
|
||||
New-Item -ItemType Directory -Force -Path vsix/Redist/Retail/${arch}
|
||||
if ($release_only) {
|
||||
New-Item -ItemType Directory -Force -Path vsix/References/CommonConfiguration/${arch}
|
||||
|
||||
cp ${arch}/Debug/* -include "SSLEAY*","LIBEAY*","libcrypto*","libssl*","zlib*" vsix/Redist/Debug/${arch}/
|
||||
cp ${arch}/Release/* -include "SSLEAY*","LIBEAY*","libcrypto*","libssl*","zlib*" vsix/Redist/Retail/${arch}/
|
||||
|
||||
cp ${arch}/Debug/* -filter "Telegram.Td.*" -include "*.lib" vsix/DesignTime/Debug/${arch}/
|
||||
cp ${arch}/Release/* -filter "Telegram.Td.*" -include "*.lib" vsix/DesignTime/Retail/${arch}/
|
||||
|
||||
cp ${arch}/Debug/* -filter "Telegram.Td.*" -include "*.pdb","*.dll" vsix/Redist/Debug/${arch}/
|
||||
cp ${arch}/Release/* -filter "Telegram.Td.*" -include "*.pdb","*.dll" vsix/Redist/Retail/${arch}/
|
||||
|
||||
export-architecture -arch $arch -config "RelWithDebInfo" -target "CommonConfiguration"
|
||||
cp ${arch}/RelWithDebInfo/* -filter "Telegram.Td.*" -include "*.pri","*.winmd","*.xml" vsix/References/CommonConfiguration/${arch}/
|
||||
} else {
|
||||
New-Item -ItemType Directory -Force -Path vsix/References/CommonConfiguration/${arch}
|
||||
export-architecture -arch $arch -config "Debug" -target "Debug"
|
||||
export-architecture -arch $arch -config "Release" -target "Retail"
|
||||
cp ${arch}/Release/* -filter "Telegram.Td.*" -include "*.pri","*.winmd","*.xml" vsix/References/CommonConfiguration/${arch}/
|
||||
}
|
||||
}
|
||||
|
||||
cd vsix
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user