How to use the app-builder-lib/out/targets/archive.compute7zCompressArgs function in app-builder-lib

To help you get started, we’ve selected a few app-builder-lib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github electron-userland / electron-builder / packages / electron-builder-squirrel-windows / src / squirrelPack.ts View on Github external
private async createEmbeddedArchiveFile(nupkgPath: string, dirToArchive: string) {
    const embeddedArchiveFile = await this.packager.getTempFile("setup.zip")
    await exec(path7za, compute7zCompressArgs("zip", {
      isRegularFile: true,
      compression: this.packager.compression,
    }).concat(embeddedArchiveFile, "."), {
      cwd: dirToArchive,
    })
    await exec(path7za, compute7zCompressArgs("zip", {
      isRegularFile: true,
      compression: "store" /* nupkg is already compressed */,
    }).concat(embeddedArchiveFile, nupkgPath))
    return embeddedArchiveFile
  }
}