完善开发环境工具、音乐服务和界面性能

This commit is contained in:
2026-08-17 03:09:59 +08:00
parent 8b2dd89d2f
commit 92e5c330f2
22 changed files with 1185 additions and 156 deletions
+14 -8
View File
@@ -41,7 +41,6 @@ $ServerPublicRoot = Join-Path $Root 'server\update\public'
$ServerDownloadRoot = Join-Path $ServerPublicRoot 'downloads'
$ToolStateRoot = Join-Path $Root '.cache\tool_state'
$NuGetRoot = Join-Path $Root '.cache\nuget'
$LocalNuGetFeedRoot = Join-Path $NuGetRoot 'feed'
$AppDataRoot = Join-Path $ToolStateRoot 'appdata'
$PackageIdentityName = 'YMhut.Box'
@@ -668,7 +667,14 @@ function Write-LayoutManifests([string] $Directory) {
}
function Get-FileSha256([string] $Path) {
return (Get-FileHash -LiteralPath $Path -Algorithm SHA256).Hash.ToLowerInvariant()
$stream = [IO.File]::OpenRead($Path)
$sha = [Security.Cryptography.SHA256]::Create()
try {
return ([BitConverter]::ToString($sha.ComputeHash($stream))).Replace('-', '').ToLowerInvariant()
} finally {
$sha.Dispose()
$stream.Dispose()
}
}
function Sync-UpdateServerPackages {
@@ -1468,7 +1474,6 @@ pause
New-Directory $AppDataRoot
New-Directory $NuGetRoot
New-Directory $LocalNuGetFeedRoot
New-Directory $OutputRoot
$env:APPDATA = $AppDataRoot
$env:LOCALAPPDATA = $AppDataRoot
@@ -1490,22 +1495,23 @@ Invoke-DotNet @(
'restore',
$Solution,
'--configfile', $NuGetConfig,
'--ignore-failed-sources',
'--disable-parallel'
)
if (-not $SkipTests) {
Invoke-DotNet @('test', $Solution, '-c', $Configuration, '--no-restore')
}
# A non-RID restore can replace referenced host asset files. Perform the final
# runtime restore immediately before publish so every host has a win-x64 target.
foreach ($ridProject in @($Project, $InstallerBootstrapProject)) {
Invoke-DotNet @(
'restore',
$ridProject,
'-r', 'win-x64',
'--configfile', $NuGetConfig,
'--ignore-failed-sources',
'--disable-parallel'
)
}
if (-not $SkipTests) {
Invoke-DotNet @('test', $Solution, '-c', $Configuration, '--no-restore')
}
Publish-UnpackagedApp $versionInfo