Skip to content

Commit 21d1fe8

Browse files
committed
v2.0.4 - 构建优化版
🔧 核心功能改进: - 权限检查增强: 新增文件只读状态检测,提供友好的权限错误提示 - 国际化完善: 错误信息支持中英文双语显示,包含详细解决方案 - 用户体验提升: 当补丁失败时自动检测只读文件并提供操作指导 - 错误处理优化: 区分权限问题和其他写入错误,提供针对性解决建议 🍎 macOS 构建修复: - 解决 'Failed to create parent directory structure' 错误 - 提供应用包(.app)和独立可执行文件两个版本 - 自动处理 macOS 权限和安全设置 - 支持 Universal2 架构(Intel + Apple Silicon) 📚 文档完善: - 创建 docs/ 目录统一管理技术文档 - 新增专用 macOS 故障排除指南 - 提供自动化构建脚本 build_macos.sh - 完善构建说明,包含详细故障排除 - 所有文档支持中英文双语 🏗️ 项目结构优化: - 整理项目目录,文档集中到 docs/ 目录 - 清理旧版本文件和重复的 spec 文件 - 更新所有文档链接为完整 GitHub 路径 - 版本号统一更新到 2.0.4 🔧 技术改进: - 增强 PyInstaller 构建配置 - 添加更多必要的隐藏导入模块 - 优化 GitHub Actions 工作流 - 完善错误处理和权限检查机制 开发版: 构建优化版,重点解决 macOS 构建问题和权限检查增强
1 parent bdfe675 commit 21d1fe8

File tree

15 files changed

+1059
-179
lines changed

15 files changed

+1059
-179
lines changed

.github/workflows/build-release.yml

Lines changed: 58 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
version:
1010
description: 'Version to build'
1111
required: true
12-
default: '2.0.3'
12+
default: '2.0.4'
1313

1414
jobs:
1515
build:
@@ -69,15 +69,57 @@ jobs:
6969
- name: Build application (macOS)
7070
if: matrix.platform == 'macos'
7171
run: |
72+
# Create a proper macOS app bundle
7273
pyinstaller --onefile --windowed \
7374
--name "AugmentCode-Free-v${{ github.event.inputs.version || github.ref_name }}-macos" \
7475
--add-data "languages:languages" \
7576
--add-data "config:config" \
77+
--add-data "augment_tools_core:augment_tools_core" \
78+
--add-data "gui_qt6:gui_qt6" \
7679
--hidden-import=PyQt6.QtCore \
7780
--hidden-import=PyQt6.QtGui \
7881
--hidden-import=PyQt6.QtWidgets \
7982
--hidden-import=psutil \
83+
--hidden-import=sqlite3 \
84+
--hidden-import=xml.etree.ElementTree \
85+
--hidden-import=pathlib \
86+
--hidden-import=json \
87+
--hidden-import=uuid \
88+
--hidden-import=platform \
89+
--hidden-import=subprocess \
90+
--hidden-import=threading \
91+
--hidden-import=queue \
92+
--hidden-import=shutil \
93+
--hidden-import=tempfile \
8094
--collect-all=PyQt6 \
95+
--osx-bundle-identifier=com.basicprotein.augmentcode-free \
96+
--target-arch=universal2 \
97+
main.py
98+
99+
# Also create a standalone executable without app bundle for compatibility
100+
pyinstaller --onefile \
101+
--name "AugmentCode-Free-v${{ github.event.inputs.version || github.ref_name }}-macos-standalone" \
102+
--add-data "languages:languages" \
103+
--add-data "config:config" \
104+
--add-data "augment_tools_core:augment_tools_core" \
105+
--add-data "gui_qt6:gui_qt6" \
106+
--hidden-import=PyQt6.QtCore \
107+
--hidden-import=PyQt6.QtGui \
108+
--hidden-import=PyQt6.QtWidgets \
109+
--hidden-import=psutil \
110+
--hidden-import=sqlite3 \
111+
--hidden-import=xml.etree.ElementTree \
112+
--hidden-import=pathlib \
113+
--hidden-import=json \
114+
--hidden-import=uuid \
115+
--hidden-import=platform \
116+
--hidden-import=subprocess \
117+
--hidden-import=threading \
118+
--hidden-import=queue \
119+
--hidden-import=shutil \
120+
--hidden-import=tempfile \
121+
--collect-all=PyQt6 \
122+
--target-arch=universal2 \
81123
main.py
82124
83125
- name: Build application (Linux)
@@ -142,7 +184,7 @@ jobs:
142184
143185
### 📦 下载文件
144186
- **Windows**: `AugmentCode-Free-v${{ github.event.inputs.version || github.ref_name }}-windows.exe`
145-
- **macOS**: `AugmentCode-Free-v${{ github.event.inputs.version || github.ref_name }}-macos`
187+
- **macOS**: `AugmentCode-Free-v${{ github.event.inputs.version || github.ref_name }}-macos.app` (应用包) 或 `AugmentCode-Free-v${{ github.event.inputs.version || github.ref_name }}-macos-standalone` (独立可执行文件)
146188
- **Linux**: `AugmentCode-Free-v${{ github.event.inputs.version || github.ref_name }}-linux`
147189
148190
### 🚀 安装说明
@@ -153,23 +195,30 @@ jobs:
153195
3. 首次运行可能需要允许Windows Defender
154196
155197
**macOS:**
156-
1. 下载 macOS 版本
157-
2. 添加执行权限: `chmod +x AugmentCode-Free-*-macos`
158-
3. 运行: `./AugmentCode-Free-*-macos`
198+
1. 下载 macOS 版本(推荐使用 standalone 版本)
199+
2. 添加执行权限: `chmod +x AugmentCode-Free-*-macos-standalone`
200+
3. 运行: `./AugmentCode-Free-*-macos-standalone`
159201
4. 如遇安全提示,请在系统偏好设置中允许
202+
5. 或者使用 .app 版本:双击 `AugmentCode-Free-*-macos.app`
160203
161204
**Linux:**
162205
1. 下载 Linux 版本
163206
2. 添加执行权限: `chmod +x AugmentCode-Free-*-linux`
164207
3. 运行: `./AugmentCode-Free-*-linux`
165208
166209
### 🔧 技术改进 v${{ github.event.inputs.version || github.ref_name }}
167-
- ✅ 修复按钮显示键名问题,现在正确显示中文/英文文本
168-
- ✅ 修复PyInstaller打包缺失语言文件的问题
169-
- ✅ 完善所有工作线程和补丁操作的国际化支持
170-
- ✅ 修复补丁状态"已补丁"等硬编码文本
210+
- ✅ 权限检查增强:新增文件只读状态检测,提供友好的权限错误提示
211+
- ✅ 国际化完善:错误信息支持中英文双语显示,包含详细解决方案
212+
- ✅ macOS 构建修复:解决 "Failed to create parent directory structure" 错误
213+
- ✅ 双版本支持:提供应用包(.app)和独立可执行文件两个版本
171214
- ✅ 支持Windows、macOS、Linux多平台自动构建
215+
- ✅ 完善构建文档:新增 macOS 故障排除指南和自动化脚本
172216
217+
### 📖 文档链接
218+
- 📋 [构建说明](https://github.com/BasicProtein/AugmentCode-Free/blob/main/docs/BUILD_INSTRUCTIONS.md)
219+
- 🔧 [macOS 故障排除指南](https://github.com/BasicProtein/AugmentCode-Free/blob/main/docs/MACOS_TROUBLESHOOTING.md)
220+
- 📖 [完整文档](https://github.com/BasicProtein/AugmentCode-Free/blob/main/README.md)
221+
173222
### ⚠️ 重要提示
174223
- 本项目完全开源免费!
175224
- 如有人向您收费,请立即举报诈骗行为

BUILD_INSTRUCTIONS.md

Lines changed: 0 additions & 153 deletions
This file was deleted.

README.md

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,27 @@ https://t.me/+rL2-my2wYy5hODA1
1818
[![License](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
1919
[![Platform](https://img.shields.io/badge/Platform-Windows%20%7C%20Linux%20%7C%20macOS-lightgrey.svg)](https://github.com/BasicProtein/AugmentCode-Free)
2020

21+
#### 2025年8月22日更新 (v2.0.4):
22+
23+
**🔧 构建优化版 / Build Optimized Version**
24+
25+
**核心功能改进 / Core Feature Improvements:**
26+
- **权限检查增强 / Enhanced Permission Check**:新增文件只读状态检测,提供友好的权限错误提示 / Added read-only file detection with friendly permission error messages
27+
- **国际化完善 / Improved Internationalization**:错误信息支持中英文双语显示,包含详细解决方案 / Error messages support bilingual display with detailed solutions
28+
- **用户体验提升 / Enhanced User Experience**:当补丁失败时,自动检测是否为只读文件并提供具体操作指导 / Automatically detects read-only files when patching fails and provides specific guidance
29+
- **错误处理优化 / Optimized Error Handling**:区分权限问题和其他写入错误,提供针对性的解决建议 / Distinguishes permission issues from other write errors with targeted solutions
30+
31+
**macOS 构建修复 / macOS Build Fixes:**
32+
- **构建问题修复 / Build Issues Fixed**:解决 "Failed to create parent directory structure" 错误 / Fixed "Failed to create parent directory structure" error
33+
- **双版本支持 / Dual Version Support**:提供应用包(.app)和独立可执行文件两个版本 / Provides both app bundle (.app) and standalone executable versions
34+
- **权限优化 / Permission Optimization**:自动处理 macOS 权限和安全设置 / Automatically handles macOS permissions and security settings
35+
- **架构支持 / Architecture Support**:支持 Universal2 架构(Intel + Apple Silicon)/ Supports Universal2 architecture (Intel + Apple Silicon)
36+
37+
**文档完善 / Documentation Improvements:**
38+
- **构建指南 / Build Guide**:更新 macOS 构建说明,包含详细的故障排除 / Updated macOS build instructions with detailed troubleshooting
39+
- **故障排除 / Troubleshooting**:新增专用的 [macOS 故障排除指南](https://github.com/BasicProtein/AugmentCode-Free/blob/main/docs/MACOS_TROUBLESHOOTING.md) / Added dedicated [macOS Troubleshooting Guide](https://github.com/BasicProtein/AugmentCode-Free/blob/main/docs/MACOS_TROUBLESHOOTING.md)
40+
- **自动化脚本 / Automation Scripts**:提供 `build_macos.sh` 自动构建脚本 / Provides `build_macos.sh` automated build script
41+
2142
#### 2025年8月14日更新 (v2.0.2):
2243

2344
**🔍 扩展文件扫描优化**
@@ -591,23 +612,41 @@ Use these tools at your own risk. Always back up important data before running m
591612

592613
**(重要的事情说三遍!)**
593614

615+
## 📦 下载与安装 / Download & Installation
616+
617+
### 预编译版本 / Pre-built Releases
618+
619+
从 [GitHub Releases](https://github.com/BasicProtein/AugmentCode-Free/releases) 下载最新版本:
620+
621+
- **Windows**: `AugmentCode-Free-v2.0.4-windows.exe`
622+
- **macOS**: `AugmentCode-Free-v2.0.4-macos.app``AugmentCode-Free-v2.0.4-macos-standalone`
623+
- **Linux**: `AugmentCode-Free-v2.0.4-linux`
624+
625+
### macOS 用户特别说明 / Special Notes for macOS Users
626+
627+
如果遇到构建或运行问题,请参考:
628+
- 📖 [构建说明 / Build Instructions](https://github.com/BasicProtein/AugmentCode-Free/blob/main/docs/BUILD_INSTRUCTIONS.md)
629+
- 🔧 [macOS 故障排除指南 / macOS Troubleshooting Guide](https://github.com/BasicProtein/AugmentCode-Free/blob/main/docs/MACOS_TROUBLESHOOTING.md)
630+
631+
## 🚀 使用方法 / Usage
632+
594633
您可以通过两种方式使用 AugmentCode-Free:
595634

596-
### 1. 图形用户界面 (GUI) - 推荐
635+
### 1. 图形用户界面 (GUI) - 推荐 / Graphical User Interface (Recommended)
597636
GUI 为所有功能提供了简单易用的操作界面。
598637

599-
- **直接运行 (从项目根目录):**
638+
- **直接运行 (从项目根目录) / Direct Run (from project root):**
600639
```bash
601640
python main.py
602641
```
603642

604-
- **如果通过 pip 安装 (作为 `augment-tools-gui`):**
643+
- **如果通过 pip 安装 (作为 `augment-tools-gui`) / If installed via pip:**
605644
```bash
606645
augment-tools-gui
607646
```
608647

609-
### 2. 命令行界面 (CLI)
610-
适用于喜欢命令行或需要编写脚本自动执行操作的用户。
648+
### 2. 命令行界面 (CLI) / Command Line Interface
649+
适用于喜欢命令行或需要编写脚本自动执行操作的用户。/ For users who prefer command line or need to automate operations with scripts.
611650

612651
- **如果通过 pip 安装 (作为 `augment-tools`):**
613652
```bash

0 commit comments

Comments
 (0)