简体   繁体   中英

OS specific directories for binary generated by Electron Builder

Electron Builder has output directory field

"directories": {
  "output": "releases",
  "buildResources": "dist"
},

But this is just single folder for 3 platform specific build(Mac, Windows and Linux)

I need different directories for respective platform with sub directory for "Arch" something like this-

releases
       | windows
       |      | 64bit
       |      | 32bit
       |
       | mac
       |   | 64bit
       |   | 32bit
       |
       | linux
       |     | 64bit
       |     | 32bit

How can I create different directories for specific OS while creating distributable with electron builder.

Found solution using File Macros support in electron builder

We can specify platform and arch macro in output directory path (package.json)-

"directories": {
    "output": "releases/${platform}/${arch}"
 },

This will automatically create folders for respective platform and sub-folder for arch

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM