Magpie/ci/build.ps1
刘旭 05d78828ee chore: 引入 HybridCRT
不再使用 mimalloc,它和 HybridCRT 不兼容
2023-02-02 19:06:04 +08:00

29 lines
1 KiB
PowerShell

# 出错时终止 CI
$ErrorActionPreference = "Stop"
msbuild /p:Configuration=Release`;Platform=x64 src\CONAN_INSTALL
if ($LastExitCode -ne 0) {
throw '编译 CONAN_INSTALL 失败'
}
msbuild /p:Configuration=Release`;Platform=x64`;OutDir=..\..\publish\ src\Effects
if ($LastExitCode -ne 0) {
throw '编译 Effects 失败'
}
msbuild /p:Configuration=Release`;Platform=x64`;OutDir=..\..\publish\ src\Magpie.Core
if ($LastExitCode -ne 0) {
throw '编译 Magpie.Core 失败'
}
msbuild /m /p:Configuration=Release`;Platform=x64`;BuildProjectReferences=false`;OutDir=..\..\publish\ src\Magpie
if($LastExitCode -ne 0) {
throw '编译 Magpie 失败'
}
msbuild /p:Configuration=Release`;Platform=x64`;OutDir=..\..\publish\ src\Updater
if ($LastExitCode -ne 0) {
throw '编译 Updater 失败'
}
# 清理不需要的文件
Set-Location .\publish\
Remove-Item @("*.pdb", "*.lib", "*.exp", "*.winmd", "*.xml", "*.xbf", "dummy.*", "Microsoft.Web.WebView2.Core.dll")
Remove-Item @("Microsoft.UI.Xaml", "Magpie.App") -Recurse
Remove-Item *.pri -Exclude resources.pri