0 Replies Latest reply on Sep 19, 2013 7:45 AM by Luis Morcillo

    Problems with external libraries in Mac OSX

    Luis Morcillo Level 1

      Hi! It's been a long time without posting here

       

      I'm trying to port a Javascript script I developed for Photoshop, from Windows to Mac. The script works fine, but at some point needs an external library ("libapl.dll") that links to another library ("core.dll"), and while in Windows this has been working perfectly, I'm not having luck in Mac.

       

      I'll explain what I've done so far and what I'm stuck in:

       

      -I recompiled libapl and core libraries for mac. Currently I have "libapl.bundle" and "core.dylib".

       

      -I've copied "myscript.jsx", "libapl.bundle" and "core.dylib" in "/Applications/Adobe Photoshop CS5/Presets/Scripts". In Windows, "core.dll" needs to be in photoshop.exe path. Otherwise, it's not recognized by libapl.dll. But I don't know the equivalent in Mac OS.

       

      -I launch Photoshop and then my script, and when it has to load "libapl.bundle", I get the expected error: "IOError: I/O error", which in Windows always meant that "libapi" isn't able to find or link to "core".

       

      -I checked "libapl.bundle" using a couple of dependency walkers, and it seems to find "core.dylib" with no problems.

       

       

      So I guess I need to place my "core.dylib" in the right path for it to be detected by "libapl.bundle", but what would be that path? I already tried showing Photoshop package contents and placing the library in a few folders there, but no luck.

       

      And the other question would be: is it wrong having a .bundle linking to a .dylib? Should everything be .bundle?

       

       

      Complex scripting in mac is a pity, as there's not much info in the internet