diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2e277f000..7bae6d4e3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/.gitignore b/.gitignore index 63489743a..3883a1adf 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,7 @@ Thumbs.db # Ignore Go build files *.exe +*.syso x-ui.db x-ui.db-shm x-ui.db-wal diff --git a/winres/icon.png b/winres/icon.png new file mode 100644 index 000000000..aac2c7e73 Binary files /dev/null and b/winres/icon.png differ diff --git a/winres/winres.json b/winres/winres.json new file mode 100644 index 000000000..82cfc1253 --- /dev/null +++ b/winres/winres.json @@ -0,0 +1,54 @@ +{ + "RT_GROUP_ICON": { + "APP": { + "0000": "icon.png" + } + }, + "RT_MANIFEST": { + "#1": { + "0409": { + "identity": { + "name": "3x-ui", + "version": "" + }, + "description": "3X-UI web panel for Xray-core", + "minimum-os": "win7", + "execution-level": "as invoker", + "ui-access": false, + "auto-elevate": false, + "dpi-awareness": "system", + "disable-theming": false, + "disable-window-filtering": false, + "high-resolution-scrolling-aware": false, + "ultra-high-resolution-scrolling-aware": false, + "long-path-aware": false, + "printer-driver-isolation": false, + "gdi-scaling": false, + "segment-heap": false, + "use-common-controls-v6": false + } + } + }, + "RT_VERSION": { + "#1": { + "0000": { + "fixed": { + "file_version": "0.0.0.0", + "product_version": "0.0.0.0" + }, + "info": { + "0409": { + "CompanyName": "MHSanaei", + "FileDescription": "3X-UI web panel for Xray-core", + "FileVersion": "", + "InternalName": "3x-ui", + "LegalCopyright": "3X-UI contributors, licensed under GPL-3.0", + "OriginalFilename": "3x-ui.exe", + "ProductName": "3X-UI", + "ProductVersion": "" + } + } + } + } + } +}