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]$vcpkg_root = $(throw "-vcpkg_root=<path to vcpkg> is required"),
|
||||||
[string]$arch = "",
|
[string]$arch = "",
|
||||||
[string]$mode = "all",
|
[string]$mode = "all",
|
||||||
[string]$compress = "7z"
|
[string]$compress = "7z",
|
||||||
|
[switch]$release_only = $false
|
||||||
)
|
)
|
||||||
$ErrorActionPreference = "Stop"
|
$ErrorActionPreference = "Stop"
|
||||||
|
|
||||||
@ -69,13 +70,27 @@ function build {
|
|||||||
ForEach($arch in $arch_list) {
|
ForEach($arch in $arch_list) {
|
||||||
echo "Build Arch = [$arch]"
|
echo "Build Arch = [$arch]"
|
||||||
cd $arch
|
cd $arch
|
||||||
cmake --build . --config Release --target tddotnet
|
if ($release_only) {
|
||||||
cmake --build . --config Debug --target tddotnet
|
cmake --build . --config RelWithDebInfo --target tddotnet
|
||||||
|
} else {
|
||||||
|
cmake --build . --config Release --target tddotnet
|
||||||
|
cmake --build . --config Debug --target tddotnet
|
||||||
|
}
|
||||||
cd ..
|
cd ..
|
||||||
}
|
}
|
||||||
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 {
|
function export {
|
||||||
cd build-uwp
|
cd build-uwp
|
||||||
Remove-Item vsix -Force -Recurse -ErrorAction SilentlyContinue
|
Remove-Item vsix -Force -Recurse -ErrorAction SilentlyContinue
|
||||||
@ -86,22 +101,16 @@ function export {
|
|||||||
cp ../LICENSE_1_0.txt vsix
|
cp ../LICENSE_1_0.txt vsix
|
||||||
|
|
||||||
ForEach($arch in $arch_list) {
|
ForEach($arch in $arch_list) {
|
||||||
New-Item -ItemType Directory -Force -Path vsix/DesignTime/Debug/${arch}
|
if ($release_only) {
|
||||||
New-Item -ItemType Directory -Force -Path vsix/DesignTime/Retail/${arch}
|
New-Item -ItemType Directory -Force -Path vsix/References/CommonConfiguration/${arch}
|
||||||
New-Item -ItemType Directory -Force -Path vsix/Redist/Debug/${arch}
|
export-architecture -arch $arch -config "RelWithDebInfo" -target "CommonConfiguration"
|
||||||
New-Item -ItemType Directory -Force -Path vsix/Redist/Retail/${arch}
|
cp ${arch}/RelWithDebInfo/* -filter "Telegram.Td.*" -include "*.pri","*.winmd","*.xml" vsix/References/CommonConfiguration/${arch}/
|
||||||
New-Item -ItemType Directory -Force -Path vsix/References/CommonConfiguration/${arch}
|
} else {
|
||||||
|
New-Item -ItemType Directory -Force -Path vsix/References/CommonConfiguration/${arch}
|
||||||
cp ${arch}/Debug/* -include "SSLEAY*","LIBEAY*","libcrypto*","libssl*","zlib*" vsix/Redist/Debug/${arch}/
|
export-architecture -arch $arch -config "Debug" -target "Debug"
|
||||||
cp ${arch}/Release/* -include "SSLEAY*","LIBEAY*","libcrypto*","libssl*","zlib*" vsix/Redist/Retail/${arch}/
|
export-architecture -arch $arch -config "Release" -target "Retail"
|
||||||
|
cp ${arch}/Release/* -filter "Telegram.Td.*" -include "*.pri","*.winmd","*.xml" vsix/References/CommonConfiguration/${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}/
|
|
||||||
|
|
||||||
cp ${arch}/Release/* -filter "Telegram.Td.*" -include "*.pri","*.winmd","*.xml" vsix/References/CommonConfiguration/${arch}/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cd vsix
|
cd vsix
|
||||||
|
Loading…
x
Reference in New Issue
Block a user