How to get started?

Hello. I’d like to try HaxeUI but I can’t figure out how. I’m using haxe 3.4.7 on Linux Mint 19.1. I installed haxeui 1.8.21 and haxeui-html5 0.0.3 via haxelib. Now what? Ian posted a video that used a tool called haxeui to create a new project, but I don’t have that. I don’t see any project templates I could use. Is there a Getting Started guide somewhere I missed? Thanks.

Hi There,

So the first thing is that the haxelib version of “haxeui” is version 1… I cant remove this as its not haxelibs policy and, it makes sense, maybe others are using it. HaxeUI version 2 is called “haxeui-core”, so you need to install that via haxelib, however, the haxelib is WOEFULLY out of date, i would recommend using the master branches of the respective repositories:

  • haxelib git haxeui-core https://github.com/haxeui/haxeui-core
  • haxelib git haxeui-html5 https://github.com/haxeui/haxeui-html5

Once that is done you can use the haxeui-core run command to create a project template, eg:

haxelib run haxeui-core create html5 (this will create the build files for a html5).

Let me know if that helps or if you get snagged anywhere.

Cheers,
Ian

Thank you! From what I’ve seen so far it looks really good.

I was able to get it working with haxeui-openfl but not haxeui-html5. After creating the html5 project, I ran haxe html5.hxml and it never returned, using 100% cpu. Killed it after a half hour.

haxelib list

actuate: [1.8.9]
box2d: [1.2.3]
format: [3.4.2]
haxeui-core: 0.0.4 [git]
haxeui-html5: [git]
haxeui-openfl: [git]
hscript: [2.3.0]
hxcpp: [4.0.52]
layout: [1.2.1]
lime-samples: [7.0.0]
lime: 2.9.1 [7.6.3]
openfl-samples: [8.7.0]
openfl: 3.6.1 [8.9.5]

Thats strange, what version of haxe?

haxe 3.4.7

filler

does --verbose help? Maybe it shows where it hangs? This is just a plain project, right? I mean, nothing interesting / special?

(what is “filler”)

Cheers,
Ian

Ive managed to work around that issue (i could reproduce it on haxe3)… its a pretty awful fix… seems like haxe3 isnt so great about macros and dependency resolution (i think) and gets itself into a loop. When you get a moment can you pull latest haxeui-core and try again and let me know about the results?

Cheers,
Ian

EDIT: travis passes now also, so my guess is the fix works - confirmation would be good if you can :slight_smile:

It works!

But what’s the right way to launch the app in Linux? I tried (just guessing)

haxelib run haxeui-core run html5

That launched the nekotools web server correctly but then ran a Windows-specific start command:

start chrome http://localhost:2000

In case you haven’t implemented it yet, on Linux I know of three ways to launch a browser, in order of preference:

xdg-open http://localhost:2000
x-www-browser http://localhost:2000
sensible-browser http://localhost:2000 //(debian based distros),

Likewise, I think on Windows a simple

start http://localhost:2000

would launch the default browser and would work for people without chrome.

Thanks for your help and quick response. I can’t wait to get started. I’m particularly interested in mobile and web apps.

Regards,
Tom

P.S. ‘filler’ was just me trying to satisfy the 20 character minimum message length :slight_smile:

1 Like

haxeui-html5 doesnt need a server… you can just open the .html up in the browser (at least, you should be able to)