Distromate Docs
命令参考

打包命令

将应用程序打包为 Windows 安装包,生成完整安装包和增量更新包

用法

distromate package [OPTIONS]

选项

选项简写类型描述默认值
--version-vstring[必需] 版本号-
--url-string应用网址-
--output-ostring输出目录output
--compiler-stringInno Setup 编译器路径resource/InnoSetup/ISCC.exe
--desktop-icon-bool创建桌面快捷方式false
--license-string许可协议文件路径-
--launcher-string启动器文件路径dist/Launcher.exe

示例

基本打包

distromate package --version 1.0.0

或使用简写:

distromate package -v 1.0.0

完整参数打包

distromate package \
  --version 1.0.0 \
  --output dist/packages \
  --desktop-icon \
  --license LICENSE.txt \
  --url https://example.com

自定义编译器路径

distromate package -v 1.0.0 \
  --compiler "C:/Program Files (x86)/Inno Setup 6/ISCC.exe"

指定自定义启动器

distromate package -v 1.0.0 \
  --launcher dist/CustomLauncher.exe

生成的文件

打包完成后,会在输出目录生成以下文件:

完整安装包

{PackageName}-Setup-{Version}.exe

例如: myapp-Setup-1.0.0.exe

增量更新包

{PackageName}-Update-{Version}.zip

例如: myapp-Update-1.0.0.zip

应用配置文件

app.json

包含应用的基本信息:

{
  "appid": "b66ace14",
  "name": "我的应用",
  "version": "1.0.0",
  "md5": "a1b2c3d4e5f6..."
}

版本元数据

meta.json

包含可执行文件和需要保留的路径:

{
  "executable": "myapp.exe",
  "preservePaths": ["config/", "data/"]
}

On this page