You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
2.7 KiB
71 lines
2.7 KiB
# GoFaster 开发环境启动脚本 |
|
# 设置控制台编码为 UTF-8,解决中文显示乱码问题 |
|
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8 |
|
[Console]::InputEncoding = [System.Text.Encoding]::UTF8 |
|
$OutputEncoding = [System.Text.Encoding]::UTF8 |
|
|
|
# 设置环境变量 |
|
$env:LANG = "zh_CN.UTF-8" |
|
$env:LC_ALL = "zh_CN.UTF-8" |
|
|
|
Write-Host "========================================" -ForegroundColor Cyan |
|
Write-Host " GoFaster Development Environment" -ForegroundColor Cyan |
|
Write-Host "========================================" -ForegroundColor Cyan |
|
Write-Host "" |
|
|
|
Write-Host "选择启动模式:" -ForegroundColor Yellow |
|
Write-Host "1. 全栈启动 (前后端)" -ForegroundColor White |
|
Write-Host "2. 全栈启动 (调试模式)" -ForegroundColor White |
|
Write-Host "3. 全栈启动 (监听模式)" -ForegroundColor White |
|
Write-Host "4. 仅启动后端" -ForegroundColor White |
|
Write-Host "5. 仅启动前端" -ForegroundColor White |
|
Write-Host "6. 增强版启动 (推荐)" -ForegroundColor Green |
|
Write-Host "7. 强制清理启动" -ForegroundColor Magenta |
|
Write-Host "" |
|
|
|
$choice = Read-Host "请输入选择 (1-7)" |
|
|
|
switch ($choice) { |
|
"1" { |
|
Write-Host "启动全栈开发环境..." -ForegroundColor Green |
|
& ".\dev-full.ps1" |
|
} |
|
"2" { |
|
Write-Host "启动全栈开发环境 (调试模式)..." -ForegroundColor Green |
|
& ".\dev-full.ps1" -Debug |
|
} |
|
"3" { |
|
Write-Host "启动全栈开发环境 (监听模式)..." -ForegroundColor Green |
|
& ".\dev-full.ps1" -Watch |
|
} |
|
"4" { |
|
Write-Host "仅启动后端..." -ForegroundColor Green |
|
& ".\dev-full.ps1" -BackendOnly |
|
} |
|
"5" { |
|
Write-Host "仅启动前端..." -ForegroundColor Green |
|
& ".\dev-full.ps1" -FrontendOnly |
|
} |
|
"6" { |
|
Write-Host "增强版启动 (推荐)..." -ForegroundColor Green |
|
& ".\start-enhanced.ps1" |
|
} |
|
"7" { |
|
Write-Host "强制清理启动..." -ForegroundColor Green |
|
& ".\start-enhanced.ps1" -ForceClean |
|
} |
|
default { |
|
Write-Host "无效选择!" -ForegroundColor Red |
|
} |
|
} |
|
|
|
Write-Host "" |
|
Write-Host "========================================" -ForegroundColor Cyan |
|
Write-Host "编码设置信息:" -ForegroundColor Yellow |
|
Write-Host "控制台输出编码: $([Console]::OutputEncoding.EncodingName)" -ForegroundColor White |
|
Write-Host "控制台输入编码: $([Console]::InputEncoding.EncodingName)" -ForegroundColor White |
|
Write-Host "PowerShell输出编码: $OutputEncoding.EncodingName" -ForegroundColor White |
|
Write-Host "========================================" -ForegroundColor Cyan |
|
Write-Host "" |
|
Write-Host "按任意键退出..." -ForegroundColor Gray |
|
$null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
|
|
|