niksmac
niksmac

Reputation: 2782

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.

Upvotes: 7

Views: 4130

Answers (4)

Praveen Reddy
Praveen Reddy

Reputation: 33

you can combine a third party installer and your electron app installer into one executable( i.e .exe file) using NSIS. when you try to run the .exe file it will install both the third party app and your app. NSIS is for windows only. NSIS

Upvotes: 0

vikas
vikas

Reputation: 1010

You can use inno setup for this purpose. I have used it to make an installer that installs exe of nodejs along with my electron app. This method is for windows only.

I have used this youtube video as a tutorial.

Upvotes: 1

Tim
Tim

Reputation: 8176

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.

Upvotes: 1

develar
develar

Reputation: 995

Just bundle ffmpeg using extraFiles option.

Upvotes: 1

Related Questions