cryptlex / lexactivator-js

LexActivator API wrapper for Node.js (licensing library)
https://cryptlex.com
MIT License
15 stars 5 forks source link

Binding library for mac now fails #9

Closed jensstigaard closed 4 years ago

jensstigaard commented 4 years ago

Hi Adnan

The most recent version enables ElectronJS cross-building (building to Windows from a Mac computer e.g.). This is awesome. However, when building from Mac to Mac, it now broke the app. The error is: (also see screenshot below)

Library not loaded: @rpath/libLexActivator.dylib Reason: image not found

Screenshot 2020-04-15 at 22 18 40

I assume the binding.gyp for this repo has been changed, which is breaking the ElectronJS app, since the reference to the dynamic library is wrong. I think the reference to the dynamic library were fine for Mac as it were in the previous version of this repo.

Thanks

/ Jens

adnan-kamili commented 4 years ago

Hi Jens,

There was a caching issue in the case of v3.9.1 which caused this issue. Can you confirm the library version? This should be fixed in v3.9.2

jensstigaard commented 4 years ago

What cache? I have tried removing the npm_modules directory and fetched all dependencies again. No luck. The error remains.

I am using lexactivator v3.9.2.

Screenshot 2020-04-16 at 16 31 44
jensstigaard commented 4 years ago

On a side-note: I use electron-builder - I don't know if that changes anything in regard to how it should be setup. I have used other binding libraries, which has worked with electron and electron-builder.

adnan-kamili commented 4 years ago

It works fine for the node.js sample app on mac os.

Can you confirm that libLexActivator.so is copied to your app after you run electron commands. The .so file is in the same folder as lexactivator.node

jensstigaard commented 4 years ago

Seen below is a screenshot of the .app contents folder. libLexActivator.so is not included in the directory. image

jensstigaard commented 4 years ago

Could it be the case that the .so is not listed in the libraries in the binding.gyp file, and is therefore not included in the build?

adnan-kamili commented 4 years ago

I am sorry I meant the dylib file which is present as shown. Where is your main.js file located?

Are you facing the same issue on Linux?

jensstigaard commented 4 years ago

As it is a ElectronJS app, the main.js content is inside the app.asar file.

I do not have a linux system to test with as of now.

adnan-kamili commented 4 years ago

Hi Jen,

We have fixed this issue by switching to static lib for compilation. We will release the new version tomorrow.

adnan-kamili commented 4 years ago

Fixed in v3.9.3