[SOLVED] Files used during macro time not found on ios

Hey,

I use “build macros” which take there information from files. I call them for example like this:

@:build(controllers.Builder.buildController("gui/gamescreen.xml"))

The file is located in /gui.
That works find (with openfl/lime) for android/flash/linux/mac.
But on ios the macro can not find the file.

I can work around this, by making a symbolic link from

<project-root>/gui 

to

<project-root>/Export/ios/<project-name>/haxe

But that is not very practical. Is there a fix for this?

Thanks!
Nathan

Try adding …/ before the path in the macro, this happens targeting ios.

Hey,

…/ does not work, but I get your point. To reach the root of the project from /Export/ios//haxe I have to add “…/…/…/…/” which works. Now I have to “if ios” that part.

It is not beautiful, but it works for me. Thanks!

Nathan

Have you tried using Context.resolvePath in the macro?

2 Likes

I did not use Context.resolvePath, and using it solved all my problems without any “…”!
Thanks!

1 Like