Jump to content

Packaged Mac App


Recommended Posts

I just got a bunch of system info when I ran lsof but nothing about pyrogenesis. I also ran

lsof -a -d cwd -c pyrogenesis

but didn't produce any results.

The game has to be running when you use that command. For me it shows:


COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
pyrogenes 207 Ben cwd DIR 14,2 3672 324263 /Users/Ben/0ad/binaries/system

so dlopen should be finding libAtlasUI and libCollada, and indeed it works without any @executable_path hack. Maybe for you and wraitii it's something different?

Link to comment
Share on other sites

  • Replies 61
  • Created
  • Last Reply

Top Posters In This Topic

I believe it's because it's DLLLoader.cpp that loads it. It explicitly calls a path, which OSX may consider as an absolute path.

Hmm but that still doesn't explain why it works for me and not you. I've made some local changes for OS X building, but I'm pretty sure the path for loading libraries is untouched for non-bundles: DllLoader.cpp (I'm testing by running a loose binary, not a bundle). I'd really like to get to the bottom of this annoying problem :(

Link to comment
Share on other sites

Ah thanks! So the cwd isn't always binaries/system! I did some testing and noticed that if I open the game from Finder, the cwd is /Users/Ben, so indeed Atlas and Collada loading are broken (this problem doesn't occur on the official bundles because it uses an absolute path with the bundle's framework directory). 99.99% of the time I use terminal to run the game, and in that case the cwd is binaries/system, so it just happens to work by relying on dlopen's cwd path searching :)

Wraitii's solution looks like it may be the least evil (another option would be setting the current directory), so I'll test it some more and commit to SVN, then merge it into my github osx-build branch.

Link to comment
Share on other sites

It worked perfectly, so I committed a variation of your patch (r12834) Please test and see how it goes (y)

It works. Now I don't have to make the change myself each time before I compile :P

BTW my experiments with SVN are going nicely so I'll start building packages soon. Once the entire GitHub migration thing is sorted out...

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share


×
×
  • Create New...