|
| 1 | +# 项目结构说明 / Project Structure |
| 2 | + |
| 3 | +## 📁 当前项目结构 / Current Structure |
| 4 | + |
| 5 | +``` |
| 6 | +audiotee-wasapi/ |
| 7 | +├── .github/ |
| 8 | +│ └── workflows/ |
| 9 | +│ └── build-release.yml # GitHub Actions 自动构建工作流 |
| 10 | +│ # GitHub Actions auto-build workflow |
| 11 | +├── src/ |
| 12 | +│ └── wasapi_capture.cpp # 主程序源代码 |
| 13 | +│ # Main program source code |
| 14 | +├── scripts/ |
| 15 | +│ ├── build.bat # CMake 构建脚本(Windows) |
| 16 | +│ │ # CMake build script (Windows) |
| 17 | +│ └── build_simple.bat # cl.exe 直接编译脚本 |
| 18 | +│ # cl.exe direct compilation script |
| 19 | +├── docs/ |
| 20 | +│ ├── QUICK_START.md # 快速开始指南 |
| 21 | +│ │ # Quick start guide |
| 22 | +│ └── RELEASE_GUIDE.md # 发布指南 |
| 23 | +│ # Release guide |
| 24 | +├── CMakeLists.txt # CMake 配置文件 |
| 25 | +│ # CMake configuration file |
| 26 | +├── build.bat # 快速构建快捷方式(调用 scripts/build.bat) |
| 27 | +│ # Quick build shortcut (calls scripts/build.bat) |
| 28 | +├── README.md # 英文主文档 |
| 29 | +│ # Main documentation (English) |
| 30 | +├── README_CN.md # 中文文档 |
| 31 | +│ # Chinese documentation |
| 32 | +├── .gitignore # Git 忽略规则 |
| 33 | +│ # Git ignore rules |
| 34 | +└── PROJECT_STRUCTURE.md # 本文件 / This file |
| 35 | +``` |
| 36 | + |
| 37 | +## 📂 目录说明 / Directory Description |
| 38 | + |
| 39 | +### `.github/workflows/` |
| 40 | +包含 GitHub Actions 配置文件,用于自动化构建和发布。 |
| 41 | +Contains GitHub Actions configuration files for automated building and releasing. |
| 42 | + |
| 43 | +### `src/` |
| 44 | +存放所有源代码文件。 |
| 45 | +Contains all source code files. |
| 46 | + |
| 47 | +### `scripts/` |
| 48 | +存放构建脚本和其他辅助脚本。 |
| 49 | +Contains build scripts and other helper scripts. |
| 50 | + |
| 51 | +### `docs/` |
| 52 | +存放项目文档(除了主 README)。 |
| 53 | +Contains project documentation (except main README). |
| 54 | + |
| 55 | +## 🔨 构建说明 / Build Instructions |
| 56 | + |
| 57 | +### 快速构建 / Quick Build |
| 58 | +在项目根目录直接运行: |
| 59 | +Run in project root: |
| 60 | +```bash |
| 61 | +build.bat |
| 62 | +``` |
| 63 | + |
| 64 | +### 使用 CMake / Using CMake |
| 65 | +```bash |
| 66 | +scripts\build.bat |
| 67 | +``` |
| 68 | +或手动执行 / Or manually: |
| 69 | +```bash |
| 70 | +mkdir build |
| 71 | +cd build |
| 72 | +cmake .. -G "Visual Studio 17 2022" -A x64 |
| 73 | +cmake --build . --config Release |
| 74 | +``` |
| 75 | + |
| 76 | +### 使用 cl.exe / Using cl.exe |
| 77 | +```bash |
| 78 | +scripts\build_simple.bat |
| 79 | +``` |
| 80 | + |
| 81 | +## 📝 文档位置 / Documentation Location |
| 82 | + |
| 83 | +- **主文档 / Main README**: `README.md` (英文 / English) |
| 84 | +- **中文文档 / Chinese README**: `README_CN.md` |
| 85 | +- **快速开始 / Quick Start**: `docs/QUICK_START.md` |
| 86 | +- **发布指南 / Release Guide**: `docs/RELEASE_GUIDE.md` |
| 87 | +- **项目结构 / Project Structure**: `PROJECT_STRUCTURE.md` (本文件 / This file) |
| 88 | + |
| 89 | +## 🎯 为什么要重新组织? / Why Reorganize? |
| 90 | + |
| 91 | +### 优点 / Benefits |
| 92 | + |
| 93 | +1. **更清晰的结构 / Clearer Structure** |
| 94 | + - 源代码、脚本、文档分离 |
| 95 | + - Source code, scripts, and docs are separated |
| 96 | + |
| 97 | +2. **更易维护 / Easier Maintenance** |
| 98 | + - 每个目录有明确的职责 |
| 99 | + - Each directory has a clear responsibility |
| 100 | + |
| 101 | +3. **更专业 / More Professional** |
| 102 | + - 符合开源项目的标准结构 |
| 103 | + - Follows standard open-source project structure |
| 104 | + |
| 105 | +4. **更易扩展 / Easier to Extend** |
| 106 | + - 添加新功能时目录结构清晰 |
| 107 | + - Clear directory structure when adding new features |
| 108 | + |
| 109 | +## 🚀 Git 提交 / Git Commit |
| 110 | + |
| 111 | +重新组织后,需要提交这些更改: |
| 112 | +After reorganization, commit these changes: |
| 113 | + |
| 114 | +```bash |
| 115 | +# 查看更改 |
| 116 | +git status |
| 117 | + |
| 118 | +# 添加所有文件 |
| 119 | +git add . |
| 120 | + |
| 121 | +# 提交 |
| 122 | +git commit -m "Reorganize project structure: separate src, scripts, and docs" |
| 123 | + |
| 124 | +# 推送到 GitHub |
| 125 | +git push origin main |
| 126 | +``` |
| 127 | + |
| 128 | +## ⚙️ 已更新的文件 / Updated Files |
| 129 | + |
| 130 | +以下文件已经自动更新以适应新结构: |
| 131 | +The following files have been automatically updated for the new structure: |
| 132 | + |
| 133 | +- ✅ `CMakeLists.txt` - 更新源文件路径 |
| 134 | +- ✅ `scripts/build.bat` - 更新路径导航 |
| 135 | +- ✅ `scripts/build_simple.bat` - 更新源文件路径 |
| 136 | +- ✅ `.github/workflows/build-release.yml` - 更新构建路径 |
| 137 | +- ✅ `README.md` - 更新项目结构和构建说明 |
| 138 | +- ✅ `README_CN.md` - 更新项目结构和构建说明 |
| 139 | +- ✅ `build.bat` - 新建快捷方式脚本 |
| 140 | +- ✅ `.gitignore` - 新建忽略规则文件 |
| 141 | + |
| 142 | +## 📦 构建产物 / Build Artifacts |
| 143 | + |
| 144 | +构建产物仍然输出到 `build/` 目录(已在 .gitignore 中): |
| 145 | +Build artifacts are still output to `build/` directory (ignored in .gitignore): |
| 146 | + |
| 147 | +``` |
| 148 | +build/ |
| 149 | +└── bin/ |
| 150 | + └── Release/ |
| 151 | + └── wasapi_capture.exe |
| 152 | +``` |
| 153 | + |
| 154 | +--- |
| 155 | + |
| 156 | +**注意 / Note**: 本次重新组织不影响程序功能,只是优化了项目结构。 |
| 157 | +This reorganization doesn't affect program functionality, it just optimizes the project structure. |
| 158 | + |
0 commit comments