Skip to content

Instantly share code, notes, and snippets.

@seacloud9
Forked from dpeek/gist:6043433
Last active May 4, 2016 20:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seacloud9/4d22db233c2bbb221e2830a98c30acb0 to your computer and use it in GitHub Desktop.
Save seacloud9/4d22db233c2bbb221e2830a98c30acb0 to your computer and use it in GitHub Desktop.
Haxe, Neko and OpenFL on Raspberry Pi
mkdir ~/source
# dependencies
sudo apt-get update
sudo apt-get install libgc-dev bzip2 git-core make gcc g++ gnuplot glade imagemagick libusb-dev python-usb python-lxml python-wxgtk2.8 speech-dispatcher libgnomecanvas2-dev m4 libsdl1.2-dev
# neko
git clone https://github.com/HaxeFoundation/neko.git ~/source/neko
cd ~/source/neko
make
echo "export NEKOPATH=/home/pi/source/neko/bin" >> ~/.profile
echo "export LD_LIBRARY_PATH=$NEKOPATH" >> ~/.profile
echo "export PATH=$PATH:$NEKOPATH" >> ~/.profile
source ~/.profile
# ocaml (http://paparazzi.enac.fr/wiki/Installation/RaspberryPi)
sudo echo "deb http://www.cl.cam.ac.uk/~lpw25/ocaml-rpi/ wheezy main" >> /etc/apt/sources.list
sudo echo "deb-src http://www.cl.cam.ac.uk/~lpw25/ocaml-rpi/ wheezy main" >> /etc/apt/sources.list
sudo apt-get update
sudo apt-get install ocaml ocaml-native-compilers
# haxe
git clone --recursive https://github.com/HaxeFoundation/haxe.git ~/source/haxe
cd ~/source/haxe
make
make tools
echo "export HAXE_HOME=/home/pi/source/haxe" >> ~/.profile
echo "export HAXE_STD_PATH=$HAXE_HOME/std:." >> ~/.profile
echo "export PATH=$PATH:$HAXE_HOME" >> ~/.profile
source ~/.profile
# haxelib
mkdir ~/haxelib
haxelib setup ~/haxelib
# openfl
haxelib install hxcpp
haxelib install swf
haxelib install svg
haxelib install format
cd ~/source
git clone https://github.com/openfl/openfl; haxelib dev openfl openfl
git clone https://github.com/openfl/openfl-native; haxelib dev openfl-native openfl-native
git clone https://github.com/openfl/openfl-tools; haxelib dev openfl-tools openfl-tools
git clone https://github.com/haxenme/NME nme; haxelib dev nme nme
git clone https://github.com/openfl/nmedev; haxelib dev nmedev nmedev
# there were some errors compiling tools if I didn't do this
rm -rf ~/source/openfl-native/ndll
cp -r ~/source/nmedev/ndll ~/source/openfl-native/ndll
# there were some additional errors here around rebuild looking for ndll/Linux vs ndll/RPi...
# not entirely sure how I fixed it - I think I just copied ndll/RPi/* over ndll/Linux in both
# openfl-native/ndll and openfl-tools/ndll
haxelib run openfl rebuild linux -rpi
haxelib run openfl rebuild tools
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment