exiv2node icon indicating copy to clipboard operation
exiv2node copied to clipboard

Nan update, using #46 as base but without including 3rd party sources

Open paazmaya opened this issue 6 years ago • 8 comments

This PR continues on top of what @m0g had done in #46, updates nan to the latest version at the time of writing, removes the included 3rd party sources (since I want to get to use the latest distro installed packages), and makes some changes in InitAll method to make this thing build.

I am looking for feedback and hoping to get at least some updates on the Node.js bindings, which I use in my projects...

paazmaya avatar Jun 01 '19 09:06 paazmaya

Looks like Travis CI is failing with any of the older Node.js versions, due to desctructuring syntax in Mocha:

/home/travis/build/dberesford/exiv2node/node_modules/mocha/bin/mocha:12
const {deprecate, warn} = require('../lib/utils');

paazmaya avatar Jun 01 '19 11:06 paazmaya

@dberesford what would be your suggestion to go forward? Skip testing on versions that do not support the features required by the testing tool? Skip tests on those versions, but keep doing building on them?

paazmaya avatar Jun 07 '19 14:06 paazmaya

I will take the liberty of dropping testing on versions before 8, based on them being no longer officially supported https://nodejs.org/en/about/releases/

Would be nice to get any info on what versions of Node.js is being used with exiv2node...

paazmaya avatar Oct 01 '19 20:10 paazmaya

A very useful update to use exiv2node with newer node versions! I've got some further changes in my fork to make it compatible with node 13. I'd be very grateful if @paazmaya or @m0g could give me some pointers on how I can get this to build on windows 10? How do I install exiv2 so that the build process can find it?

Edit: I'm getting a little further now. First it could not find exiv2.pc when I set PKG_CONFIG_PATH to where it was located within my own build of exiv2 it subsequently could not find image.hpp. Now I've got PKG_CONFIG_PATH set to a downloaded prebuild copy of exiv2, and it has a pkgconfig folder and it's now getting stuck on exiv2.lib:

PKG_CONFIG_PATH=D:\src\exiv2msvs\lib\pkgconfig

d:\src\exiv2node\exiv2node.cc(51): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc [D:\src\exiv2node\build\exiv2.vcxproj]
LINK : warning LNK4044: unrecognized option '/Wl,-rpath,.\build\Release\exiv2.a'; ignored [D:\src\exiv2node\build\exiv2.vcxproj]
LINK : warning LNK4044: unrecognized option '/LD:\src\exiv2msvs\lib.lib'; ignored [D:\src\exiv2node\build\exiv2.vcxproj]
LINK : fatal error LNK1104: cannot open file 'exiv2.lib' [D:\src\exiv2node\build\exiv2.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (D:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "D:\\Program Files\\nodejs\\node.exe" "D:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\src\exiv2node
gyp ERR! node -v v12.18.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

avgeeklucky avatar Jun 30 '20 12:06 avgeeklucky

@avgeeklucky sadly or better yet, luckily, I have not used windows for development for a long time, as it is just more straight forward in Linux and even in Mac...

paazmaya avatar Jul 01 '20 07:07 paazmaya

I prefer doing development on Linux too. But I prefer doing photo work on Windows, and I'm trying to get exiv2node to build for an Electron based photo organizer program Thanks anyway.

avgeeklucky avatar Jul 01 '20 10:07 avgeeklucky

I've got a windows build working, I've added instructions to README for anyone who's interested. Nan calls have been further updated to be compatible with node 13 and 14. There are still some warnings in gcc 8 due to nodejs/nan#807.

Updated source code at avgeeklucky/exiv2node#nan-update-include-exiv2. I can open a third pull request along this line, @paazmaya you can merge it into this PR to keep things centralized.

avgeeklucky avatar Jul 03 '20 12:07 avgeeklucky

Thanks @avgeeklucky for the additions. Now it would be up to @dberesford to check if this could be merged...

paazmaya avatar Jul 09 '20 17:07 paazmaya