Installing Haxe on Windows Using Chocolatey

Haxe loves Chocolatey

Recently I’ve created the Haxe Chocolatey package. So yeah, we have yet another way to install Haxe (and Neko) on Windows.

Chocolatey is a package manager for Windows, just like apt-get for Ubuntu and homebrew for Mac. The major benefit of using it instead of the official Windows installer is that the process can be all done in the command line, which is the only option in a CI environment like AppVeyor.

After Chocolatey is installed, to install Haxe is just a single line of command:

cinst haxe #or `choco install haxe`

Ta-da! We should now have Haxe and Neko installed.

One thing we should remember to do is to refresh the environment variables since the installation modifies PATH. Without refreshing, running haxelib would result in a missing dll error. It can be done by RefreshEnv when using command prompt. When using PowerShell we have to close and reopen its window. It is slightly annoying but it is the current limitation.

Finally, to setup haxelib, create a folder for installing Haxe libraries, and run:

haxelib setup <path_to_folder>

That’s all ;)

comments powered by Disqus