Rev 200 | Rev 214 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
60 | peter | 1 | |
198 | daniel-mar | 2 | Building FilterFoundry with OpenWatcom |
3 | ====================================== |
||
60 | peter | 4 | |
192 | daniel-mar | 5 | Most recently tested with OpenWatcom 1.9 and Adobe Photoshop SDK CC 2017. |
60 | peter | 6 | |
107 | dmarschall | 7 | |
192 | daniel-mar | 8 | Prerequisites |
9 | ------------- |
||
107 | dmarschall | 10 | |
11 | 1) Flex and Bison |
||
192 | daniel-mar | 12 | Available here: |
13 | https://sourceforge.net/projects/winflexbison/ |
||
107 | dmarschall | 14 | |
15 | 2) Adobe Photoshop SDK |
||
192 | daniel-mar | 16 | Available on some Photoshop CDs, or can be downloaded at |
17 | https://www.adobe.com/devnet/photoshop/sdk.html |
||
107 | dmarschall | 18 | |
61 | peter | 19 | 3) Watcom 1.6beta RC1 or later |
192 | daniel-mar | 20 | Available here: |
21 | http://www.openwatcom.org/ |
||
22 | After installing, do a reboot, or set the environment manually. |
||
60 | peter | 23 | |
24 | |||
193 | daniel-mar | 25 | Build setup |
26 | ----------- |
||
107 | dmarschall | 27 | |
193 | daniel-mar | 28 | There is no special build setup required. |
29 | Just open wpj\filterfoundry.wpj in Watcom's IDE and click "Make target". |
||
60 | peter | 30 | |
192 | daniel-mar | 31 | IMPORTANT: Your path must not contain whitespaces! |
32 | For example, you must not use "C:\Users\John Doe\SVN\Filter Foundry\". |
||
107 | dmarschall | 33 | |
60 | peter | 34 | |
192 | daniel-mar | 35 | Troubleshooting |
36 | --------------- |
||
107 | dmarschall | 37 | |
192 | daniel-mar | 38 | - Please make sure that you must not have whitespaces in the pathname. |
107 | dmarschall | 39 | |
204 | daniel-mar | 40 | - Missing **sdkddkver.h**: |
41 | * In OpenWatcom 1.9: |
||
42 | If you get the error message "Fatal Error! 62: Unable to open 'sdkddkver.h'", please open |
||
43 | pluginsdk\photoshopapi\photoshop\PITypes.h in your Adobe Photoshop SDK and |
||
44 | comment out the line "#include <sdkddkver.h> // for WINVER". |
||
45 | Alternatively, you can use an older version of the Photoshop SDK, or create an empty |
||
46 | sdkddkver.h file in your wpj folder. |
||
47 | * In Open Watcom 2.0: |
||
48 | The error message has the error code E062. |
||
49 | Creating an empty sdkddkver.h does not work anymore. |
||
50 | You need to comment out the line in PITypes.h. |
||
107 | dmarschall | 51 | |
52 | - It is important that the correct calling convention is used. |
||
53 | The calling convention needs to be set in |
||
54 | Options -> C Compiler Switches -> Memory Model and Processor Switches. |
||
55 | There, select "Pentium Pro stack-based calling" (default is "Pentium Pro register based calling"). |
||
56 | The wpj project should already have this setting applied. |
||
57 | |||
58 | - If you receive the error message "lex.yy.c(580): Error! E1009: Expecting ';' but found '1'", |
||
59 | check if the compiler directive "YY_SKIP_YYWRAP" is set. |
||
192 | daniel-mar | 60 | Go to Options -> C Compiler Switches -> Source switches, and add YY_SKIP_YYWRAP=1 . |
107 | dmarschall | 61 | The wpj project should already have this setting applied. |
62 | |||
192 | daniel-mar | 63 | - The path to the Photoshop SDK and to Win Flex/Bison (PreBuild event) |
64 | is already set in the project file. Please note that changing these |
||
65 | paths is a bit complicated. There are several bugs in OpenWatcom |
||
66 | where you can only make the pre-build-events shorter, but not longer). |
||
67 | You have to edit the WPJ file with a text editor. |
||
68 | Remember how many characters you have added or deleted, |
||
69 | and subtract or add them to the number written above the before-instructions |
||
70 | (currently 347). This is the number of bytes of the commands. |
||
107 | dmarschall | 71 | |
198 | daniel-mar | 72 | - In the code, it is important that all variables are declared at the |
73 | top of the scope (curly brackets) and that there is no executable code or |
||
74 | assignments in between. |
||
192 | daniel-mar | 75 | |
198 | daniel-mar | 76 | |
60 | peter | 77 | Remarks |
192 | daniel-mar | 78 | ------- |
60 | peter | 79 | |
192 | daniel-mar | 80 | flex and bison are currently invoked as a batch process. |
60 | peter | 81 | This is defined in the menu File->Before. |
192 | daniel-mar | 82 | The IDE fails to build the project when filenames contain more than one dot. |
61 | peter | 83 | Therefore the output files of bison and lex are renamed. |
60 | peter | 84 | There is no error checking done. |
85 | Probably it would be better to write a small wmake file for this purpose. |