This file is part of icoformat, a Windows Icon (ICO) File Format plugin for Adobe Photoshop Copyright (C) 2002-5 Toby Thain, toby@telegraphics.com.au This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Windows Icon (ICO) file format plugin for Photoshop --------------------------------------------------- Notes on source code Source code, makefiles and IDE projects under GPL license are provided for MPW (68K, Classic and Carbon targets), CodeWarrior 7 (Classic and Carbon PowerPC, and Win32 targets), CodeWarrior 1 (68K, PowerPC and Win32 targets) mingw32 (Win32 target) and gcc (Mach-O target for CS2/Mac). A Photoshop SDK is required (available from Adobe Systems, http://www.adobe.com/). The SDK was also distributed with Photoshop 6.0 and earlier. The source was built with SDK 6.0 but earlier versions of the SDK can be used. (If building with SDK v4, edit 68k.r, carbon.r, classic.r, and PiMI_68k.r to remove references to "PIResDefines.h", "PiPL.r" and "PiMI.r" and replace with a single #include "PIGeneral.r"; also remove "fmtCanWriteTransparency" from PiPL_common.r.) Edit the makefiles ("icoformat.make" for MPW, "Makefile" for mingw32), or change your CodeWarrior project's access paths, to reflect the SDK's installed location. In order to build the Carbon plugin with an SDK prior to version 7.0, it is necessary to edit the SDK file :PhotoshopAPI:Resources:PIPL.r as follows: 1. find the line "case CodePowerPC:" 2. duplicate the next 15 lines 3. in the copy only, change "case CodePowerPC:" to "case CodePowerPCbundle:" and change the 5 occurrences of "pwpc" to "ppcb" (Other changes may be necessary if attempting to build with the v7.0 SDK; this code has not been tested with it.) In order to build the 68K plugin with MPW (SC compiler), it is necessary to edit the SDK file :Photoshop:PITypes.h as follows: 1. find the line "typedef long long int64;" 2. add preprocessor directives above and below it, as follows: #ifndef __SC__ typedef long long int64; #endif To build the Mach-O plugin with gcc (OS X), check the API path (PSAPI= variable definition) in the Makefile. In the SDK, the PiPL resource template (PhotoshopAPI/Resources/PiPL.r) needs to be modified to include support for the Mach-O executable property, by adding: // the following is deduced for CS2 case CodeMachO: longint = '8BIM'; key longint = 'mach'; longint = 0; #if DeRez fill long; #else longint = (machEnd[$$ArrayIndex(properties)] - machStart[$$ArrayIndex(properties)]) / 8; #endif machStart: longint; longint; pstring; machEnd: align long; To build with CS3 Beta SDK (which supports Universal Binary): You must copy the file PIFormat.h from an earlier SDK into photoshopapi/photoshop directory, since the Beta "mini-SDK" does not support building Format plugins (thanks Adobe!) The mini-SDK is available via http://partners.adobe.com/public/developer/photoshop/devcenter.html as of time of writing (4 Jan 07). Development systems While CodeWarrior Pro 1 and CodeWarrior 7 projects are provided, MPW and mingw32 are recommended as they produce much smaller executables. These industrial strength development tools can be freely downloaded from http://developer.apple.com/tools/mpw-tools/ and http://www.mingw.org/ respectively. Mingw32 can be hosted on virtually any UNIX or Linux system, or under Windows. MPW runs on PowerPC and 68K Macs under Mac OS 9 or earlier, or Classic mode under OS X.