Building haxe on mac os, porting from FlashDevelop

Hi - fairly n00b programmer here. I’m trying to get this code to run/compile on my mac (osx high sierra). I have installed latest versions of haxe, haxelib (list below), lime, openfl Xcode and numerous IDEs haxe recommends, all to no avail. Tried different ways of installing them too…

From what I can tell the original sequencer was programmed on Win/Flashdevelop (because there’s a .hxproj file included) - but I can’t figure out how to translate that to a build.hxml or something that my haxe compiler can read.

I’ve spent about 4 days worth of free time with this and it’s driving me crazy!

If you need more info let me know, a sampling of my many errors below…


Visual Studio Code error:
Called from ? line 1
Called from CommandLineTools.hx line 2065
Called from CommandLineTools.hx line 26
Called from a C function
Called from CommandLineTools.hx line 140
Called from CommandLineTools.hx line 1854
Called from lime/project/ProjectXMLParser.hx line 23
Called from a C function
Called from lime/project/ProjectXMLParser.hx line 56
Called from lime/project/ProjectXMLParser.hx line 2247
Called from lime/project/ProjectXMLParser.hx line 1352
Called from /usr/lib/haxe/std/haxe/xml/Fast.hx line 56
Uncaught exception - haxelib is missing attribute name
The terminal process terminated with exit code: 1

Sublime error:
Error: Class name must start with uppercase character
[Finished in 0.0s with exit code 1]
[cmd: [‘haxe’, ‘build.hxml’]]
[dir: /Users/USERNAME/drums/drums-master]
[path: /opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin]

Also tried ‘haxe build.hxml’ command from terminal, where I’m trying to write my own hxml file, but I don’t know enough about it yet and I think that is where I need some help:
src/drums/view/sequencer/BeatLines.hx:2: characters 7-34 : Type not found : pixi.core.display.Container
(for this one my build.hxml file just looks like:
-neko output.n
-cp src
-main Main)
and file system is:
35 AM

my haxelib list is:
actuate: [1.8.7]
box2d: [1.2.3]
flixel-addons: [2.5.0]
flixel-demos: [2.4.2]
flixel-templates: [2.4.4]
flixel-tools: [1.4.1]
flixel-ui: [2.2.0]
flixel: [4.3.0]
format: [3.3.0]
hxcpp: [3.4.188]
layout: [1.2.1]
lime-samples: [4.0.1]
lime: 2.9.1 [5.6.0]
nme: [6.0.58]
openfl-samples: [6.0.0]
openfl: 3.6.1 [6.2.0]
svg: [1.1.2]

Also, if there’s a better place for this, please let me know. Thanks


I’m sorry you’ve been having trouble. This is not an OpenFL project, but I am happy to help!

On Windows, FlashDevelop works without making an HXML file, but that will be your clue to making a working HXML file. OpenFL does not require the use of an HXML file, but it’s obviously different than Pixi.js, so you would need to use openfl.display.Sprite instead of pixi.core.display.Container, and make other changes.

To make mikedotalmond’s sample work here as-is, the HXPROJ will be your clue

I think you might be able to make a build.hxml like this:

-js bin\js\drums.js
-cp src
-main Main
-dce full
-D analyzer
-lib compiletime
-lib hxsignal
-lib dat.GUI
-lib pixijs
-lib actuate

Then you’ll have to install those lib files using haxelib install compiletime, etc :slight_smile:

Thanks for that, your response is much appreciated. I will try this and hopefully I can get this thing to work :slight_smile: