mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-10-15 10:25:00 +03:00
feat(release): ship the Windows build as 3x-ui.exe with version info and icon
Kaspersky (Trojan.Win64.Agent.sb / .smhqgz) and Defender flag the Windows build heuristically. A stripped, unsigned Go binary with no VERSIONINFO, icon or manifest scores high on those heuristics, so the release job now generates a resource .syso with go-winres from winres/winres.json, stamped with internal/config/version, before go build. The .syso is a build artifact and is gitignored. The Windows zip now carries 3x-ui.exe instead of x-ui.exe, matching the project name, and the executable embeds the 3X logo as its icon. The icon is a square 256px crop of media/3x-ui-dark.png, since the source logo is 400x200 and Windows icons must be square.
This commit is contained in:
@@ -261,6 +261,11 @@ jobs:
|
||||
go version
|
||||
gcc --version
|
||||
|
||||
# Version info + manifest resource: a bare stripped Go exe scores high on AV heuristics.
|
||||
PANEL_VERSION=$(tr -d '[:space:]' < internal/config/version)
|
||||
go run github.com/tc-hib/go-winres@v0.3.3 make --arch amd64 \
|
||||
--product-version "$PANEL_VERSION" --file-version "$PANEL_VERSION"
|
||||
|
||||
# Stamp the commit into per-commit (dev channel) builds only.
|
||||
LDFLAGS="-w -s"
|
||||
if [[ "$GITHUB_REF" != refs/tags/* ]]; then
|
||||
@@ -273,7 +278,7 @@ jobs:
|
||||
run: |
|
||||
$retry = @{ MaximumRetryCount = 5; RetryIntervalSec = 10 }
|
||||
mkdir x-ui
|
||||
Copy-Item xui-release.exe x-ui\x-ui.exe
|
||||
Copy-Item xui-release.exe x-ui\3x-ui.exe
|
||||
mkdir x-ui\bin
|
||||
cd x-ui\bin
|
||||
|
||||
|
||||
Reference in New Issue
Block a user