I did this and I want to share my achievements.
I speak about Photoshop CS4 because it allows to use smart plugins. CS6 has reduced plugins system.
CS4 works fine under 10.6 - 10.9.2 as well. The application is 32bits and so it accepts plugins only 32bits.
For the development you need XCode from 3.1 up to modern 5.0.2 but you need to take somewhere MacOS10.6SDK.
Only this SDK is good for the purpose! Take here or extract official way
If it cannot be found there you will need to extract and copy it from Xcode 4.3. To do this:
- Download the XCode 4.3 .dmg file from the Apple Developer portal (you'll need an Apple Developer account).
- Download the utility Pacifist and use it to extract the 10.6 SDK from the XCode 4.3 .dmg file. Click on the "Extract Package" button, find the SDK by searching for 10.6 in the search box, then Ctrl + click on the MacOSX10.6.sdk directory and Extract it to a suitable location.
- Add a symlink from the 10.6 SDK location to the/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ directory.
Next you have to download adobe_photoshop_cs4_sdk_mac.zip. It is available for free.
The SDK is written for Carbon and contains PowerPC technologies and code We should cleanup this to do it compilable.
Adobe Photoshop CS4 SDK/photoshopapi/photoshop/PIActions.h:
-#include "AERegistry.h" +//#include "AERegistry.h"
In many places make a replace
-#include <Carbon.h> +#include <Carbon/Carbon.h>
Adobe Photoshop CS4 SDK/photoshopapi/photoshop/PITypes.h
-typedef unsigned32 uint32; +//typedef unsigned32 uint32;
Adobe Photoshop CS4 SDK/samplecode/common/includes/DialogUtilities.h
#else // Macintosh and others - #include <Dialogs.h> // Macintosh standard dialogs - #include <Types.h> // Macintosh standard types - #include <Gestalt.h> // Macintosh gestalt routines - #include <TextUtils.h> // Macintosh text utilities (GetString()) - #include <OSUtils.h> // Macintosh OS Utilities (Delay()) - #include <Menus.h> // Macintosh Menu Manager routines (DelMenuItem()) +// #include <Dialogs.h> // Macintosh standard dialogs +// #include <Types.h> // Macintosh standard types +// #include <Gestalt.h> // Macintosh gestalt routines +// #include <TextUtils.h> // Macintosh text utilities (GetString()) +// #include <OSUtils.h> // Macintosh OS Utilities (Delay()) +// #include <Menus.h> // Macintosh Menu Manager routines (DelMenuItem()) #endif
Adobe Photoshop CS4 SDK/samplecode/common/includes/PIUFile.h
-#include <Folders.h> +//#include <Folders.h>
Adobe Photoshop CS4 SDK/samplecode/common/includes/PIUI.h
- #include "Lists.h" +// #include "Lists.h"
Adobe Photoshop CS4 SDK/samplecode/common/includes/PIUtilities.h
- #include <LowMem.h> - #include <ToolUtils.h> - #include <FixMath.h> +// #include <LowMem.h> +// #include <ToolUtils.h> +// #include <FixMath.h>
After that you can compile sample projects and see how it works.
In XCode you have to set
BaseSDK = OS10.6
Other CC flags = -DMAC_ENV
Now I wish to show you my sample: OpenEXR format plugin. CS4 already contain it but with some differences.
And my version is customizable.
Sources of the format is available at official site http://www.openexr.com/
There is also photoshop plugin version 1.2.1 but it is intended for very old SDK and PowerPC Mac. I spend some time to rewrite it for new SDK CS4 and new OpenEXR 2.1.0.
How it works.
Initial view. You see overexposure in window
Screen Shot 2014-04-10 at 14.03.32.png 273.98KB 3 downloads
Tuning exposure you can take a view in the window but dark in the room.
Screen Shot 2014-04-10 at 14.03.58.png 162.85KB 3 downloads
Tuning Gamma you can compress brightness range
Screen Shot 2014-04-10 at 14.04.29.png 218.06KB 3 downloads
The final image can be saved with different compressions
Screen Shot 2014-04-10 at 15.35.12.png 62.35KB 4 downloads
This is the plugin. For sources ask in PM.
MyExr2.plugin.zip 544.31KB 1 downloads