Path problems on mac target

Hello all, I am currently testing the distribution of my nme game, but the .app file generated for mac does not work on other computers. I figured out the problem was the path in which the binary look for the needed libraries (dylib files). The app ru…

Viewing 1 to 4 (4 Total)
Path problems on mac target

jrrt

jrrt
Total Posts: 2
Joined: April 20, 2012

Hello all,
I am currently testing the distribution of my nme game, but the .app file generated for mac does not work on other computers.

I figured out the problem was the path in which the binary look for the needed libraries (dylib files). The app runs as if the working directory was the system root, and so, it is unable to find the bundled libraries.

The workaround I found is when I need to publish the game, I generate the app with nme, then I manually edit the bundle to run a custom script that basically changes the directory to inside the app and then runs the binary.

I would like to know if there is a "cleaner" solution, or if there is any way to integrate this in the way nme generates the mac .app

Tags:
Posted on April 20, 2012 at 4:35 AM

Philippe

Philippe
Total Posts: 262
Joined: September 08, 2011

Re: Path problems on mac target

I think Joshua fixed it in NME svn a few days ago.

Posted on April 20, 2012 at 7:57 AM

jrrt

jrrt
Total Posts: 2
Joined: April 20, 2012

Re: Path problems on mac target

Thank you smiling

Posted on April 20, 2012 at 8:21 AM

singmajesty

singmajesty
Total Posts: 2192
Joined: August 25, 2011

Re: Path problems on mac target

I made the fix. I had to add it to HXCPP when it is loading the libraries. I'm not sure if asset paths are affected, though?

If you'd like to try it out, you can modify or replace "src/hx/Lib.cpp" in the HXCPP directory, or check-out HXCPP from SVN and use "haxelib dev hxcpp path/to/svn/checkout" to use it instead of the one in haxelib:

http://code.google.com/p/hxcpp/source/detail?r=468...

Posted on April 20, 2012 at 3:53 PM