Openfl command on Ubuntu

Hi there,

I have a little issue with my openfl setup. I’m running Ubuntu 14.04. Everything works, I can create and compile a project with lime, except the openfl command:

[email protected]:~$ openfl
> openfl: command not found

I guess only a symlink is missing somewhere but I can’t find the right path. Can anyone help me please?
Thanks!

Maybe you forgot do to sudo haxelib run openfl setup?

Otherwise you can do it yourself, put:

haxelib run openfl "[email protected]"```
in `/usr/bin/openf/` and then do `sudo chmod +x /usr/bin/openfl`.
1 Like

I did as you suggest with a bash script but here is what I got:

[email protected]:~$ openfl
Error: '-openfl' is not a valid command

Hmm, what happens when you run haxelib run openfl manually?

Same thing…

[email protected]:~$ haxelib run openfl
Error: '-openfl' is not a valid command

You shouldn’t need the script. Running setup should do it. Do you want to try reinstalling ?

I tried to run

sudo haxelib run openfl setup

And I got

hxcpp is up to date
lime-tools is up to date
Do you want to install the "lime" command? [y/n/a] ? 

And choosing “y” does not fix this issue (which seems logic, the lime command has nothing to do with this I guess). I don’t really mind re-installing everything but I’m afraid I will eventually run into the same problem.

When you see Do you want to install the "x" command?, what it means is, if you pick yes/all, you can then run the command. In this case, if you say yes, you can then run that command from the command-line.

Haxe is a complicated stack, especially if you use a game library like HaxeFlixel (which I do). In order to setup all the dependencies takes a bit of time. Thankfully, most of the libraries detect and install dependencies correctly.

You should get another prompt asking you to setup the openfl command. If you don’t, run haxelib run openfl setup. It should give you a similar prompt.

Are you planning to use bare-bones OpenFL, or something on top? If it’s the latter, you may not need to worry about this (HaxeFlixel, for example, has its own project generator, so you don’t need the openfl command).

Thank you for your help.

I fixed it by removing openfl and lime, then upgrading

sudo haxelib remove openfl
sudo haxelib remove lime
sudo haxelib upgrade

By doing so, I re-installed openfl as a dependency of HaxeFlixel (I didn’t remenber I had it installed) and finally, I did

sudo haxelib run openfl setup

and it prompted me to install the openfl command :).

Thanks again!