refactor(desktop): move desktop_release/ → frontends/desktop/packaging/
Co-locate desktop packaging scripts with the Tauri app, declutter repo root. Drop legacy manual-install flow (install.bat/start_windows.bat/ README_WINDOWS.md) and unused apps/ placeholder tree. Update CI workflow paths and TODO references accordingly. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
e453b21d6c
commit
19231dede2
18 files changed
+50
-102
No files matched your search
@@ -72,10 +72,10 @@ jobs:
|
||||
|
||||
# exe at the top level, named GenericAgent (typical portable form)
|
||||
cp "$EXE_SRC" "$PKG/GenericAgent.exe"
|
||||
cp desktop_release/scripts/windows/install_windows.ps1 "$RUNTIME/install_windows.ps1"
|
||||
cp frontends/desktop/packaging/scripts/windows/install_windows.ps1 "$RUNTIME/install_windows.ps1"
|
||||
# Uninstaller: double-click entry at top level, worker script under runtime/.
|
||||
cp desktop_release/scripts/windows/uninstall.bat "$PKG/uninstall.bat"
|
||||
cp desktop_release/scripts/windows/uninstall_windows.ps1 "$RUNTIME/uninstall_windows.ps1"
|
||||
cp frontends/desktop/packaging/scripts/windows/uninstall.bat "$PKG/uninstall.bat"
|
||||
cp frontends/desktop/packaging/scripts/windows/uninstall_windows.ps1 "$RUNTIME/uninstall_windows.ps1"
|
||||
|
||||
# Embedded Python (python-build-standalone, windows x86_64, 3.12 install_only).
|
||||
# browser_download_url is URL-encoded ('+' -> '%2B'); match loosely with '.*'.
|
||||
@@ -102,7 +102,7 @@ jobs:
|
||||
--exclude='./.git' --exclude='./.github' \
|
||||
--exclude='./frontends/desktop/src-tauri' \
|
||||
--exclude='./frontends/desktop/node_modules' \
|
||||
--exclude='./desktop_release' --exclude='./docs' \
|
||||
--exclude='./frontends/desktop/packaging' --exclude='./docs' \
|
||||
--exclude='./assets/demo' --exclude='./assets/images' \
|
||||
--exclude='./assets/GenericAgent_Technical_Report.pdf' \
|
||||
--exclude='./artifacts' \
|
||||
@@ -285,10 +285,10 @@ jobs:
|
||||
chmod +x "$PKG/GenericAgent.AppImage"
|
||||
# Icon for the generated .desktop launcher (Icon= needs a real image file on Linux).
|
||||
cp frontends/desktop/src-tauri/icons/icon.png "$PKG/GenericAgent.png"
|
||||
cp desktop_release/scripts/linux/install_linux.sh "$RUNTIME/install_linux.sh"
|
||||
cp frontends/desktop/packaging/scripts/linux/install_linux.sh "$RUNTIME/install_linux.sh"
|
||||
chmod +x "$RUNTIME/install_linux.sh"
|
||||
# Uninstaller: top-level entry next to the AppImage.
|
||||
cp desktop_release/scripts/linux/uninstall.sh "$PKG/uninstall.sh"
|
||||
cp frontends/desktop/packaging/scripts/linux/uninstall.sh "$PKG/uninstall.sh"
|
||||
chmod +x "$PKG/uninstall.sh"
|
||||
|
||||
# Embedded Python (python-build-standalone, linux x86_64, 3.12 install_only).
|
||||
@@ -315,7 +315,7 @@ jobs:
|
||||
--exclude='./.git' --exclude='./.github' \
|
||||
--exclude='./frontends/desktop/src-tauri' \
|
||||
--exclude='./frontends/desktop/node_modules' \
|
||||
--exclude='./desktop_release' --exclude='./docs' \
|
||||
--exclude='./frontends/desktop/packaging' --exclude='./docs' \
|
||||
--exclude='./assets/demo' --exclude='./assets/images' \
|
||||
--exclude='./assets/GenericAgent_Technical_Report.pdf' \
|
||||
--exclude='./artifacts' \
|
||||
@@ -482,7 +482,7 @@ jobs:
|
||||
# 2) Standard DMG: GenericAgent.app with runtime embedded in Contents/Resources/runtime.
|
||||
RUNTIME_SRC="artifacts/macos/runtime-src"
|
||||
mkdir -p "$RUNTIME_SRC"
|
||||
cp desktop_release/scripts/macos/install_macos.sh "$RUNTIME_SRC/install_macos.sh"
|
||||
cp frontends/desktop/packaging/scripts/macos/install_macos.sh "$RUNTIME_SRC/install_macos.sh"
|
||||
chmod +x "$RUNTIME_SRC/install_macos.sh"
|
||||
|
||||
# Embedded Python (python-build-standalone, macOS, 3.12 install_only; aarch64 preferred).
|
||||
@@ -521,7 +521,7 @@ jobs:
|
||||
--exclude='.git' --exclude='.github' \
|
||||
--exclude='frontends/desktop/src-tauri' \
|
||||
--exclude='frontends/desktop/node_modules' \
|
||||
--exclude='desktop_release' --exclude='docs' \
|
||||
--exclude='frontends/desktop/packaging' --exclude='docs' \
|
||||
--exclude='assets/demo' --exclude='assets/images' \
|
||||
--exclude='assets/GenericAgent_Technical_Report.pdf' \
|
||||
--exclude='artifacts' \
|
||||
@@ -541,7 +541,7 @@ jobs:
|
||||
# Portable zip: keep the existing release shape and helper scripts.
|
||||
ditto "$APP_SRC" "$PORTABLE/GenericAgent.app"
|
||||
ditto "$RUNTIME_SRC" "$PORTABLE/runtime"
|
||||
cp desktop_release/scripts/macos/uninstall.command "$PORTABLE/uninstall.command"
|
||||
cp frontends/desktop/packaging/scripts/macos/uninstall.command "$PORTABLE/uninstall.command"
|
||||
chmod +x "$PORTABLE/uninstall.command"
|
||||
cat > "$PORTABLE/Start GenericAgent.command" <<'EOF'
|
||||
#!/bin/bash
|
||||
|
||||
Whitespace-only changes.
@@ -1,35 +0,0 @@
|
||||
# Linux 桌面壳
|
||||
|
||||
真实二进制壳不直接提交到 Git 仓库。
|
||||
|
||||
测试时请从项目 Release/内部发布位置下载 Linux 版本壳,并放到本目录。
|
||||
|
||||
常见形式可能是:
|
||||
|
||||
```text
|
||||
GenericAgent.AppImage
|
||||
genericagent.deb
|
||||
genericagent.rpm
|
||||
```
|
||||
|
||||
具体文件名以后续发布说明为准。
|
||||
|
||||
## AppImage 构建参考
|
||||
|
||||
当前仓库尚未把 Linux AppImage 构建纳入正式 CI/workflow,也未将 `frontends/desktop/src-tauri/tauri.conf.json` 的 `bundle.targets` 改为固定包含 Linux target。
|
||||
|
||||
如需在 Linux 环境中临时构建 AppImage,可参考此前在 Ubuntu 24.04.4 LTS x64 VM 中初步跑通过的 Tauri CLI 命令:
|
||||
|
||||
```bash
|
||||
cd frontends/desktop
|
||||
npm install
|
||||
npm run tauri build -- --bundles appimage
|
||||
```
|
||||
|
||||
产物通常位于:
|
||||
|
||||
```text
|
||||
frontends/desktop/src-tauri/target/release/bundle/appimage/*.AppImage
|
||||
```
|
||||
|
||||
该流程目前仅作为后续正式 Linux 构建/CI 的参考,完整发布前仍需补充依赖安装、artifact 上传、校验和生成以及实际平台验证。
|
||||
Whitespace-only changes.
@@ -1,14 +0,0 @@
|
||||
# macOS 桌面壳
|
||||
|
||||
真实二进制壳不直接提交到 Git 仓库。
|
||||
|
||||
测试时请从项目 Release/内部发布位置下载 macOS 版本壳,并放到本目录。
|
||||
|
||||
常见形式可能是:
|
||||
|
||||
```text
|
||||
GenericAgent.app
|
||||
GenericAgent.dmg
|
||||
```
|
||||
|
||||
具体文件名以后续发布说明为准。
|
||||
Whitespace-only changes.
@@ -1,17 +0,0 @@
|
||||
# Windows 桌面壳
|
||||
|
||||
真实二进制壳不直接提交到 Git 仓库。
|
||||
|
||||
测试时请从项目 Release/内部发布位置下载 Windows 版本壳,并放到本目录,例如:
|
||||
|
||||
```text
|
||||
release/apps/windows/ga-desktop.exe
|
||||
```
|
||||
|
||||
然后先运行:
|
||||
|
||||
```text
|
||||
release/scripts/windows/install.bat
|
||||
```
|
||||
|
||||
脚本完成后再启动桌面壳。
|
||||
@@ -1,21 +0,0 @@
|
||||
@echo off
|
||||
setlocal
|
||||
cd /d "%~dp0"
|
||||
echo GenericAgent Desktop Windows setup
|
||||
echo.
|
||||
echo Recommended location: put this whole folder under GenericAgent\frontends\
|
||||
echo Example: GenericAgent\frontends\GenericAgent-Desktop-Windows\install.bat
|
||||
echo This script will prepare Python/.venv, install minimal dependencies, and write %%USERPROFILE%%\.ga_desktop_settings.json.
|
||||
echo.
|
||||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0install_windows.ps1" -Mode PrepareOnly -SkipNpmInstall %*
|
||||
if errorlevel 1 (
|
||||
echo.
|
||||
echo Setup failed. If the project root was not found, run:
|
||||
echo powershell -ExecutionPolicy Bypass -File .\install_windows.ps1 -ProjectDir D:\path\to\GenericAgent -Mode PrepareOnly -SkipNpmInstall
|
||||
echo.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
echo.
|
||||
echo Setup finished. You can now run start_windows.bat.
|
||||
pause
|
||||
File renamed without changes.
@@ -0,0 +1,35 @@
|
||||
# packaging
|
||||
|
||||
桌面端发布相关材料。本目录的内容**不会**整体打进发布包——CI
|
||||
(`.github/workflows/desktop-release-package.yml`)只从这里挑选 `scripts/` 下的
|
||||
安装/卸载脚本拷进各平台的发布产物,其余文件对构建打包过程是只读参考。
|
||||
|
||||
## 目录结构
|
||||
|
||||
```
|
||||
frontends/desktop/packaging/
|
||||
├── README.md # 本说明
|
||||
├── CHECKLIST.md # 发布前功能测试清单(测试协调用,不参与打包)
|
||||
├── TODO.md # 各平台测试分工与计划(测试协调用,不参与打包)
|
||||
└── scripts/ # ← 唯一被 CI 消费的内容
|
||||
├── windows/
|
||||
│ ├── install_windows.ps1 # 环境准备脚本
|
||||
│ ├── uninstall.bat # 卸载入口(向用户确认后调用 ps1)
|
||||
│ └── uninstall_windows.ps1
|
||||
├── linux/
|
||||
│ ├── install_linux.sh
|
||||
│ └── uninstall.sh
|
||||
└── macos/
|
||||
├── install_macos.sh
|
||||
└── uninstall.command
|
||||
```
|
||||
|
||||
## CI 如何使用这些脚本
|
||||
|
||||
`desktop-release-package.yml` 在打各平台 portable 包时,把对应平台的脚本
|
||||
`cp` 进发布目录(例如 Windows 包里放 `install_windows.ps1` /
|
||||
`uninstall.bat` / `uninstall_windows.ps1`)。**修改安装/卸载行为只需改
|
||||
`scripts/` 下的文件,不需要动 workflow。**
|
||||
|
||||
> 说明:实际的桌面壳二进制(`GenericAgent.exe` / `.AppImage` / `.app`)由 CI
|
||||
> 构建生成并发布到 GitHub Release,不在本仓库内提交,也不在本目录占位。
|
||||
@@ -57,19 +57,19 @@ SHA256SUMS.txt
|
||||
|
||||
```powershell
|
||||
# 在仓库根目录执行
|
||||
.\desktop_release\scripts\windows\install_windows.ps1
|
||||
.\frontends\desktop\packaging\scripts\windows\install_windows.ps1
|
||||
```
|
||||
|
||||
环境配置脚本 Linux 可参考:
|
||||
|
||||
```bash
|
||||
chmod +x desktop_release/scripts/linux/install_linux.sh
|
||||
./desktop_release/scripts/linux/install_linux.sh --mode PrepareOnly
|
||||
chmod +x frontends/desktop/packaging/scripts/linux/install_linux.sh
|
||||
./frontends/desktop/packaging/scripts/linux/install_linux.sh --mode PrepareOnly
|
||||
chmod +x GenericAgent-Desktop-Linux.AppImage
|
||||
./GenericAgent-Desktop-Linux.AppImage
|
||||
```
|
||||
|
||||
说明:Linux 脚本 `desktop_release/scripts/linux/install_linux.sh` 目前作为参考实现使用,已在 Ubuntu 24.04.4 LTS x64 上做过初步试用,但仍需按清单做完整验证。脚本核心做法是准备运行环境,并写入用户级桌面配置(如 `~/.ga_desktop_settings.json`),让程序壳能找到 `project_dir`、`python_path` 和 bridge 脚本。
|
||||
说明:Linux 脚本 `frontends/desktop/packaging/scripts/linux/install_linux.sh` 目前作为参考实现使用,已在 Ubuntu 24.04.4 LTS x64 上做过初步试用,但仍需按清单做完整验证。脚本核心做法是准备运行环境,并写入用户级桌面配置(如 `~/.ga_desktop_settings.json`),让程序壳能找到 `project_dir`、`python_path` 和 bridge 脚本。
|
||||
|
||||
### 任务 2:Release 不可用时的升级路径
|
||||
|
||||
@@ -80,6 +80,6 @@ chmod +x GenericAgent-Desktop-Linux.AppImage
|
||||
|
||||
### 任务 3:核心功能兼容性测试
|
||||
|
||||
Release 产物可以启动并连上后端后,再根据 `desktop_release/CHECKLIST.md` 测试不同平台下的界面和核心功能兼容性。
|
||||
Release 产物可以启动并连上后端后,再根据 `frontends/desktop/packaging/CHECKLIST.md` 测试不同平台下的界面和核心功能兼容性。
|
||||
|
||||
---
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user