1 ZLMediaKit Windows 一般编译指南
## 1. 环境准备
### 1.1 必需工具
```plaintext
1. Visual Studio 2019 或更高版本
2. CMake (3.15+)
3. git
4. vcpkg (包管理器)
```
### 1.2 安装步骤
```mermaid
flowchart TB
A[安装 Visual Studio] --> B[安装 CMake]
B --> C[安装 Git]
C --> D[安装 vcpkg]
D --> E[配置环境变量]
```
#### Visual Studio 安装选项
```plaintext
必选组件:
- MSVC C++ 构建工具
- Windows 10 SDK
- CMake 工具
- Git for Windows
```
#### vcpkg 安装
```powershell
# 克隆 vcpkg
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
# 运行安装脚本
.\bootstrap-vcpkg.bat
# 集成到 Visual Studio
.\vcpkg integrate install
```
## 2. 获取源码
### 2.1 克隆仓库
```powershell
# 克隆主仓库
git clone https://github.com/ZLMediaKit/ZLMediaKit.git
cd ZLMediaKit
# 更新子模块
git submodule update --init --recursive
```
### 2.2 目录结构
```plaintext
ZLMediaKit/
├── 3rdpart/ # 第三方库
├── api/ # API 接口
├── cmake/ # CMake 配置文件
├── server/ # 服务器实现
├── src/ # 核心源码
└── tests/ # 测试用例
```