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