Skip to content

Commit

Permalink
feat: added ELECTRON_BUILDER_7Z_FILTER env variable for 7z filter (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
panther7 committed Jun 14, 2023
1 parent f464e3e commit 99f49cf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/nervous-readers-worry.md
@@ -0,0 +1,5 @@
---
"app-builder-lib": minor
---

Added env variable for 7z filter
6 changes: 6 additions & 0 deletions packages/app-builder-lib/src/targets/archive.ts
Expand Up @@ -137,6 +137,12 @@ export function compute7zCompressArgs(format: string, options: ArchiveOptions =
args.push("-mhc=off")
}

// https://www.7-zip.org/7z.html
// Filters: BCJ, BCJ2, ARM, ARMT, IA64, PPC, SPARC, ...
if (process.env.ELECTRON_BUILDER_7Z_FILTER) {
args.push(`-mf=${process.env.ELECTRON_BUILDER_7Z_FILTER}`)
}

// args valid only for 7z
// -mtm=off disable "Stores last Modified timestamps for files."
args.push("-mtm=off", "-mta=off")
Expand Down

0 comments on commit 99f49cf

Please sign in to comment.