diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c2508d3..abe0b4f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -161,15 +161,6 @@ jobs: packages: >- make mingw-w64-x86_64-gcc - - arch: arm64 - runner: windows-11-arm - msystem: CLANGARM64 - cc: clang - cxx: clang++ - packages: >- - make - mingw-w64-clang-aarch64-clang - mingw-w64-clang-aarch64-llvm permissions: contents: read steps: @@ -214,17 +205,8 @@ jobs: "$CC" --version command -v "$CXX" "$CXX" --version - if [ "${{ matrix.arch }}" = "arm64" ]; then - if command -v llvm-windres >/dev/null 2>&1; then - llvm-windres --version - else - command -v windres - windres --version - fi - else - command -v windres - windres --version - fi + command -v windres + windres --version if command -v powershell.exe >/dev/null 2>&1; then powershell.exe -NoProfile -Command '$PSVersionTable.PSVersion.ToString()' else diff --git a/Makefile b/Makefile index 9a3fb03..bf8a6d9 100644 --- a/Makefile +++ b/Makefile @@ -35,17 +35,15 @@ ifeq ($(TARGET_ARCH),arm64) APPIMAGE_ARCH := aarch64 DEB_ARCH := arm64 RPM_ARCH := aarch64 -WINDOWS_WINDRES_FORMAT_BFD := pe-aarch64 -WINDOWS_WINDRES_FORMAT_LLVM := aarch64-w64-mingw32 -WINDOWS_RESOURCE := rsrc_windows_arm64.syso else APPIMAGE_ARCH := x86_64 DEB_ARCH := amd64 RPM_ARCH := x86_64 +endif + WINDOWS_WINDRES_FORMAT_BFD := pe-x86-64 WINDOWS_WINDRES_FORMAT_LLVM := x86_64-w64-mingw32 WINDOWS_RESOURCE := rsrc_windows_amd64.syso -endif APPIMAGETOOL_PATH := build/tools/appimagetool-$(APPIMAGE_ARCH).AppImage APPIMAGETOOL_URL ?= https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-$(APPIMAGE_ARCH).AppImage @@ -163,7 +161,7 @@ _desktop-test: cd backend && go test ./cmd/desktop/... -v _desktop-clean: - rm -rf build/ embedfs/assets embedfs/frontend-dist backend/cmd/desktop/rsrc_windows_amd64.syso backend/cmd/desktop/rsrc_windows_arm64.syso + rm -rf build/ embedfs/assets embedfs/frontend-dist backend/cmd/desktop/rsrc_windows_amd64.syso _desktop-prepare-frontend: _frontend-install @printf 'Preparing frontend for desktop...\n' @@ -283,7 +281,7 @@ _check-linux-target-arch: fi _check-windows-target-arch: - @if [ "$(TARGET_ARCH)" != "amd64" ] && [ "$(TARGET_ARCH)" != "arm64" ]; then \ + @if [ "$(TARGET_ARCH)" != "amd64" ]; then \ printf 'Unsupported Windows TARGET_ARCH: %s\n' "$(TARGET_ARCH)"; \ exit 1; \ fi diff --git a/README.md b/README.md index 5179cc3..d1e51b5 100644 --- a/README.md +++ b/README.md @@ -109,9 +109,6 @@ make desktop-build-mac # Windows make desktop-build-win -# Windows arm64 -make desktop-build-win TARGET_ARCH=arm64 - # Linux make desktop-build-linux @@ -120,7 +117,7 @@ make desktop-build-linux TARGET_ARCH=arm64 ``` **使用桌面应用**: -- 双击启动应用(macOS: Nex.app,Windows: nex-win-amd64.exe / nex-win-arm64.exe,Linux: nex-linux-amd64 / nex-linux-arm64) +- 双击启动应用(macOS: Nex.app,Windows: nex-win-amd64.exe,Linux: nex-linux-amd64 / nex-linux-arm64) - 系统托盘图标出现,浏览器自动打开管理界面 - 点击托盘图标显示菜单,可打开管理界面或退出 - 关闭浏览器后服务继续运行,可通过托盘重新打开 @@ -175,7 +172,6 @@ make server-build | macOS arm64 | `nex-server__macos_arm64.tar.gz` | | macOS universal | `nex-server__macos_universal.tar.gz` | | Windows amd64 | `nex-server__windows_amd64.zip` | -| Windows arm64 | `nex-server__windows_arm64.zip` | **web 产物**: @@ -191,7 +187,6 @@ make server-build | Linux arm64 | `nex-desktop__linux_arm64.tar.gz`、`.AppImage`、`.deb`、`.rpm` | | macOS universal | `nex-desktop__macos_universal.zip`、`nex-desktop__macos_universal.dmg` | | Windows amd64 | `nex-desktop__windows_amd64.zip` | -| Windows arm64 | `nex-desktop__windows_arm64.zip` | Linux deb 包声明 `libgtk-3-0`、`libayatana-appindicator3-1`、`xdg-utils` 运行依赖;rpm 包声明 `gtk3`、`libayatana-appindicator-gtk3`、`xdg-utils` 运行依赖。Rocky Linux 9 等发行版可能需要启用 EPEL 才能解析 Ayatana AppIndicator 依赖。 diff --git a/openspec/specs/desktop-app/spec.md b/openspec/specs/desktop-app/spec.md index d5f6d81..a5e55b8 100644 --- a/openspec/specs/desktop-app/spec.md +++ b/openspec/specs/desktop-app/spec.md @@ -152,9 +152,9 @@ TBD - 提供跨平台桌面应用支持,将后端服务与前端静态资源 #### Scenario: Windows 构建 - **WHEN** 执行 Windows desktop 构建命令且当前版本为 `1.2.3` -- **THEN** 系统 SHALL 生成 Windows amd64 和 arm64 desktop 可执行文件 +- **THEN** 系统 SHALL 生成 Windows amd64 desktop 可执行文件 - **AND** Windows desktop 构建 SHALL 使用 `-H=windowsgui` linker flag 隐藏控制台窗口 -- **AND** 最终 Windows desktop 发布资产文件名 SHALL 包含 `1.2.3`、`windows` 和对应架构标识 +- **AND** 最终 Windows desktop 发布资产文件名 SHALL 包含 `1.2.3`、`windows` 和 `amd64` #### Scenario: Linux 构建 diff --git a/openspec/specs/release-pipeline/spec.md b/openspec/specs/release-pipeline/spec.md index c6b7087..f611a66 100644 --- a/openspec/specs/release-pipeline/spec.md +++ b/openspec/specs/release-pipeline/spec.md @@ -43,7 +43,6 @@ - **AND** 系统 SHALL 生成 `nex-server__macos_arm64.tar.gz` - **AND** 系统 SHALL 生成 `nex-server__macos_universal.tar.gz` - **AND** 系统 SHALL 生成 `nex-server__windows_amd64.zip` -- **AND** 系统 SHALL 生成 `nex-server__windows_arm64.zip` #### Scenario: web 发布构建 @@ -66,9 +65,7 @@ - **WHEN** 发布流水线执行 Windows desktop 发布构建 - **THEN** 系统 SHALL 在包含对应架构 MSYS2/MinGW 或等价 CGO 工具链的环境中构建 - **AND** Windows amd64 desktop 发布构建 SHALL 在 `windows-latest` runner 上的 MSYS2 MINGW64 环境中执行 -- **AND** Windows arm64 desktop 发布构建 SHALL 在 `windows-11-arm` runner 上的 MSYS2 CLANGARM64 环境中执行 - **AND** 系统 SHALL 生成 `nex-desktop__windows_amd64.zip` -- **AND** 系统 SHALL 生成 `nex-desktop__windows_arm64.zip` - **AND** 系统 SHALL NOT 在构建步骤中显式传递 TARGET_ARCH 参数 #### Scenario: macOS desktop 发布构建 @@ -120,22 +117,6 @@ - **THEN** 发布流水线 SHALL 在正式构建前失败 - **AND** 系统 SHALL 在日志中标识缺失的工具链名称 -### Requirement: Windows arm64 CGO 编译器指定 - -系统 SHALL 在 Windows arm64 发布构建中显式指定 `CC=clang` 和 `CXX=clang++` 环境变量,确保 Go cgo 在 MSYS2 CLANGARM64 环境下使用正确的 C 编译器进行 `windows/arm64` 交叉编译。 - -#### Scenario: Windows arm64 构建使用 clang - -- **WHEN** 发布流水线在 `windows-11-arm` runner 上执行 Windows arm64 构建步骤 -- **THEN** 构建步骤 SHALL 将 `CC=clang` 和 `CXX=clang++` 注入 go build 环境 -- **AND** Go cgo SHALL 使用 `clang` 编译 `runtime/cgo` 等 CGO 组件 - -#### Scenario: Windows amd64 构建保持 gcc - -- **WHEN** 发布流水线在 `windows-latest` runner 上执行 Windows amd64 构建步骤 -- **THEN** 构建步骤 MAY 显式指定 `CC=gcc` 和 `CXX=g++` 或依赖 Go 默认编译器探测 -- **AND** 显式指定的 `gcc` SHALL 等价于 MSYS2 MINGW64 默认 C 编译器(`x86_64-w64-mingw32-gcc`) - ### Requirement: 发布流水线 LFS 资产拉取 发布流水线 SHALL 在所有会 checkout 仓库并参与版本校验、web 构建、server 构建或 desktop 构建的 job 中拉取 Git LFS 真实文件,确保发布构建读取到真实二进制资产而非 LFS pointer 文本。 @@ -195,7 +176,7 @@ - **WHEN** 当前发布版本为 `1.2.3` - **THEN** Linux server 发布资产文件名 SHALL 为 `nex-server_1.2.3_linux_amd64.tar.gz` 和 `nex-server_1.2.3_linux_arm64.tar.gz` - **AND** macOS server 发布资产文件名 SHALL 为 `nex-server_1.2.3_macos_amd64.tar.gz`、`nex-server_1.2.3_macos_arm64.tar.gz` 和 `nex-server_1.2.3_macos_universal.tar.gz` -- **AND** Windows server 发布资产文件名 SHALL 为 `nex-server_1.2.3_windows_amd64.zip` 和 `nex-server_1.2.3_windows_arm64.zip` +- **AND** Windows server 发布资产文件名 SHALL 为 `nex-server_1.2.3_windows_amd64.zip` #### Scenario: web 资产命名 @@ -207,7 +188,7 @@ - **WHEN** 当前发布版本为 `1.2.3` - **THEN** Linux desktop 发布资产文件名 SHALL 使用 `nex-desktop_1.2.3_linux_.` 格式 -- **AND** Windows desktop 发布资产文件名 SHALL 为 `nex-desktop_1.2.3_windows_amd64.zip` 和 `nex-desktop_1.2.3_windows_arm64.zip` +- **AND** Windows desktop 发布资产文件名 SHALL 为 `nex-desktop_1.2.3_windows_amd64.zip` - **AND** macOS desktop 发布资产文件名 SHALL 为 `nex-desktop_1.2.3_macos_universal.zip` 和 `nex-desktop_1.2.3_macos_universal.dmg` - **AND** 发布资产文件名中的 macOS 平台字段 SHALL 使用 `macos` 而非 `darwin` diff --git a/versionctl/projectversion/version.go b/versionctl/projectversion/version.go index a41f5d9..fe7b2b7 100644 --- a/versionctl/projectversion/version.go +++ b/versionctl/projectversion/version.go @@ -288,7 +288,6 @@ func serverAssetName(version, platform, arch, format string) (string, error) { {platform: "macos", arch: "arm64", format: "tar.gz"}, {platform: "macos", arch: "universal", format: "tar.gz"}, {platform: "windows", arch: "amd64", format: "zip"}, - {platform: "windows", arch: "arm64", format: "zip"}, }) { return "", fmt.Errorf("不支持的 server 资产目标 %s/%s/%s", platform, arch, format) } @@ -321,7 +320,6 @@ func desktopAssetName(version, platform, arch, format string) (string, error) { {platform: "macos", arch: "universal", format: "zip"}, {platform: "macos", arch: "universal", format: "dmg"}, {platform: "windows", arch: "amd64", format: "zip"}, - {platform: "windows", arch: "arm64", format: "zip"}, }) { return "", fmt.Errorf("不支持的 desktop 资产目标 %s/%s/%s", platform, arch, format) } diff --git a/versionctl/projectversion/version_test.go b/versionctl/projectversion/version_test.go index 895d62f..39e0b33 100644 --- a/versionctl/projectversion/version_test.go +++ b/versionctl/projectversion/version_test.go @@ -97,7 +97,6 @@ func TestAssetNames(t *testing.T) { {"server macos arm64", "server", "macos", "arm64", "tar.gz", "nex-server_1.2.3_macos_arm64.tar.gz"}, {"server macos universal", "server", "macos", "universal", "tar.gz", "nex-server_1.2.3_macos_universal.tar.gz"}, {"server windows amd64", "server", "windows", "amd64", "zip", "nex-server_1.2.3_windows_amd64.zip"}, - {"server windows arm64", "server", "windows", "arm64", "zip", "nex-server_1.2.3_windows_arm64.zip"}, {"web", "web", "", "", "tar.gz", "nex-web_1.2.3.tar.gz"}, {"desktop linux amd64 tar", "desktop", "linux", "amd64", "tar.gz", "nex-desktop_1.2.3_linux_amd64.tar.gz"}, {"desktop linux amd64 appimage", "desktop", "linux", "amd64", "AppImage", "nex-desktop_1.2.3_linux_amd64.AppImage"}, @@ -110,7 +109,6 @@ func TestAssetNames(t *testing.T) { {"desktop macos zip", "desktop", "macos", "universal", "zip", "nex-desktop_1.2.3_macos_universal.zip"}, {"desktop macos dmg", "desktop", "macos", "universal", "dmg", "nex-desktop_1.2.3_macos_universal.dmg"}, {"desktop windows amd64", "desktop", "windows", "amd64", "zip", "nex-desktop_1.2.3_windows_amd64.zip"}, - {"desktop windows arm64", "desktop", "windows", "arm64", "zip", "nex-desktop_1.2.3_windows_arm64.zip"}, } for _, tc := range testCases {