Skip to content

Instantly share code, notes, and snippets.

@jgranick
Last active December 17, 2015 19:09
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save jgranick/5658434 to your computer and use it in GitHub Desktop.
Save jgranick/5658434 to your computer and use it in GitHub Desktop.
DO NOT DO THIS ANYMORE. The following script installs a 32-bit version of Neko, instead of the 64-bit version that comes with the Haxe 3 install. Your Neko install should match your OS X install, which means unless you are running an OLD system, you want the 64-bit version. OpenFL does properly support 64-bit Neko, and expects this on 64-bit sys…
#!/bin/sh
# Download Neko
curl -L http://nekovm.org/_media/neko-2.0.0-osx.tar.gz > neko-2.0.0-osx.tar.gz
# Extract and copy files to /usr/lib/neko
tar xvzf neko-2.0.0-osx.tar.gz
sudo mkdir -p /usr/lib/neko
sudo cp -r neko-2.0.0-osx/* /usr/lib/neko
# Add symlinks
sudo rm -rf /usr/bin/neko
sudo rm -rf /usr/bin/nekoc
sudo rm -rf /usr/bin/nekotools
sudo rm -rf /usr/lib/libneko.dylib
sudo ln -s /usr/lib/neko/neko /usr/bin/neko
sudo ln -s /usr/lib/neko/nekoc /usr/bin/nekoc
sudo ln -s /usr/lib/neko/nekotools /usr/bin/nekotools
sudo ln -s /usr/lib/neko/libneko.dylib /usr/lib/libneko.dylib
# Cleanup
rm -r neko-2.0.0-osx
rm neko-2.0.0-osx.tar.gz
# Rebuild haxelib
cd /usr/lib/haxe/std/tools/haxelib
sudo haxe haxelib.hxml
sudo cp ./haxelib /usr/lib/haxe/haxelib
@drkibitz
Copy link

Is this because I didn't do this?

~$ haxelib run openfl setup
Called from flash/utils/ByteArray.hx line 713
Called from flash/Lib.hx line 233
Called from flash/Lib.hx line 308
Called from flash/Lib.hx line 180
Called from C:\HaxeToolkit\haxe/std/neko/Lib.hx line 30
Uncaught exception - load.c(237) : Failed to load library : nme.ndll (dlopen(nme.ndll, 1): image not found)

Why does it mention nme at all? Does openfl already come with nme?

@xbelanch
Copy link

xbelanch commented Jul 2, 2013

Yes, it is. This bash script solves that issue.

@seacloud9
Copy link

I had this issue but I was able to copy the nme.ndll from /usr/lib/haxe/lib/openfl-tools/1,0,10/ndll/Mac and then place it in /usr/lib/haxe/lib/openfl-tools/1,0,10/ndll/Mac64/ this solved the issue for me after that I was able to complete the setup. @jgranick also mentions this on the openFL threads here http://www.openfl.org/developer/forums/installing-openfl/error-running-openfl-setup-max-osx-1084/ this worked for me.

@jgranick
Copy link
Author

OpenFL has full support for 64-bit Mac now, so you should not use this script any more. If you use the Haxe installer (which installs Haxe and Neko), you should be able to get up and running right away with OpenFL. We have support for 32-bit as well, but only expect it when you have a 32-bit system. If you have any problem running Neko, be sure you have the 64-bit version (for most systems)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment