Subversion Repositories filter_foundry

Rev

Rev 404 | Rev 440 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 404 Rev 437
Line 1... Line 1...
1
 
1
 
2
Building FilterFoundry with OpenWatcom
2
Building FilterFoundry with OpenWatcom
3
======================================
3
======================================
4
 
4
 
5
Most recently tested with OpenWatcom 1.9 and Adobe Photoshop SDK 2021.
5
Tested with OpenWatcom 1.9 and OpenWatcom 2.0 together with Adobe Photoshop SDK 2021.
6
 
6
 
7
 
7
 
8
Prerequisites
8
Prerequisites
9
-------------
9
-------------
10
 
10
 
Line 24... Line 24...
24
 
24
 
25
Build setup
25
Build setup
26
-----------
26
-----------
27
 
27
 
28
There is no special build setup required.
28
There is no special build setup required.
29
Just open wpj\filterfoundry.wpj in Watcom's IDE and click "Make target".
29
Just open **wpj\filterfoundry.wpj** in Watcom's IDE and click "Make target".
-
 
30
 
-
 
31
Alternatively, run **wpj\make_watcom.bat** which should do the same.
30
 
32
 
31
IMPORTANT: Your path must not contain whitespaces!
33
IMPORTANT: Your path must not contain whitespaces!
32
For example, you must not use "C:\Users\John Doe\SVN\Filter Foundry\".
34
For example, you must not use "C:\Users\John Doe\SVN\Filter Foundry\".
33
 
35
 
34
 
36
 
Line 45... Line 47...
45
    Alternatively, you can create an empty sdkddkver.h file in your wpj folder.
47
    Alternatively, you can create an empty sdkddkver.h file in your wpj folder.
46
  * In Open Watcom 2.0:
48
  * In Open Watcom 2.0:
47
    The error message has the error code E062.
49
    The error message has the error code E062.
48
    Creating an empty sdkddkver.h does not work anymore.
50
    Creating an empty sdkddkver.h does not work anymore.
49
    You need to comment out the line in PITypes.h.
51
    You need to comment out the line in PITypes.h.
-
 
52
    (Bug will be fixed: https://github.com/open-watcom/open-watcom-v2/issues/770 )
50
 
53
 
51
- It is important that the correct calling convention is used.
54
- It is important that the correct calling convention is used.
52
  The calling convention needs to be set in
55
  The calling convention needs to be set in
53
  Options -> C Compiler Switches -> Memory Model and Processor Switches.
56
  Options -> C Compiler Switches -> Memory Model and Processor Switches.
54
  There, select "Pentium Pro stack-based calling" (default is "Pentium Pro register based calling").
57
  There, select "Pentium Pro stack-based calling" (default is "Pentium Pro register based calling").
Line 59... Line 62...
59
  Go to Options -> C Compiler Switches -> Source switches, and add YY_SKIP_YYWRAP=1 .
62
  Go to Options -> C Compiler Switches -> Source switches, and add YY_SKIP_YYWRAP=1 .
60
  The wpj project should already have this setting applied.
63
  The wpj project should already have this setting applied.
61
 
64
 
62
- The path to the Photoshop SDK and to Win Flex/Bison (PreBuild event)
65
- The path to the Photoshop SDK and to Win Flex/Bison (PreBuild event)
63
  is already set in the project file. Please note that changing these
66
  is already set in the project file. Please note that changing these
64
  paths is a bit complicated. There are several bugs in OpenWatcom
67
  paths is a bit complicated. There are several bugs in older versions of OpenWatcom
65
  where you can only make the pre-build-events shorter, but not longer).
68
  where you can only make the pre-build-events shorter, but not longer).
66
  You have to edit the WPJ file with a text editor.
69
  You have to edit the WPJ file with a text editor.
67
  Remember how many characters you have added or deleted,
70
  Remember how many characters you have added or deleted,
68
  and subtract or add them to the number written above the before-instructions
71
  and subtract or add them to the number written above the before-instructions.
69
  (currently 367). This is the number of bytes of the commands.
72
  This is the number of bytes of the commands.
70
 
73
 
71
- In the code, it is important that all variables are declared at the
74
- In the code, it is important that all variables are declared at the
72
  top of the scope (curly brackets) and that there is no executable code or
75
  top of the scope (curly brackets) and that there is no executable code or
73
  assignments in between.
76
  assignments in between.
74
 
77
 
-
 
78
Wrong:
-
 
79
 
-
 
80
    int a;
-
 
81
    int b = GetXYZ();
-
 
82
    int c;
-
 
83
 
-
 
84
Correct:
-
 
85
 
-
 
86
    int a;
-
 
87
    int b;
-
 
88
    int c;
-
 
89
    b = GetXYZ();
-
 
90
 
75
 
91
 
76
Attention! Some optimizations break the code
92
Attention! Some optimizations break the code
77
--------------------------------------------
93
--------------------------------------------
78
 
94
 
79
Don't choose "Fastest possible code (-otexan)" for optimization!
95
Don't choose "Fastest possible code (-otexan)" for optimization!