Rev 197 | Rev 237 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | toby | 1 | Building the Filter Foundry plugin for Photoshop |
2 | ------------------------------------------------ |
||
3 | |||
4 | Notes on source code |
||
64 | toby | 5 | -------------------- |
69 | toby | 6 | Source code, makefiles and IDE projects under GPL license are provided |
7 | for MPW (Classic & Carbon PowerPC targets), CodeWarrior 7 |
||
192 | daniel-mar | 8 | (Classic & Carbon PowerPC, Win32, 68K targets), |
9 | Microsoft Visual C++ (Win32 target), OpenWatcom (Win32 target), |
||
10 | and mingw32 (Win32 target). |
||
2 | toby | 11 | |
197 | daniel-mar | 12 | A Photoshop SDK is required (available from Adobe Systems, |
192 | daniel-mar | 13 | https://www.adobe.com/devnet/photoshop/sdk.html ). |
69 | toby | 14 | The SDK was also distributed with Photoshop 6.0 and earlier. |
193 | daniel-mar | 15 | The source code has been built with SDK 6.0, CS2, CS3 beta, and CC 2017 but older |
16 | versions should work, too. |
||
2 | toby | 17 | (If building with SDK v4, edit 68k.r, carbon.r, classic.r, and PiMI_68k.r |
69 | toby | 18 | to remove references to "PIResDefines.h", "PiPL.r" and "PiMI.r" and replace |
19 | with a single #include "PIGeneral.r"; also remove "fmtCanWriteTransparency" |
||
20 | from PiPL_common.r.) |
||
2 | toby | 21 | |
197 | daniel-mar | 22 | The dependency "telegraphics_common" is available here |
23 | http://www.telegraphics.com.au/svn/common/ |
||
24 | Revision 84 (dated 9 October 2019) is included in this repository |
||
25 | to simplify the build process. |
||
192 | daniel-mar | 26 | |
197 | daniel-mar | 27 | |
192 | daniel-mar | 28 | Mac notes |
29 | --------- |
||
69 | toby | 30 | Before attempting to build, you must edit the makefiles |
192 | daniel-mar | 31 | ("FilterFoundry.make" for MPW), or change your |
69 | toby | 32 | CodeWarrior project's access paths, to reflect the SDK's installed location. |
2 | toby | 33 | |
192 | daniel-mar | 34 | To build the Carbon plugin with an SDK prior to version 7.0, |
221 | daniel-mar | 35 | it is necessary to edit the SDK file |
36 | |||
37 | :PhotoshopAPI:Resources:PIPL.r |
||
38 | |||
69 | toby | 39 | as follows: |
2 | toby | 40 | 1. find the line "case CodePowerPC:" |
41 | 2. duplicate the next 15 lines |
||
69 | toby | 42 | 3. in the copy only, change "case CodePowerPC:" to "case CodeCarbonPowerPC:" |
2 | toby | 43 | and change the 5 occurrences of "pwpc" to "ppcb" |
44 | |||
192 | daniel-mar | 45 | Photoshop 7.0, CS, and CS2 will load Carbon/PEF plugins built in this manner. |
69 | toby | 46 | Only CodeWarrior and MPW can build these. |
2 | toby | 47 | |
69 | toby | 48 | Photoshop CS2 also supports Mach-O format plugins. For details on how |
194 | daniel-mar | 49 | these are built, see the Makefile.mac (target "osx"). |
69 | toby | 50 | |
51 | Photoshop CS3 supports "universal" (or "fat") plugins having native code |
||
194 | daniel-mar | 52 | for both PowerPC and Intel architectures. The provided Makefile.mac can build |
69 | toby | 53 | a "universal" plugin if you have the CS3 "Beta" SDK (use target "fat"). |
54 | |||
55 | Note that building Mach-O plugins requires Apple's Developer Tools |
||
192 | daniel-mar | 56 | to be installed (from the DVD that came with your Mac, or downloaded from |
69 | toby | 57 | http://developer.apple.com/ if you have an ADC login). |
58 | |||
2 | toby | 59 | The Mac build requires Apple's MoreFiles library, which can be obtained via |
186 | dmarschall | 60 | https://developer.apple.com/library/archive/samplecode/MoreFiles/ |
2 | toby | 61 | |
62 | Depending on how the source files were extracted, it may be necessary to set |
||
69 | toby | 63 | the correct Mac file types before attempting to build. In MPW, this can |
64 | be done as follows. First set the current directory to the Filter Foundry |
||
65 | source directory, then: |
||
221 | daniel-mar | 66 | |
69 | toby | 67 | setfile -t TEXT Å.[chrly] Å.make Å.rc ::common:tt:Å ::common:adobeplugin:Å |
221 | daniel-mar | 68 | |
15 | toby | 69 | This can also be necessary after regenerating y.tab.c and lex.yy.c. |
192 | daniel-mar | 70 | These files are generated from the parser and lexical analyzer definitions, |
69 | toby | 71 | parser.y and lexer.l, by a UNIX Terminal (not MPW!) command such as: |
221 | daniel-mar | 72 | |
15 | toby | 73 | make y.tab.c lex.yy.c |
2 | toby | 74 | |
69 | toby | 75 | If building with MPW, finished binaries are left in the "debug" directory; |
76 | these are good for testing and debugging, as they can be updated |
||
77 | and re-run without having to re-launch Photoshop. |
||
2 | toby | 78 | |
69 | toby | 79 | The finished binary, which contains executables for Classic and Carbon, |
64 | toby | 80 | is left in the "dist" directory. |
81 | |||
192 | daniel-mar | 82 | While a CodeWarrior 7 project is provided, MPW and mingw32 are recommended |
83 | as they produce much smaller executables. |
||
64 | toby | 84 | |
192 | daniel-mar | 85 | MPW (Macintosh Programmer's Workshop) runs on PowerPC and |
86 | 68K Macs under Mac OS 9 or earlier, or Classic under OS X. |
||
87 | |||
88 | |||
106 | dmarschall | 89 | Windows notes |
90 | ------------- |
||
91 | |||
172 | dmarschall | 92 | BUILDING WITH VISUAL STUDIO |
221 | daniel-mar | 93 | * For Windows, Visual Studio works best (the community edition is even free), |
94 | and it can compile the 32-bit and 64-bit plugins for Windows. |
||
95 | * Download: https://visualstudio.microsoft.com/de/vs/community/ |
||
96 | * To build in Windows with Visual Studio (IDE or command line), see the visual_studio |
||
97 | subdirectory and notes (README.md). |
||
98 | * Most recently tested with Visual C++ 2019 and Adobe Photoshop SDK CC 2017. |
||
107 | dmarschall | 99 | |
172 | dmarschall | 100 | BUILDING WITH OPEN WATCOM |
221 | daniel-mar | 101 | * OpenWatcom can be used, but only for 32 Bit, and it is officially not |
102 | supported by Adobe. |
||
103 | * Download: https://sourceforge.net/projects/openwatcom/files/ |
||
104 | * To build in Windows with the OpenWatcom IDE, see the wpj |
||
105 | subdirectory and notes (README.md), kindly provided by Peter Heckert and Daniel Marschall. |
||
106 | * Most recently tested with Open Watcom 1.9 and Adobe Photoshop SDK CC 2017. |
||
106 | dmarschall | 107 | |
195 | daniel-mar | 108 | BUILDING WITH MINGW32/64 |
221 | daniel-mar | 109 | * Mingw32 can be hosted on virtually any UNIX or Linux system, or under Windows. |
110 | * Download: http://mingw-w64.org/doku.php/download/mingw-builds |
||
111 | * Do NOT install mingw32 to a directory that contains white spaces (i.e. "C:\Program Files (x86)\")! |
||
112 | * To build both Win32 and Win64, you need to run setup two times: |
||
113 | For 32 bit "i686" and for 64 bit "x86_64" |
||
114 | * Check if all paths inside the file "make_mingw32.bat" are valid, then run it. |
||
115 | The files FilterFoundry.8bf (32 Bit) and FilterFoundry64.8bf (64 Bit) should now be generated. |
||
116 | * Most recently tested with mingw64 and Adobe Photoshop SDK CC 2017: |
||
117 | - i686-8.1.0-posix-dwarf-rt_v6-rev0 for 32 Bit |
||
118 | - x86_64-8.1.0-posix-seh-rt_v6-rev0 for 64 Bit |