gopacker/README.md

44 lines
1009 B
Markdown
Raw 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.

# GoPacker
一个用于将可执行的 boot 程序和资源文件打包成单个文件的命令行工具。
## 功能
- 将 boot 程序和多个资源文件打包成一个文件。
- 支持单个文件和文件夹作为资源输入。
- 记录资源文件的相对路径和偏移量。
- 在输出文件末尾附加资源文件的元数据JSON 格式)。
## 安装
1. 克隆仓库:
```bash
git clone https://github.com/kingecg/code/gopacker.git
```
2. 构建工具:
```bash
make build
```
构建完成后,可执行文件位于 `./bin/packer`
## 使用方法
```bash
./bin/packer -b /path/to/boot -f /path/to/resource1 -f /path/to/resource2 -o /path/to/output
```
### 参数说明
- `-b`:指定 boot 程序路径(必需)。
- `-f`:指定资源文件或文件夹路径(可多次使用)。
- `-o`:指定输出文件路径(必需)。
## 示例
```bash
./bin/packer -b ./boot.bin -f ./resources -f ./config.json -o ./output.bin
```
## 许可证
MIT