LoginSignup
5
5

More than 5 years have passed since last update.

OSXでAtom Shellでネイティブモジュール動かす

Last updated at Posted at 2014-08-27

背景

NodObjCが利用しているネイティブモジュールのnode-ffiがNAN化され、
nodeの0.11系でも動くようになり、Atom Shellでも動かせそうな状況になったので試した。

64ビットでうごかす?

説明のページだと32ビットなんだがうまくいかない。
以下ようにアーキテクチャの指定をx64指定したらうまく行ったので、最近はAtom ShellはOSXでは完全に64ビットで動いているのかも。

nodebrew use 0.10
npm install NodObjC
nodebrew use 0.11

node-ffiをNAN化した版をビルドしたもに差し替え、以下を実行

HOME=~/.atom-shell-gyp node-gyp rebuild --target=0.11.13 --arch=x64 --dist-url=https://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist

一旦0.10系でNodObjCをnpmでインストールして、バイナリを作り直している。

まとめ

週末時間作って、ブログの方に、もう少し丁寧な記事を書きたい。
とにかく、node-ffiがNAN化されたので、Atom ShellからCocoa APIを叩けるようになった。

Link

関連記事

5
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5