Rev 385 | Rev 515 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 385 | Rev 512 | ||
---|---|---|---|
1 | Building the Filter Foundry plugin for Photoshop |
1 | Building the Filter Foundry plugin for Photoshop |
2 | ------------------------------------------------ |
2 | ------------------------------------------------ |
3 | 3 | ||
4 | Notes on source code |
4 | Notes on source code |
5 | -------------------- |
5 | -------------------- |
6 | Source code, makefiles and IDE projects under GPL license are provided |
6 | Source code, makefiles and IDE projects under GPL license are provided |
7 | for MPW (Classic & Carbon PowerPC targets), CodeWarrior 7 |
7 | for MPW (Classic & Carbon PowerPC targets), CodeWarrior 7 |
8 | (Classic & Carbon PowerPC, Win32, 68K targets), |
8 | (Classic & Carbon PowerPC, Win32, 68K targets), |
9 | Microsoft Visual C++ (Win32/64 target), OpenWatcom (Win32 target), |
9 | Microsoft Visual C++ (Win32/64 target), OpenWatcom (Win32 target), |
10 | mingw32 (Win32 target), and mingw64 (Win64 target). |
10 | mingw32 (Win32 target), and mingw64 (Win64 target). |
11 | 11 | ||
12 | A Photoshop SDK is required (available from Adobe Systems). |
12 | A Photoshop SDK is required (available from Adobe Systems). |
13 | Please read the document DOWNLOAD.txt in the directory "photoshop_sdk" |
13 | Please read the document DOWNLOAD.txt in the directory "photoshop_sdk" |
14 | for further information. |
14 | for further information. |
15 | 15 | ||
16 | The dependency "telegraphics_common" is available here |
16 | The dependency "telegraphics_common" is available here |
17 | https://www.telegraphics.com.au/svn/common/ |
17 | https://www.telegraphics.com.au/svn/common/ |
18 | Revision 84 (dated 9 October 2019) is included in this repository |
18 | Revision 84 (dated 9 October 2019) is included in this repository |
19 | to simplify the build process. After the addition, the |
19 | to simplify the build process. After the addition, the |
20 | code there was updated. |
20 | code there was updated. |
21 | 21 | ||
22 | 22 | ||
23 | Mac notes |
23 | Mac notes |
24 | --------- |
24 | --------- |
25 | Before attempting to build, you must edit the makefiles |
25 | Before attempting to build, you must edit the makefiles |
26 | ("FilterFoundry.make" for MPW), or change your |
26 | ("FilterFoundry.make" for MPW), or change your |
27 | CodeWarrior project's access paths, to reflect the SDK's installed location. |
27 | CodeWarrior project's access paths, to reflect the SDK's installed location. |
28 | 28 | ||
29 | To build the Carbon plugin with an SDK prior to version 7.0, |
29 | To build the Carbon plugin with an SDK prior to version 7.0, |
30 | it is necessary to edit the SDK file |
30 | it is necessary to edit the SDK file |
31 | 31 | ||
32 | :PhotoshopAPI:Resources:PIPL.r |
32 | :PhotoshopAPI:Resources:PIPL.r |
33 | 33 | ||
34 | as follows: |
34 | as follows: |
35 | 1. find the line "case CodePowerPC:" |
35 | 1. find the line "case CodePowerPC:" |
36 | 2. duplicate the next 15 lines |
36 | 2. duplicate the next 15 lines |
37 | 3. in the copy only, change "case CodePowerPC:" to "case CodeCarbonPowerPC:" |
37 | 3. in the copy only, change "case CodePowerPC:" to "case CodeCarbonPowerPC:" |
38 | and change the 5 occurrences of "pwpc" to "ppcb" |
38 | and change the 5 occurrences of "pwpc" to "ppcb" |
39 | 39 | ||
40 | Photoshop 7.0, CS, and CS2 will load Carbon/PEF plugins built in this manner. |
40 | Photoshop 7.0, CS, and CS2 will load Carbon/PEF plugins built in this manner. |
41 | Only CodeWarrior and MPW can build these. |
41 | Only CodeWarrior and MPW can build these. |
42 | 42 | ||
43 | Photoshop CS2 also supports Mach-O format plugins. For details on how |
43 | Photoshop CS2 also supports Mach-O format plugins. For details on how |
44 | these are built, see the Makefile.mac (target "osx"). |
44 | these are built, see the Makefile.mac (target "osx"). |
45 | 45 | ||
46 | Photoshop CS3 supports "universal" (or "fat") plugins having native code |
46 | Photoshop CS3 supports "universal" (or "fat") plugins having native code |
47 | for both PowerPC and Intel architectures. The provided Makefile.mac can build |
47 | for both PowerPC and Intel architectures. The provided Makefile.mac can build |
48 | a "universal" plugin if you have the CS3 "Beta" SDK (use target "fat"). |
48 | a "universal" plugin if you have the CS3 "Beta" SDK (use target "fat"). |
49 | 49 | ||
50 | Note that building Mach-O plugins requires Apple's Developer Tools |
50 | Note that building Mach-O plugins requires Apple's Developer Tools |
51 | to be installed (from the DVD that came with your Mac, or downloaded from |
51 | to be installed (from the DVD that came with your Mac, or downloaded from |
52 | https://developer.apple.com/ if you have an ADC login). |
52 | https://developer.apple.com/ if you have an ADC login). |
53 | 53 | ||
54 | The Mac build requires Apple's MoreFiles library, which can be obtained via |
54 | The Mac build requires Apple's MoreFiles library, which can be obtained via |
55 | https://developer.apple.com/library/archive/samplecode/MoreFiles/ |
55 | https://developer.apple.com/library/archive/samplecode/MoreFiles/ |
56 | 56 | ||
57 | Depending on how the source files were extracted, it may be necessary to set |
57 | Depending on how the source files were extracted, it may be necessary to set |
58 | the correct Mac file types before attempting to build. In MPW, this can |
58 | the correct Mac file types before attempting to build. In MPW, this can |
59 | be done as follows. First set the current directory to the Filter Foundry |
59 | be done as follows. First set the current directory to the Filter Foundry |
60 | source directory, then: |
60 | source directory, then: |
61 | 61 | ||
62 | setfile -t TEXT Å.[chrly] Å.make Å.rc ::common:tt:Å ::common:adobeplugin:Å |
62 | setfile -t TEXT Å.[chrly] Å.make Å.rc ::common:tt:Å ::common:adobeplugin:Å |
63 | 63 | ||
64 | This can also be necessary after regenerating y.tab.c and lex.yy.c. |
64 | This can also be necessary after regenerating y.tab.c and lex.yy.c. |
65 | These files are generated from the parser and lexical analyzer definitions, |
65 | These files are generated from the parser and lexical analyzer definitions, |
66 | parser.y and lexer.l, by a UNIX Terminal (not MPW!) command such as: |
66 | parser.y and lexer.l, by a UNIX Terminal (not MPW!) command such as: |
67 | 67 | ||
68 | make y.tab.c lex.yy.c |
68 | make y.tab.c lex.yy.c |
69 | 69 | ||
70 | If building with MPW, finished binaries are left in the "debug" directory; |
70 | If building with MPW, finished binaries are left in the "debug" directory; |
71 | these are good for testing and debugging, as they can be updated |
71 | these are good for testing and debugging, as they can be updated |
72 | and re-run without having to re-launch Photoshop. |
72 | and re-run without having to re-launch Photoshop. |
73 | 73 | ||
74 | The finished binary, which contains executables for Classic and Carbon, |
74 | The finished binary, which contains executables for Classic and Carbon, |
75 | is left in the "dist" directory. |
75 | is left in the "dist" directory. |
76 | 76 | ||
77 | While a CodeWarrior 7 project is provided, MPW and mingw32 are recommended |
77 | While a CodeWarrior 7 project is provided, MPW and mingw32 are recommended |
78 | as they produce much smaller executables. |
78 | as they produce much smaller executables. |
79 | 79 | ||
80 | MPW (Macintosh Programmer's Workshop) runs on PowerPC and |
80 | MPW (Macintosh Programmer's Workshop) runs on PowerPC and |
81 | 68K Macs under Mac OS 9 or earlier, or Classic under OS X. |
81 | 68K Macs under Mac OS 9 or earlier, or Classic under OS X. |
82 | 82 | ||
83 | 83 | ||
84 | Windows notes |
84 | Windows notes |
85 | ------------- |
85 | ------------- |
86 | 86 | ||
87 | BUILDING WITH VISUAL STUDIO |
87 | BUILDING WITH VISUAL STUDIO |
88 | * For Windows, Visual Studio works best (the community edition is even free), |
88 | * For Windows, Visual Studio works best (the community edition is even free), |
89 | and it can compile the 32-bit and 64-bit plugins for Windows. |
89 | and it can compile the 32-bit and 64-bit plugins for Windows. |
90 | * Download: https://visualstudio.microsoft.com/de/vs/community/ |
90 | * Download: https://visualstudio.microsoft.com/de/vs/community/ |
91 | * To build in Windows with Visual Studio (IDE or command line), see the visual_studio |
91 | * To build in Windows with Visual Studio (IDE or command line), see the visual_studio |
92 | subdirectory and notes (README.md). |
92 | subdirectory and notes (README.md). |
93 | * Most recently tested with Visual C++ 2019 and Adobe Photoshop SDK CC 2017. |
93 | * Most recently tested with Visual C++ 2019 and Adobe Photoshop SDK CC 2017. |
94 | 94 | ||
95 | BUILDING WITH OPEN WATCOM |
95 | BUILDING WITH OPEN WATCOM |
96 | * OpenWatcom can be used, but only for 32 Bit, and it is officially not |
96 | * OpenWatcom can be used, but only for 32 Bit, and it is officially not |
97 | supported by Adobe. |
97 | supported by Adobe. |
98 | * Download: https://sourceforge.net/projects/openwatcom/files/ |
98 | * Download: https://sourceforge.net/projects/openwatcom/files/ |
99 | * To build in Windows with the OpenWatcom IDE, see the wpj |
99 | * To build in Windows with the OpenWatcom IDE, see the wpj |
100 | subdirectory and notes (README.md), kindly provided by Peter Heckert and Daniel Marschall. |
100 | subdirectory and notes (README.md), kindly provided by Peter Heckert and Daniel Marschall. |
101 | * Most recently tested with Open Watcom 1.9 and Adobe Photoshop SDK CC 2017. |
101 | * Most recently tested with Open Watcom 1.9 and Adobe Photoshop SDK CC 2017. |
102 | 102 | ||
103 | BUILDING WITH MINGW32/64 |
103 | BUILDING WITH MINGW32/64 |
- | 104 | * IMPORTANT: Building with MINGW32/64 is currently NOT possible |
|
- | 105 | because the resoure compiler doesn't resolve the compiler (windres) constants of language.h in |
|
- | 106 | language_win.rc and shows a syntax error. You can compile if you replace the constants by hand. |
|
- | 107 | Reported bug in May 8, 2022 via email, because the bugtracker doesn't allow user account creation. |
|
104 | * Mingw32 can be hosted on virtually any UNIX or Linux system, or under Windows. |
108 | * Mingw32 can be hosted on virtually any UNIX or Linux system, or under Windows. |
105 | * Download: http://mingw-w64.org/doku.php/download/mingw-builds |
109 | * Download: http://mingw-w64.org/doku.php/download/mingw-builds |
106 | * Do NOT install mingw32 to a directory that contains white spaces (i.e. "C:\Program Files (x86)\")! |
110 | * Do NOT install mingw32 to a directory that contains white spaces (i.e. "C:\Program Files (x86)\")! |
107 | * To build both Win32 and Win64, you need to run setup two times: |
111 | * To build both Win32 and Win64, you need to run setup two times: |
108 | For 32 bit "i686" and for 64 bit "x86_64" |
112 | For 32 bit "i686" and for 64 bit "x86_64" |
109 | * Check if all paths inside the file "make_mingw32.bat" are valid, then run it. |
113 | * Check if all paths inside the file "make_mingw32.bat" are valid, then run it. |
110 | The files FilterFoundry.8bf (32 Bit) and FilterFoundry64.8bf (64 Bit) should now be generated. |
114 | The files FilterFoundry.8bf (32 Bit) and FilterFoundry64.8bf (64 Bit) should now be generated. |
111 | * Most recently tested with mingw64 and Adobe Photoshop SDK 2021: |
115 | * Most recently tested with mingw64 and Adobe Photoshop SDK 2021: |
112 | - i686-8.1.0-posix-dwarf-rt_v6-rev0 for 32 Bit |
116 | - i686-8.1.0-posix-dwarf-rt_v6-rev0 for 32 Bit |
113 | - x86_64-8.1.0-posix-seh-rt_v6-rev0 for 64 Bit |
117 | - x86_64-8.1.0-posix-seh-rt_v6-rev0 for 64 Bit |
114 | 118 | ||
115 | ViaThikSoft builds the 32-bit version using OpenWatcom (to keep Win9x compatibility) |
119 | ViaThikSoft builds the 32-bit version using OpenWatcom (to keep Win9x compatibility) |
116 | and the 64-bit version using Visual Studio batch file. Of course, you can do it |
120 | and the 64-bit version using Visual Studio batch file. Of course, you can do it |
117 | the way you like. |
121 | the way you like. |
118 | 122 | ||
119 | 123 | ||
120 | Allowing 32/64 cross-building |
124 | Allowing 32/64 cross-building |
121 | ----------------------------- |
125 | ----------------------------- |
122 | 126 | ||
123 | (Currently only available in Windows) |
127 | (Currently only available in Windows) |
124 | 128 | ||
125 | The 32-bit version of Windows is able to create a 64-bit standalone filter |
129 | The 32-bit version of Windows is able to create a 64-bit standalone filter |
126 | and vice-versa. Therefore, the filters need to have each other be included |
130 | and vice-versa. Therefore, the filters need to have each other be included |
127 | as a resource. To achieve this, a post-build event is started that will |
131 | as a resource. To achieve this, a post-build event is started that will |
128 | place the newest FilterFoundry.8bf and FilterFoundry64.8bf into the folder |
132 | place the newest FilterFoundry.8bf and FilterFoundry64.8bf into the folder |
129 | **3264_mixer\in**. Then, **3264_mixer\foundry_3264_mixer.bat** will be started, |
133 | **3264_mixer\in**. Then, **3264_mixer\foundry_3264_mixer.bat** will be started, |
130 | which mixes everything together. It will then copy back the mixed 8BF files |
134 | which mixes everything together. It will then copy back the mixed 8BF files |
131 | into the original locations so that your debugger/IDE can work with them. |
135 | into the original locations so that your debugger/IDE can work with them. |
132 | The files ready for publishing are always placed in **3264_mixer\out**. |
136 | The files ready for publishing are always placed in **3264_mixer\out**. |
133 | 137 | ||
134 | Unfortunately, the mixer will only work if a 64-bit file is existing, |
138 | Unfortunately, the mixer will only work if a 64-bit file is existing, |
135 | therefore you MUST compile both 32-bit and 64-bit before you can continue! |
139 | therefore you MUST compile both 32-bit and 64-bit before you can continue! |
136 | Note: 32-bit and 64-bit don't need to be compiled using the same compiler. |
140 | Note: 32-bit and 64-bit don't need to be compiled using the same compiler. |
137 | It is fine to compile 64-bit using Visual C++ and 32-bit using OpenWatcom |
141 | It is fine to compile 64-bit using Visual C++ and 32-bit using OpenWatcom |
138 | (this is done by ViaThinkSoft to achieve Windows 9x compatibility). |
142 | (this is done by ViaThinkSoft to achieve Windows 9x compatibility). |
139 | 143 |