初始化 monorepo: Go后端(7微服务) + Unity客户端(9模块) + 启动器 HTML5原型: Three.js 3D体素世界, Perlin噪声地形, 原版材质, 22种方块 Minecraft创造模式背包: 双栏布局, 拖拽移动物品, 方向性元件引脚 AI助搭策划文档 + 客户端/服务端骨架 + Docker Compose + CI
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
# MRCC Launcher 构建脚本
|
||||
# 用法: .\build.ps1 [-Run]
|
||||
|
||||
param(
|
||||
[switch]$Run
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
# 设置 .NET SDK 环境变量(本地安装的 SDK)
|
||||
$DotnetRoot = "D:\Code\MRCC\.dotnet"
|
||||
$env:DOTNET_ROOT = $DotnetRoot
|
||||
$env:DOTNET_MULTILEVEL_LOOKUP = "0"
|
||||
$env:APPDATA = "D:\Code\MRCC\.userdata\AppData\Roaming"
|
||||
$env:LOCALAPPDATA = "D:\Code\MRCC\.userdata\AppData\Local"
|
||||
$env:NUGET_PACKAGES = "D:\Code\MRCC\.nuget\packages"
|
||||
$env:NUGET_HTTP_CACHE_PATH = "D:\Code\MRCC\.nuget\v3-cache"
|
||||
$env:DOTNET_CLI_TELEMETRY_OPTOUT = "1"
|
||||
|
||||
$DotnetExe = Join-Path $DotnetRoot "dotnet.exe"
|
||||
$SolutionPath = Join-Path $PSScriptRoot "MRCC.Launcher.sln"
|
||||
|
||||
Write-Host "Building MRCC.Launcher..." -ForegroundColor Cyan
|
||||
& $DotnetExe build $SolutionPath
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Build failed!" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host "Build succeeded!" -ForegroundColor Green
|
||||
|
||||
if ($Run) {
|
||||
Write-Host "Launching MRCC.Launcher..." -ForegroundColor Cyan
|
||||
$exePath = Join-Path $PSScriptRoot "MRCC.Launcher\bin\Debug\net10.0-windows\MRCC.Launcher.exe"
|
||||
if (Test-Path $exePath) {
|
||||
& $exePath
|
||||
} else {
|
||||
Write-Host "Executable not found: $exePath" -ForegroundColor Red
|
||||
Write-Host "Try building with Release configuration." -ForegroundColor Yellow
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user