Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
haXe 2 Beginner's Guide

You're reading from   haXe 2 Beginner's Guide Develop exciting applications with this multi-platform programming language

Arrow left icon
Product type Paperback
Published in Jul 2011
Publisher
ISBN-13 9781849512565
Length 288 pages
Edition Edition
Languages
Arrow right icon
Toc

Table of Contents (21) Chapters Close

haxe 2
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Getting to know haXe FREE CHAPTER 2. Basic Syntax and Branching 3. Being Cross-platform with haXe 4. Understanding Types 5. The Dynamic Type and Properties 6. Using and Writing Interfaces, Typedefs, and Enums 7. Communication Between haXe Programs 8. Accessing Databases 9. Templating 10. Interfacing with the Target Platform 11. A Dynamic Website Using JavaScript 12. Creating a Game with haXe and Flash Pop Quiz Answers Index

Installing haXe


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:

  1. Using the installer: An executable that will automatically install haXe for you.

  2. 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 on Windows

Installing haXe on Windows is pretty easy, but there are some caveats that we should avoid.

So, carry out the following steps:

  1. Go to http://www.haxe.org.

  2. Click on the Download link.

  3. There, you will find a link to download the Windows version of the installer. It comes as an executable file.

  4. 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 on MacOSX

Installing haXe on MacOSX is very straightforward. Carry out the following steps:

  1. Go to http://www.haxe.org.

  2. Click on the Download link.

  3. There, locate and click on the link to download the OSX Universal Installer.

  4. The installer comes as a DMG image, if it's not automatically mounted; mount it by double-clicking on it.

  5. Go to where the DMG image is mounted and run the installer.

That's it! You have haXe installed on MacOSX!

Installing on Linux

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:

  1. Go to http://www.haxe.org.

  2. Click on the Downloads link.

  3. Find the link to download the Linux version of the installer.

  4. Uncompress the file by using the tar –zxf hxinst-linux.tgz command.

  5. Add execution rights on the installer by using the chmod +x hxinst-linux command.

  6. 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.

You have been reading a chapter from
haXe 2 Beginner's Guide
Published in: Jul 2011
Publisher:
ISBN-13: 9781849512565
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image