diff --git a/.github/workflows/build-artifacts.yml b/.github/workflows/build-artifacts.yml index 5123df6..4ddf880 100644 --- a/.github/workflows/build-artifacts.yml +++ b/.github/workflows/build-artifacts.yml @@ -103,14 +103,36 @@ jobs: name: frontend-dist path: frontend/dist + # The icon, version strings, and DPI manifest reach a Windows binary only + # through a .syso the linker finds inside the package being built. This + # workflow calls `go build` directly rather than going through + # build/windows/Taskfile.yml, so the step has to be repeated here -- doing + # it only in the Taskfile would leave every released .exe on the default + # executable icon while local builds looked correct. + - name: Compile Windows resources + if: matrix.target.platform == 'windows' + shell: bash + working-directory: build + run: | + go run github.com/wailsapp/wails/v3/cmd/wails3@v3.0.0-beta.4 generate syso \ + -icon windows/icon.ico \ + -manifest windows/wails.exe.manifest \ + -info windows/info.json \ + -arch "$GOARCH" \ + -out "../cmd/oneagent-desktop/rsrc_windows_${GOARCH}.syso" + - name: Build binaries shell: bash run: | mkdir -p bin version_ldflag="-X github.com/MaimoryLab/OneAgent/internal/version.Version=$RELEASE_VERSION" if [ "${{ matrix.target.platform }}" = windows ]; then - GOARCH=amd64 go run github.com/wailsapp/wails/v3/cmd/wails3@v3.0.0-beta.4 generate icons -input build/appicon.png -macfilename "" -windowsfilename build/windows/icon.ico - GOARCH=amd64 go run github.com/wailsapp/wails/v3/cmd/wails3@v3.0.0-beta.4 generate syso -arch "${GOARCH}" -icon build/windows/icon.ico -manifest build/windows/wails.exe.manifest -out "cmd/oneagent-desktop/wails_windows_${GOARCH}.syso" + # No `generate icons` step: build/windows/icon.ico is tracked. That + # generator scales every entry from appicon.png, and its 16x16 -- the + # size Explorer and the taskbar use -- collapses into a solid block, + # so the tracked file carries a hand-drawn entry there. Regenerating + # would have replaced it on every release build. + GOARCH=amd64 go run github.com/wailsapp/wails/v3/cmd/wails3@v3.0.0-beta.4 generate syso -arch "${GOARCH}" -icon build/windows/icon.ico -manifest build/windows/wails.exe.manifest -info build/windows/info.json -out "cmd/oneagent-desktop/wails_windows_${GOARCH}.syso" fi go build -tags wails,production -trimpath -buildvcs=false -ldflags="${{ matrix.target.desktop_ldflags }} $version_ldflag" -o "bin/oneagent-desktop${{ matrix.target.suffix }}" ./cmd/oneagent-desktop rm -f "cmd/oneagent-desktop/wails_windows_${GOARCH}.syso" diff --git a/.gitignore b/.gitignore index e1cd1c4..03b3637 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,7 @@ site/ # 对竞品的定向调研笔记:含内部评价措辞,保留本机参考但不随开源仓库分发。 docs/internal/cc-switch-reference-notes.md + +# Windows 资源产物:图标、版本号和 DPI manifest 由 build/windows/ 下的源文件 +# 在构建时编译进 .syso。它必须落在被构建的包目录里链接器才认,构建完即删除。 +cmd/oneagent-desktop/*.syso diff --git a/NOTICE b/NOTICE index 7d83f8e..ba75b12 100644 --- a/NOTICE +++ b/NOTICE @@ -63,6 +63,17 @@ Every mark is distributed as a single-colour glyph painted with fill="currentColor", so it takes the surrounding text colour rather than carrying a brand colour. +OneAgent's own mark is not part of that inventory and is not third-party +material. It is MaimoryLab's work, distributed under this repository's Apache-2.0 +license, and appears at frontend/src/components/icons/assets/oneagent-mark.svg +in the interface and at build/appicon.png, build/darwin/icons.icns, and +build/windows/icon.ico as the application icon. It is recorded under +`firstPartyAssets` in frontend/src/components/icons/asset-rights.json, kept +separate from the `assets` inventory above because it has no third-party source, +licence text or copyright owner to record -- listing it there would assert a +provenance it does not have. It is named here so the inventory above is not read +as covering every image in the release. + Sponsor marks are a separate case and are not nominative use. The PPIO and Novita logos under docs/assets/sponsors/ are reproduced with each owner's permission to identify a sponsor of this project, and they do carry their brand diff --git a/build/Taskfile.yml b/build/Taskfile.yml index 8f8cc13..abe0747 100644 --- a/build/Taskfile.yml +++ b/build/Taskfile.yml @@ -70,19 +70,14 @@ tasks: cmds: - '{{.WAILS3}} generate icons -input appicon.png -macfilename darwin/icons.icns -windowsfilename ""' - generate:windows:icon: - summary: Generate the Windows application icon - run: once - dir: build - sources: - - appicon.png - generates: - - windows/icon.ico - env: - # The generator runs on the host; GOARCH may be the cross-compile target. - GOARCH: amd64 - cmds: - - '{{.WAILS3}} generate icons -input appicon.png -macfilename "" -windowsfilename windows/icon.ico' + # windows/icon.ico is tracked rather than generated, so there is deliberately no + # generate:windows:icon task. `wails3 generate icons` scales every entry from + # appicon.png, and at 16x16 -- the size Explorer and the taskbar use -- the ring + # stroke, its counter, and the inner form each land on under 2.4px and blend + # into a solid block, losing the break in the ring. That entry is hand-drawn. + # A task that regenerated the file would discard it on every `task package`, + # silently and without failing. Re-run `wails3 generate icons` by hand only if + # the mark itself changes, then restore the 16x16 entry. dev:frontend: summary: Runs the Vite dev server (used by `task dev`) diff --git a/build/appicon.png b/build/appicon.png index c0247b1..393e465 100644 Binary files a/build/appicon.png and b/build/appicon.png differ diff --git a/build/darwin/icons.icns b/build/darwin/icons.icns index 5b9aaa2..ee65379 100644 Binary files a/build/darwin/icons.icns and b/build/darwin/icons.icns differ diff --git a/build/windows/Taskfile.yml b/build/windows/Taskfile.yml index 4e68a9e..ec7bc0b 100644 --- a/build/windows/Taskfile.yml +++ b/build/windows/Taskfile.yml @@ -17,6 +17,9 @@ tasks: ARCH: '{{.ARCH | default ARCH}}' cmds: - go build {{.BUILD_FLAGS}} -o "{{.OUTPUT}}" ./cmd/oneagent-desktop + # The .syso is a build input for GOOS=windows only. Left in place it would + # be picked up by a native Windows build of any other target in this repo, + # and its arch suffix makes it wrong for the other architecture. - cmd: powershell Remove-item "cmd/oneagent-desktop/wails_windows_{{.ARCH | default ARCH}}.syso" platforms: [windows] - cmd: rm -f "cmd/oneagent-desktop/wails_windows_{{.ARCH | default ARCH}}.syso" @@ -32,10 +35,12 @@ tasks: generate:syso: summary: Generates Windows resources with the application icon dir: '{{.ROOT_DIR}}' - deps: - - task: common:generate:windows:icon + # No common:generate:windows:icon dep: build/windows/icon.ico is tracked, and + # regenerating it from appicon.png would replace its hand-drawn 16x16 entry -- + # the size Explorer and the taskbar use, where a scaled copy of the mark + # collapses into a solid block. cmds: - - '{{.WAILS3}} generate syso -arch {{.ARCH | default ARCH}} -icon build/windows/icon.ico -manifest build/windows/wails.exe.manifest -out cmd/oneagent-desktop/wails_windows_{{.ARCH | default ARCH}}.syso' + - '{{.WAILS3}} generate syso -arch {{.ARCH | default ARCH}} -icon build/windows/icon.ico -manifest build/windows/wails.exe.manifest -info build/windows/info.json -out cmd/oneagent-desktop/wails_windows_{{.ARCH | default ARCH}}.syso' env: # The generator runs on the host; GOARCH may be the cross-compile target. GOARCH: amd64 @@ -48,7 +53,8 @@ tasks: vars: ARCH: '{{.ARCH}}' VERSION: '{{.VERSION}}' - - task: common:generate:windows:icon + # nsis/project.nsi reads the tracked ../icon.ico directly through MUI_ICON, + # so the installer needs no icon-generation step of its own. preconditions: - sh: command -v makensis >/dev/null 2>&1 msg: "makensis not found. Install NSIS first." diff --git a/build/windows/icon.ico b/build/windows/icon.ico index 34da089..ff77df9 100644 Binary files a/build/windows/icon.ico and b/build/windows/icon.ico differ diff --git a/build/windows/info.json b/build/windows/info.json new file mode 100644 index 0000000..168f1b6 --- /dev/null +++ b/build/windows/info.json @@ -0,0 +1,14 @@ +{ + "fixed": { + "file_version": "0.3.0" + }, + "info": { + "0000": { + "ProductVersion": "0.3.0", + "CompanyName": "MaimoryLab", + "FileDescription": "Local AI development environment activator", + "LegalCopyright": "(c) 2026 MaimoryLab", + "ProductName": "OneAgent" + } + } +} diff --git a/frontend/src/components/NavigationSidebar.tsx b/frontend/src/components/NavigationSidebar.tsx index 3dc3f35..91cd28e 100644 --- a/frontend/src/components/NavigationSidebar.tsx +++ b/frontend/src/components/NavigationSidebar.tsx @@ -1,7 +1,8 @@ -import { Boxes, FolderCog, Gauge, Layers3, Settings } from "lucide-react"; +import { FolderCog, Gauge, Layers3, Settings } from "lucide-react"; import { NavLink } from "react-router-dom"; import { type TranslationKey, useI18n } from "../i18n"; +import { BrandMark } from "./icons/BrandMark"; import { TaskCenter } from "./TaskCenter"; // Only real destinations belong here. /setup/* are wizard steps behind @@ -18,8 +19,11 @@ export function NavigationSidebar() { return (