feat(build): 程序图标使用原版素材 logo + 安装器运行/快捷方式选项
- scripts/make_icon.ps1:素材包 pack.png → go-winres 生成 icon.syso (嵌入 exe 图标与版本信息);窗口图标运行时 SetWindowIcon - 安装.bat:桌面快捷方式 [Y/n](默认 Y)、安装后立即运行 [Y/n](默认 Y) - build.ps1 在 syso 缺失时自动生成图标
This commit is contained in:
@@ -35,6 +35,11 @@ if (-not $Release) { $tags = "$tags dev" }
|
||||
Push-Location $root
|
||||
try {
|
||||
New-Item -ItemType Directory -Force -Path bin | Out-Null
|
||||
# exe 图标(原版素材 logo):缺失时自动生成 .syso(make_icon.ps1)
|
||||
if (-not (Test-Path (Join-Path $root "cmd\client\icon.syso"))) {
|
||||
& (Join-Path $PSScriptRoot "make_icon.ps1")
|
||||
if ($LASTEXITCODE -ne 0) { throw "图标生成失败(make_icon.ps1)" }
|
||||
}
|
||||
go build -tags $tags -trimpath -ldflags "-s -w" -o bin/mc-client.exe ./cmd/client
|
||||
go build -trimpath -ldflags "-s -w" -o bin/mc-server.exe ./cmd/server
|
||||
|
||||
|
||||
Reference in New Issue
Block a user