Files
VoiletCStudio/README.md
虾哥 19296b7337 VoiletCStudio v1.0 - 紫罗兰 C 工程配置器
功能特性:
- JSON 格式工程配置文件
- 虚拟目录管理(类似 MDK)
- 跨平台 CMake 自动生成
- 一键编译 Debug/Release
- 拖拽文件打开工程
- 实时编译输出显示

作者:虾哥
日期:2026-04-09
2026-04-09 10:18:39 -04:00

147 lines
2.5 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# VoiletCStudio - 紫罗兰 C 工具箱
Qt5 跨平台 C 工程配置器,自动生成 CMakeLists.txt
---
## 🚀 功能特性
### 1. 工程配置管理
- ✅ JSON 格式配置文件
- ✅ 新建/打开/保存工程
- ✅ Ctrl+S 快速保存
### 2. 编译工具链配置
- ✅ 编译器路径选择
- ✅ 汇编器路径选择
- ✅ 链接器路径选择
- ✅ 支持 MinGW/GCC/Clang
### 3. 文件管理
- ✅ 虚拟目录(类似 MDK
- ✅ .c 源文件分类管理
- ✅ .h 包含目录管理
- ✅ 库文件管理(.a/.so/.lib
### 4. 编译配置
- ✅ 编译宏定义
- ✅ 自定义编译选项
- ✅ Debug/Release 模式
### 5. CMake 生成
- ✅ 自动生成 CMakeLists.txt
- ✅ 支持 make debug/release
- ✅ 跨平台兼容
---
## 📋 使用方法
### 编译
```bash
cd VoiletCStudio
qmake
make
```
### 运行
```bash
./VoiletCStudio
```
### 使用流程
1. 新建工程
2. 配置编译器路径
3. 添加虚拟目录和源文件
4. 添加包含目录和库文件
5. 添加编译宏和选项
6. 保存工程JSON
7. 生成 CMakeLists.txt
8. 使用 CMake 编译
---
## 🛠️ CMake 使用
```bash
# 配置
cmake -B build
# 编译 Debug
make debug
# 编译 Release
make release
# 或直接使用
cmake --build build --config Debug
```
---
## 📁 项目结构
```
VoiletCStudio/
├── src/
│ ├── main.cpp # 主程序入口
│ ├── mainwindow.cpp/h # 主窗口
│ ├── projectconfig.cpp/h # 配置管理
│ └── cmakegenerator.cpp/h # CMake 生成
├── resources/ # 资源文件
├── VoiletCStudio.pro # Qt 项目文件
└── README.md # 说明文档
```
---
## 💻 跨平台支持
| 平台 | 编译器 | 状态 |
|------|--------|------|
| Windows | MinGW | ✅ |
| Linux | GCC | ✅ |
| macOS | Clang | ✅ |
---
## 📝 配置文件格式
```json
{
"projectName": "MyProject",
"projectPath": "/path/to/project",
"compilerPath": "/usr/bin/gcc",
"virtualDirs": {
"App": {
"name": "App",
"files": ["src/main.c"]
}
},
"includeDirs": ["./include"],
"libraries": ["libmylib.a"],
"defines": ["DEBUG"],
"compilerOptions": ["-Wall"]
}
```
---
## 🎯 特色
- **类 MDK 虚拟目录**:像 Keil MDK 一样管理源文件
- **一键生成 CMake**:自动生成完整的 CMakeLists.txt
- **跨平台**Windows/Linux/macOS 全支持
- **轻量级**:纯 Qt5 实现,无额外依赖
---
## 📄 许可证
MIT License
---
**作者:虾哥**
**日期2026-04-09**