exiv2node icon indicating copy to clipboard operation
exiv2node copied to clipboard

Help Electron

Open rui-cruz opened this issue 7 years ago • 1 comments

Hi,

Can anyone help me setting up an Electron project? I mean.. do I need to install separately? or it pulls the correct binaries and builds with Electron? (like sharp do).

I need to extract thumbnails from raw photos.. currently I'm using an exif tool for jpegs, but I need exiv2.

Any help is welcome, Kind regards

rui-cruz avatar Jan 11 '19 01:01 rui-cruz

Hi there, I would imagine that you've solved your problem, but for folks who stumble here:

For electron production build you have to tell your packager\builder which executables to pack with your app, with electron-builder for example it's "build.extraResources" setting - it just copies everything from source folder to output folder. You'll have to check what and where your app tries to load yourself to setup that.

For example to include imagemin libs I had to add along the lines of:

"build": { 
    "extraResources: [
        {
            "from": "node_modules/pngquant-bin/vendor",
            "to": "vendor"
        }, 
        ...
    ]
}

Which grabs all compiled binaries from my local pngquant and copies to app's resources path. You'll have to figure out from and to where supply yours binaries for each external lib and OS configuration.

I'll be adding exiv2 to my project soon and might update config specifically for it.

That's the most simple way, others would include makeshifting a build step on user's machine on install, like loading all the required libraries, etc, but it would most probably be much more hassle to set up.

Askadar avatar Jul 19 '19 12:07 Askadar