4

I am developing an electron application where I am using external .exe files. In development mode application works fine. But when I package the application, it is unable to find those .exe files.

How to include .exe files in packaged application. I am using electron-builder for packaging.

Below is my configuration,

"build": {
    "appId": "com.f.quickstart",
    "files": [
      "app/build/**/*",
      "app/build/**/*.exe",
      "main.js",
      "mainIPC.js",
      "src/**/*",
      "dist/**/*",
      "node_modules/**/*",
      "package.json"
    ],
    "win": {
      "target": "portable",
      "signAndEditExecutable": false
    },
    "linux": {
      "target": "AppImage"
    },
    "mac": {
      "target": "zip"
    }
  }

Looking for help.

Thanks

Mangesh Tak
  • 346
  • 1
  • 6
  • 22
  • Did you found any solution about this – Nandha Mar 17 '19 at 11:04
  • 1
    Please find below my solution, Added below lines in my package.json "extraResources": [ { "from": "./binaries/", "to": "extraResources", "filter": [ "**/*" ] } It adds binary files in extraResources folder in dist. I have kept binaries in './binaries' folder – Mangesh Tak Mar 21 '19 at 21:53
  • @Magnesh Tak thanks – Nandha Mar 22 '19 at 05:47
  • In my case, I wanted to run the exe's during my app's installation (in order to install some dependencies). I just dropped the exe's directly into my resources folder, which made electron-builder copy them to my dist automatically. – Chris Pavs Feb 04 '23 at 06:01

0 Answers0