Could not find template file flash/hxml when installing haxe lime
Asked Answered
P

2

6

I recently tried to develop in haxe/lime and I have two things that freaked me out. 1. I tried to install Lime by this command:

> haxelib install lime
haxelib run lime setup

and it automatically installed Lime in "c:/" and I need to move the files to "lib" to haxe folder.

2.when i open Lime project in FD i get this error:

> Called from ? line 1
Called from CommandLineTools.hx line 995
Called from CommandLineTools.hx line 23
Called from CommandLineTools.hx line 108
Called from CommandLineTools.hx line 190
Called from platforms/FlashPlatform.hx line 91
Called from /usr/lib/haxe/std/neko/_std/sys/io/File.hx line 30
Uncaught exception - Invalid field access : __s

end when i try to build the project i get this error:

> Warning: Could not find template file: flash/hxml
Warning: Could not find template file: flash/haxe
Fatal error: exception Failure("File not found bin/flash/haxe/release.hxml")
Build halted with errors (haxelib.exe).
Puebla answered 18/8, 2014 at 20:32 Comment(0)
L
4

for your first problem, it's looks like you don't configure haxelib path.

You can set up the path for your libraries with : haxelib setup

Here yo put the path where you wants your lib to be store.

And don't forget after you install lime to do : haxelib run lime setup like it's asked.

For your problem with FD I suppose that's can come with the fact you moved your lime folder to another folder. Generally you never have to move a lib to another folder or haxe will not know is location.

If it's not sorry, I don't use FD but hide or sublime text.

Leger answered 21/8, 2014 at 12:0 Comment(7)
thank you, but im remove Lime and install this again and i still get this error :( im put my default path to: "Haxe\haxe\lib" its right?Puebla
You can put your library path everywhere you have the right so it's ok.Leger
Try to install openfl too because generaly lime without openfl doesn't do anything. lime install openfl And you can ensure that everything is alright by trying to use one the openfl sample : lime create openfl:PiratePig If everything is alright but you still have a bug under FD try doing lime build project.lime flashin a prompt open from FD. (there's a FD toolbar button).Leger
yes, but.. i dont want to use in openfl, i dont need animation, i need load pictures and assets. and also i'm beginner so i want to understand what it's lime and use it little bit Lime and then advance to openFl, sorry for i'm bothering you . .foo :)Puebla
Your goal for what I understand is to use openfl. For beginning used directly OpenFL you will not be able to do anything with lime if you are beginner like it's used to target multi platform. If you want to load assets, etc. you have to use OpenFL. OpenFL goal is to allow you to create game, interface, etc. For example, HaxeUI which is a GUI lib used OpenFL to create the different elements. You can't used Lime alone.Leger
ok, thank you, i moved to openFl. all working great, but may you know why "trace" appear in flash player window and not in output panel? i try to use in "flash-native" but i dont know what i suppose to do with that. i mean that : old.haxe.org/manual/tips_and_tricks im working with flashdevelopPuebla
I think it's because you need to launch in a debug way but I never used flash a lot. I prefer Neko generally for debugging and production also. My choice is quite strange on this point I know ^^.Leger
L
2

The accepted answer did not make sense to me so I decided to post a solution that worked on my system. It's worth noting that I'm on Ubuntu 14.04, not Windows. I could install neither lime nor openfl. I decided to include openfl details here as I could not find a solution for that either. The openfl error I received was Uncaught exception - Invalid field access: split.

Many forums recommend checking that the HAXEPATH environment variable is not set. In my case, it wasn't set, but I received a similar lime error to the one posted here. Contrary to what those forums advised, manually exporting the HAXEPATH variable allowed me to run both lime and openfl setups successfully.

One site also mentioned that the format lib is necessary, although I'm not sure how true this is. Please leave a comment if you can confirm or deny this.

Here's what I did:

Install openfl, lime, and format

haxelib install openfl
haxelib install lime
haxelib install format

Get the haxelib path, and export it

Running haxelib config will return the haxelib repository path as is currently defined. If you have not defined a haxelib repo path, you can do so by running haxelib setup. On my system the path was /usr/share/haxe/lib.

Export the haxelib path:
export HAXEPATH="`haxelib config`"

Complete the setup

haxelib run lime setup
haxelib run openfl setup

Confirm all is working

Run lime or openfl. You should receive a terminal splash welcome from both.

I added the above export entry to my bashrc file as these tools always require that the variable exists in my environment.

Lashawn answered 22/6, 2016 at 6:6 Comment(1)
this deserve's a lot of upvotes. I wonder why no one came here in 1.5 years. Thanks mate.Unpolitic

© 2022 - 2024 — McMap. All rights reserved.