
{"id":1882,"date":"2012-04-19T10:18:57","date_gmt":"2012-04-19T09:18:57","guid":{"rendered":"http:\/\/www.matthijskamstra.nl\/blog\/?p=1882"},"modified":"2012-04-19T10:26:30","modified_gmt":"2012-04-19T09:26:30","slug":"installing-haxe-and-nme-on-osx","status":"publish","type":"post","link":"https:\/\/www.matthijskamstra.nl\/blog\/2012\/04\/19\/installing-haxe-and-nme-on-osx\/","title":{"rendered":"Installing Haxe and NME on OSX"},"content":{"rendered":"<p>I recently had to (<a href=\"#uninstall\">uninstall<\/a> and) reinstall Haxe, so I decided that it would be useful to document the process!<\/p>\n<p>Remember this is a post for OSX(10.6.8) install of Haxe(2.09) and NME(3.3.0)!<\/p>\n<div class='highlight'>This entire post started because MonoDevelop didn&#8217;t show any auto-completion anymore. It cost me 4 nights to fix the &#8216;problem&#8217;. I deleted Haxe entirely and reinstalled it (and NME\/extra libraries) again. I had written the process of install down before to blog about it later, so there is some stuff that happened the previous time I install Haxe and NME (and that means that this it&#8217;s not exactly a clean install) <\/div>\n<p>About the deletion\/uninstall of Haxe: <a href=\"#uninstall\">at the bottom of the post<\/a><\/p>\n<div class=\"update\">I can&#8217;t thank <a href=\"http:\/\/www.joshuagranick.com\/blog\" target=\"_blank\">Joshua Granick<\/a> (one of the programmers of NME) enough for his help! The man must be a superhero: helping everybody on twitter, writing tutorials\/post on his blog, programming an haxe\/nme add-in for MonoDevelop, NME (duh), being a dad, having his own game company&#8230;.(!!)<\/div>\n<h3>Start installing Haxe<\/h3>\n<p>Download the Haxe OSX install zip from: <a href=\"http:\/\/haxe.org\/download\" target=\"_blank\">http:\/\/haxe.org\/download<\/a><br \/>\nAnd install it like you normally do.<\/p>\n<p>After install you can check if everything went okay (and you need the terminal later on):<br \/>\nopen the terminal<br \/>\n(CMD+SPACE and type terminal)<\/p>\n<p>type in the terminal<br \/>\n<code>haxe<\/code><br \/>\nto check the install<\/p>\n<p>Download the NME OSX install zip from: <a href=\"http:\/\/www.haxenme.org\/download\/\" target=\"_blank\">http:\/\/www.haxenme.org\/download\/<\/a><br \/>\nAnd install.<\/p>\n<p>type in the terminal<br \/>\n<code>haxelib list<\/code><br \/>\nto check what libraries are installed<\/p>\n<p>This is probably not useful for everybody, but these are some of the extra libraries I use&#8230;<br \/>\ntype in the terminal<br \/>\n<code><br \/>\nhaxelib install swf<br \/>\nhaxelib install jeash<br \/>\nhaxelib install spritesheet<br \/>\nhaxelib install format<br \/>\nhaxelib install actuate<br \/>\nhaxelib install box2d<br \/>\nhaxelib install waxe<br \/>\n<\/code><\/p>\n<p>You probably only want to install these to get NME working<br \/>\n<strong>jeash<\/strong> for html5 and <strong>actuate<\/strong> to animate stuff<br \/>\n<code><br \/>\nhaxelib install jeash<br \/>\nhaxelib install actuate<br \/>\n<\/code><\/p>\n<p>Next we will make a short cut to NME<br \/>\nType in the terminal<br \/>\n<code>haxelib run nme setup<\/code> <\/p>\n<p>Explanation from <a href=\"http:\/\/www.joshuagranick.com\/blog\/?p=604\" target=\"_blank\">Joshua Granick<\/a><\/p>\n<blockquote><p>If you execute \u00e2\u20ac\u0153haxelib run nme setup\u00e2\u20ac\u009d from a command-line or terminal, it will add a script to your PATH (in the Haxe directory) that shortens the command string. Instead of having to call \u00e2\u20ac\u0153<code>haxelib run nme<\/code>\u00e2\u20ac\u009d, you can simply call \u00e2\u20ac\u0153<code>nme<\/code>\u00e2\u20ac\u009d. <\/p><\/blockquote>\n<p>This failed on my computer; the terminal spit this back at me<br \/>\n<code><br \/>\nhaxelib run nme setup<br \/>\nchmod: Unable to change file mode on \/usr\/lib\/haxe\/nme: Operation not permitted<br \/>\nrm: \/usr\/bin\/nme: Permission denied<br \/>\nln: \/usr\/bin\/nme: File exists<br \/>\n<\/code> <\/p>\n<p>This is probably because I&#8217;m on OSX and not on Linux as &#8220;root&#8221; user&#8230;.<br \/>\nSo fix this with:<br \/>\n<code>sudo haxelib run nme setup<\/code>, type your password and try again!<br \/>\n<em>(source: <a href=\"http:\/\/www.haxenme.org\/developers\/get-started\/\" target=\"_blank\">http:\/\/www.haxenme.org\/developers\/get-started\/<\/a>)<\/em><\/p>\n<p>After this you install the &#8216;stuff&#8217; you need for development on mobile devices.<br \/>\nI only need android so I installed that (for now):<\/p>\n<p><code>nme setup android<\/code><br \/>\nDownload and install the Android SDK? [y\/n\/a] ? <code>y<\/code><br \/>\nOutput directory [\/opt\/Android SDK] : <code>\/opt\/Android SDK<\/code><br \/>\n<strong>or just use enter to use the default path<\/strong><\/p>\n<p>after install the &#8220;Android SDK Manager&#8221; will be started<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.matthijskamstra.nl\/blog\/wp-content\/uploads\/Screen-shot-2012-04-18-at-21.57.26.png\" alt=\"\" title=\"Android SDK Manager\" width=\"780\" height=\"580\" class=\"alignnone size-full wp-image-1892\" srcset=\"https:\/\/www.matthijskamstra.nl\/blog\/wp-content\/uploads\/Screen-shot-2012-04-18-at-21.57.26.png 780w, https:\/\/www.matthijskamstra.nl\/blog\/wp-content\/uploads\/Screen-shot-2012-04-18-at-21.57.26-300x223.png 300w\" sizes=\"auto, (max-width: 780px) 100vw, 780px\" \/><br \/>\ndownload Android 4.0.3 (API 15)<\/p>\n<p>After the &#8220;Android SDK Manager&#8221; is ready with downloading and install you can close it (it will ask you to do so)<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.matthijskamstra.nl\/blog\/wp-content\/uploads\/Screen-shot-2012-04-18-at-22.12.01.png\" alt=\"\" title=\"Android Tools Updated\" width=\"675\" height=\"258\" class=\"alignnone size-full wp-image-1893\" srcset=\"https:\/\/www.matthijskamstra.nl\/blog\/wp-content\/uploads\/Screen-shot-2012-04-18-at-22.12.01.png 675w, https:\/\/www.matthijskamstra.nl\/blog\/wp-content\/uploads\/Screen-shot-2012-04-18-at-22.12.01-300x114.png 300w\" sizes=\"auto, (max-width: 675px) 100vw, 675px\" \/><\/p>\n<p>The terminal will start yelling stuff:<br \/>\nDownload and install the Android NDK? [y\/n\/a] ? <code>y<\/code><br \/>\nPath to Android NDK [\/opt\/Android NDK] : <code>\/opt\/Android NDK<\/code><br \/>\n<strong>or just use enter to use the default path<\/strong><\/p>\n<p>Okay.. your good to go!<\/p>\n<h3>Install IDE<\/h3>\n<p>Install an IDE (<a href=\"http:\/\/www.matthijskamstra.nl\/blog\/index.php\/2012\/04\/10\/haxe-and-nme-ide-and-editors-osx\/\" title=\"Haxe and NME IDE and editors OSX\">read<\/a> about the choices that I made)<\/p>\n<p>Let&#8217;s assume that you will also use MonoDevelop (2.8.8.4):<br \/>\nDownload the OSX files (yes 2!) from: <a href=\"http:\/\/monodevelop.com\/Download\" target=\"_blank\">http:\/\/monodevelop.com\/Download<\/a><br \/>\nClick on osx and you will get two download options<\/p>\n<ul>\n<li>MonoDevelop 2.8.8.4 installer<\/li>\n<li>Mono 2.10.5 + GTK#<\/li>\n<\/ul>\n<p>Click\/Download MonoDevelop (pretty straight forward)<br \/>\nClick on Mono and you will go here <a href=\"http:\/\/www.go-mono.com\/mono-downloads\/download.html\" target=\"_blank\">http:\/\/www.go-mono.com\/mono-downloads\/download.html<\/a>.<br \/>\nDo you need &#8220;An open source, cross-platform, implementation of C# and the CLR that is binary compatible with Microsoft.NET&#8221;???<br \/>\nWell&#8230; yes: see Mono as the car-engine and MonoDevelop as the rest of the car (you as the driver)&#8230; you need both to go on a road trip!<\/p>\n<p>We want stable release: &#8220;Latest Stable Version: 2.10.8&#8221; and click again on OSX.<br \/>\nAt the bottom of the page you will see some links appears<br \/>\ndownload the Intel Mac: &#8220;Runtime&#8221;<\/p>\n<p>Install both files you just downloaded<br \/>\nAnd open MonoDevelop (in Applications)!<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.matthijskamstra.nl\/blog\/wp-content\/uploads\/Screen-shot-2012-04-12-at-14.16.29.png\" alt=\"Add-in Manager Monodevelop\" width=\"500\"\/><br \/>\nThe only thing you need to do now is:<br \/>\n<code>MonoDevelop > Add-in Manager > Gallery tab > Language bindings > Haxe language Binding<\/code><br \/>\nInstall that add-in (0.2.1).<\/p>\n<p>Your MonoDevelop is ready for Haxe\/NME programming.<br \/>\nMoving from FDT to MonoDevelop? I wrote something about that to make it somewhat easier: <a href=\"http:\/\/www.matthijskamstra.nl\/blog\/index.php\/2012\/04\/12\/moving-from-fdt-to-monodevelop-for-haxe-and-nme\/\" target=\"_blank\">Moving from FDT to Monodevelop for Haxe and NME<\/a><\/p>\n<p>About your first NME > Flash project, visit Joshua Granick post: <a href=\"http:\/\/www.joshuagranick.com\/blog\/2012\/04\/10\/getting-started-with-haxeflash-in-monodevelop\/\" target=\"_blank\">getting-started-with-haxeflash-in-monodevelop\/<\/a> he has also one form cpp and html5..<\/p>\n<p>Happy Haxe-ing<\/p>\n<p><a name=\"uninstall\"><\/a><\/p>\n<h3>Uninstall Haxe on OSX<\/h3>\n<p><strong>something you should never do \ud83d\ude00<\/strong><\/p>\n<p>After updating to Haxe 2.09 (and updated the Add-in) I noticed that the MonoDevelop auto-completion didn&#8217;t work anymore.<br \/>\nI mentioned this to Joshua Granick but we couldn&#8217;t figur out what it was.<\/p>\n<p>This is probably what happend: I installed Haxe 2.09 very quickly after it was released and after that there was a hotfix which I couldn&#8217;t install over the previous installed Haxe&#8230;<br \/>\nEventually Joshua gave me this advice <a href=\"https:\/\/twitter.com\/#!\/singmajesty\/statuses\/192391575005958144\" target=\"_blank\">on twitter<\/a>.<\/p>\n<p>Open the terminal (CMD+SPACE and type terminal) and type<code>rm \/usr\/bin\/haxe<\/code><br \/>\nI got &#8220;rm: \/usr\/bin\/haxe: Permission denied&#8221;<br \/>\nThis is probably because I&#8217;m on OSX and not on Linux as &#8220;root&#8221; user&#8230;.<br \/>\nI fixed this with <code>sudo rm \/usr\/bin\/haxe<\/code>: you will be asked to fill in you password (there is no feedback of typing) and hit enter, the Haxe folder will be deleted.<br \/>\n(you will lose Haxe and everything you installed in there: NME and libraries, the other install you need to do for NME will still be installed: Android\/IOS for example)<\/p>\n<p>After the reinstall everything worked again.<br \/>\nI can finally use my evenings for programming again \ud83d\ude00<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I recently had to (uninstall and) reinstall Haxe, so I decided that it would be useful to document the process! Remember this is a post for OSX(10.6.8) install of Haxe(2.09) and NME(3.3.0)! This entire post started because MonoDevelop didn&#8217;t show any auto-completion anymore. It cost me 4 nights to fix the &#8216;problem&#8217;. I deleted Haxe [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[360],"tags":[411,412,366,367,368,365,253],"class_list":["post-1882","post","type-post","status-publish","format-standard","hentry","category-haxe","tag-fdt","tag-haxe","tag-ide","tag-joshua-granick","tag-monodevelop","tag-nme","tag-osx"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/posts\/1882","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/comments?post=1882"}],"version-history":[{"count":10,"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/posts\/1882\/revisions"}],"predecessor-version":[{"id":1901,"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/posts\/1882\/revisions\/1901"}],"wp:attachment":[{"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/media?parent=1882"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/categories?post=1882"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.matthijskamstra.nl\/blog\/wp-json\/wp\/v2\/tags?post=1882"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}