Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install a 3rd party software with electron?

How to install a 3rd party software along with installing of electron app?

My example use case is, I want to use ffmpeg inside my electron app, which is supposed to take screenshot from a video. It can be any other software.

Can I package the app in such a way that the user have to install only my app. And my app is installing ffmpeg for the user without any manual action.

I would like to automate the process of installing ffmpeg during the electron app install on different OSs, if possible.

like image 460
niksmac Avatar asked Oct 18 '22 20:10

niksmac


2 Answers

Just bundle ffmpeg using extraFiles option.

like image 182
develar Avatar answered Oct 21 '22 03:10

develar


My app has specific drivers which are different for each platform. In my package json I have:

"extraFiles": [
  {
    "from": "resources/${os}/drivers",
    "to": "resources",
    "filter": [
      "**/*"
    ]
  }
],

This ensures that it gets the correct resources for the platform I'm building and copies them into the built app resources directory. Check out the docs. Both ${os} and ${arch} work in these fields.

like image 40
Tim Avatar answered Oct 21 '22 04:10

Tim