Skip to content

ia32 runtime for x64 darwin system breaks native plugins #136

@konsumer

Description

@konsumer

There used to not be a x64-darwin version of node-webkit runtime, but this has been fixed.

I have a simple test app.

First I make the node-webkit version of the native lib:

npm install
cd node_modules/serialport/
node-pre-gyp rebuild --runtime=node-webkit --target=0.11.2

It builds for darwin | x64 (as it should, since I am on x64)

Since serialport has it's own old copy of node-gyp, it screws up the dir name. There is an issue about that, and hopefully this step won't be needed in the future. So, I rename it to what it's looking for:

mv node_modules/serialport/build/serialport/v1.4.6/Release/node-webkit-v0.11.2-darwin-x64/ node_modules/serialport/build/serialport/v1.4.6/Release/node-webkit-v14-darwin-x64/

If I run this resulting app using the x64 runtime, it works fine:

~/Downloads/node-webkit-v0.11.2-osx-x64\ 2/node-webkit.app/Contents/MacOS/node-webkit .

If I make an app that uses serialport (native module) on my mac, I see that node-webkit-builder downloads the ia32 runtime and the native libs have the wrong version when I run nwbuild -r . I could use a node-pre-gyp rebuild --runtime=node-webkit --target=0.11.2 --target_arch=ia32, but since x64 is supported now, maybe that is better.

I am happy to make a PR, if this is something others are concerned about. Maybe I should solve this with more clever build-scripts, instead (build native modules for each platform's runtime) I am not sure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugPriority: 1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions