Sign in Join

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

Mailing lists / lazarus / 2009-09

Mac: writing a CFPlugin with Lazarus

4 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Tobias Giesen

Hello,

I would like to write a Finder context menu extension for Mac. So I need to compile a Carbon plug-in bundle that, surprisingly, uses COM like on Windows. There's sample source code for that in C++ on various web sites but I wonder if it's possible to do in Pascal?

Can I create a plug-in with Lazarus or do I have to use FPC outside of Lazarus?

I suppose there wouldn't be any sample code around?

Cheers,
Tobias

Reply by email

dmitry boyarintsev
to Tobias Giesen
Tobias Giesen wrote
Can I create a plug-in with Lazarus or do I have to use FPC outside of Lazarus?

You can use Lazarus for the development (since Lazarus can be pure FPC as well IDE).
* start Plugin writing, by creating a new "Program", rather than "Application".
* you need to provide the proper entry point (plugins doen't use main()).
* the Plugin's bundle should also be modified, since Lazarus creates Application's bundle only.

AFAIK, There's no FPC based examples, but I'm sure you can found some C/C++-based (as well as bundle's Info.plist file) samples at the http://developers.apple.com

thanks,
dmitry

Reply by email

dmitry boyarintsev
to Tobias Giesen
Tobias Giesen wrote
thanks very much for the tips! That should get me working. If I succeed, I will make a sample project in Pascal available.

May be it's even better to make a "OSX Plugin" project template as well.

thanks,
dmitry

Reply by email