Application Bundle

From Free Pascal wiki
Revision as of 15:35, 30 January 2008 by Tombo (talk | contribs) (New page: Application Bundle is a directory, often with ".app" extension, with special purpose on Mac OS X system. It contains resource files and information about the application. It is necessary f...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Application Bundle is a directory, often with ".app" extension, with special purpose on Mac OS X system. It contains resource files and information about the application. It is necessary for correct execution of applications which are using Carbon Interface.

Creating Application Bundle

From Lazarus

Open project and go to Project -> Project Options -> Application tab and push the Create Application Bundle button. The resulted Application Bundle will have inside symbolic link to the real executable.

Via command-line tool shipped with Lazarus

Open lazarus/components/macfiles/examples/createmacapplication.lpi in the IDE. Compile. Open a Terminal of your choice. Type:

cd project1/
lazarus/components/macfiles/examples/createmacapplication project1
ln -s ../../../project1 project1.app/Contents/MacOS/project1

Use shell script

There is also a script that creates an app bundle for a GTK executable at OS X Programming Tips. You can modify it to use with a Carbon executable (take out the 4 instructions that start the executable with X11). A slightly improved version of this script for Carbon apps is also available for downloading from here.

Executing application via Application Bundle

You can start the application from IDE (checked option Use Application Bundle for running and debugging (darwin only)) or via its Finder icon or in the native Mac OS X Terminal via "open project1.app".