Enough talking, let's install haXe! You will see how easy it is.
Two ways to install: The installer and sources compilation
You should know that there are two ways to install haXe, which are as follows:
Using the installer: An executable that will automatically install haXe for you.
Compiling from sources using the code repository located at the following URL:
http://code.google.com/p/haxe
One important thing to note is that haXe can be installed on on Windows, Linux, and MacOSX. This way, you don't have to worry about your operating system and can continue working in your environment.
Installing haXe on Windows is pretty easy, but there are some caveats that we should avoid.
So, carry out the following steps:
Go to http://www.haxe.org.
Click on the Download link.
There, you will find a link to download the Windows version of the installer. It comes as an executable file.
Run the executable.
Note that if you're working on Windows Vista or Windows 7, you will need to run the executable as Administrator. You can do so by right-clicking on the installer while holding the Shift key down and then clicking on Run as Administrator.
Installing haXe on MacOSX is very straightforward. Carry out the following steps:
Go to http://www.haxe.org.
Click on the Download link.
There, locate and click on the link to download the OSX Universal Installer.
The installer comes as a DMG image, if it's not automatically mounted; mount it by double-clicking on it.
Go to where the DMG image is mounted and run the installer.
That's it! You have haXe installed on MacOSX!
Some distributions have haXe in their repositories, so you may install it from your distribution's repository if it's available.
Alternatively, you can use the Linux Installer to install haXe; it does work on many distributions. Carry out the following steps to install haXe on Linux:
Go to http://www.haxe.org.
Click on the Downloads link.
Find the link to download the Linux version of the installer.
Uncompress the file by using the tar
–zxf
hxinst-linux.tgz
command.
Add execution rights on the installer by using the chmod
+x
hxinst-linux
command.
Run the installer with administration rights either by using the sudo
–s
command or the su
–
command, and then running ./hxinst-linux
.
Now, you should have haXe installed on your Linux machine.
Installing nightly builds
If you need features that are not in the latest release, you can use the nightly builds to easily have access to binaries of what is in the repository without the need of compiling it on your own.
You will be able to find them on the haXe website's Download page for your operating system.
Note that the nightly builds do not come with an installer and therefore, you are advised to first install using the installer, so that it sets up all environment variables and then replaces installed files by the ones from the nightly builds archive.
On MacOSX and Linux machines, you should find them in /usr/lib/haxe
, while on Windows, they should be in c:\haxe
.
Verifying your installation
You can verify that haXe is correctly installed by opening a terminal and running the haxe
command; if haXe is correctly installed, then you should get the help message.
You can also test that Neko is correctly installed by running the neko
command. You should again get the help message.