Slice Posted April 10, 2014 Share Posted April 10, 2014 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 setBaseSDK = OS10.6arch=i386Other 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 windowTuning exposure you can take a view in the window but dark in the room.Tuning Gamma you can compress brightness rangeThe final image can be saved with different compressions This is the plugin. For sources ask in PM.MyExr2.plugin.zip 4 Link to comment Share on other sites More sharing options...
hooda Posted April 10, 2014 Share Posted April 10, 2014 Wow.. great guide. what kind of basic coding to apply/create with xcode? really.. i'm noob about coding world. Nice share slice..! Link to comment Share on other sites More sharing options...
Slice Posted April 16, 2014 Author Share Posted April 16, 2014 After XCode update to 5.1.1 it became impossible. Apple decided to not support 32 bit developement. EDITED. So I had to install XCode 4.4.1 on Maverics . It works. Apple, you may run forward. Link to comment Share on other sites More sharing options...
Recommended Posts