Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2009-11

Mac OS X 6.2

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

John Coarsey

I am running Lazarus under Mac OS x 6.2, (Snow Leopard) and am able to build test apps fine. I can run them outside of Lazarus as well. I can see the package and see its contents.? When I go to copy the package file over to a thumb drive or desktop it's icon changes and when I try to run it I get a message that says the file may be missing components or be corrupt. Is there another way to copy these files as the copy and paste do not seem to work. Thanks,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20091112/75d8ace1/attachment.html>

Reply by email

dmitry boyarintsev
to John Coarsey

Hello John

Lazarus uses symbol link to maintain MacOSX bundle. The project layout is the following:

project (executable binary)
project.app (the bundle)
project.app/Content/MacOS/project (symbolic link to project binary outside the bundle)

When you copy the bundle via Finder, the symbolic link is copied instead of the file. So the bundle at the new location cannot be executed, because the link inside of the new bundle points to a wrong place.

To solve the problem you need to replace a symbolic link in the bundle with the project binary.

thanks,
dmiry

Reply by email

Hess, Philip J
to dmitry boyarintsev

I.e., prior to any distribution of the bundle, be sure to do something like this:

rm "myapp.app/contents/macos/myappexec"
cp -p myappexec "myapp.app/contents/macos"

The executable is created back in the main project folder with a symlink pointing to it from within the .app bundle to simplify development. When you distribute you have to replace the symlink with the actual executable file.

Thanks.

-Phil

Reply by email