Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help Electron #53

Open
rui-cruz opened this issue Jan 11, 2019 · 1 comment
Open

Help Electron #53

rui-cruz opened this issue Jan 11, 2019 · 1 comment

Comments

@rui-cruz
Copy link

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

@Askadar
Copy link

Askadar commented Jul 19, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants