source: trunk/third/wcl/README_BUILD @ 8837

Revision 8837, 12.6 KB checked in by ghudson, 28 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r8836, which included commits to RCS files with non-trunk default branches.
Line 
1SccsID: %Z% %M% %I% %E% %U%
2
3Widget Creation Library Version 2.5 Build Instructions
4-------------------------------------------------------
5
6
7SNI AP Build Instructions
8-------------------------
9
10Simply execute the SniAp_Indigo or SniAp_SVR4 scripts as a user
11with write permission to /CommonTools.  These scripts install the
12libraries and resource interpreters in /CommonTools and in the
13standard locations (/usr/bin and /usr/lib on SVR4, /usr/X11/bin and
14/usr/X11/lib on Indigo).
15
16
17
18Imakefiles and MakeByHand Makefiles
19-----------------------------------
20
21Both Imakefiles and hand-built (MakeByHand) Makefiles are provided.
22
23If imake works on your machine, then USE IT!  The hand-built makefiles
24work, but they are not any where near as convenient nor powerful.
25Imakefiles are a far better way to go.  Bitch to your system
26administrator and/or hardware/software vendor if imake does not work on
27your machine.
28
29If using Imake, all Wcl build and install paramters are pulled from a
30file named Wc.tmpl.  There are many comments.  You probably only need
31to edit the list of widgets, and the X release.
32
33If you don't have Imake, then you should use the MakeByHand files.
34MakeByHand is controlled by files named WcMake1.tmpl, WcMake2.tmpl,
35WcMakeC.tmpl, and WcMakeL.tmpl.  You should never have to edit the
36WcMakeC.tmpl or WcMakeL.tmpl files.  You probably can simply choose the
37WcMake1* and WcMake2* which is closest to your platform, and make
38symbolic links names WcMake1.tmpl and WcMake2.tmpl.
39
40There are scripts named makeSun, makeSVR4, and so on which you can use
41to make log files of the builds.  The file names are time stamps, which
42means they can collide if the make goes REALLY fast (sometimes between
43makeSun install and makeSun install.man).  You probably want to wait
44a minute between the makes so the names do not collide.
45
46        makeSun         BSD-ish system, including Sun and Indigo
47        makeSV          SVR3 or SVR4
48        makeSCO         SCO
49        makeSNISVR4     SNI SVR4
50
51There are three make targets you will probably use: World, install, and
52install.man.  Also, you can clean after installing.
53
54  -------------------------------------------------------------------------
55  |  NOTE: OpenLook is not based on R5, so you must use MakeByHand, and   |
56  |  not Imake, to build libWc, libXol, and Ori for OpenLook.  Wcl and    |
57  |  the resource interpreters are Xt Intrinsics version dependent.  If   |
58  |  you have different versions of libXt on your system, then you need   |
59  |  different versions of libWc on your system.   This IS supported!     |
60  -------------------------------------------------------------------------
61
62
63Using Imake with X11R5 or X11R4
64===============================
65
66
67Quick Example: Sun with X11R5 and Motif
68---------------------------------------
69        % xmkmf
70        % makeSun World
71        % setenv LD_LIBRARY_PATH ./Xmp:./Xp:./Wc:$LD_LIBRARY_PATH
72        % setenv PATH ./Ari:./Mri:$PATH
73        % Ari -rf Ari/Demo
74        % Mri -rf Mri/Demo
75
76
77The Real Scoop
78==============
79
80The Wc.tmpl file is used to provide all imake parameters which are
81important to building Wcl.  All you should ever need to do is change
82the X11 release you have (about line 38) and the sets of widgets you
83have (about line 52).
84
85        % vi Wc.tmpl
86        <change lines 38 and 52>
87
88        NOTE: Even if you have R5, you probably do NOT have an R5
89        compatible version of libXol.  Therefore, you very likely
90        must leave HaveOpenLookWidgetSet set to NO.  More to come...
91
92To build, do this (substitute makeSun with the appropriate make logging
93script, or just use make):
94
95        % xmkmf
96        % makeSun World
97
98Now test the distribution.  On SunOS and SVR4 machines, you need to
99be certain you are using the newly built local libraries:
100
101        % setenv LD_LIBRARY_PATH ./Xmp:./Xp:./Wc:$LD_LIBRARY_PATH
102                -or-
103        % LD_LIBRARY_PATH=./Xmp:./Xp:./Wc:$LD_LIBRARY_PATH
104        % export LD_LIBRARY_PATH
105
106Change the path, as the Demos will spawn more instances of Ari and/or
107Mri, and start the resource interpreter demos for one or both of
108Athena and Motif widget sets (whichever you have).
109
110        % setenv PATH ./Ari:./Mri:$PATH
111                -or-
112        % PATH=./Ari:./Mri:$PATH
113
114        % Ari -rf Ari/Demo
115        % Mri -rf Mri/Demo
116
117On R5, all the demos should work.  The demo interfaces may suggest that
118there are problems with certain versions of Motif.  Also, the Template and
119PerTem demos for Mri will NOT work correctly unless you have X11R5 patch
120level 16 or later.
121
122If anything seems strange, you can test the distribution in more detail
123by compiling the Mri/Test program and using the Wc* resource files in
124the Mri subdirectory.  By default, debug versions of the Wcl libraries
125are built, and if you have Mri, then Mri/Test is built.  Assuming you
126have Motif, you can do this:
127
128        % cd Mri
129        % dbx Test
130        dbx> run -rf WcAll
131
132There are targets useful for Saber-C (codecenter or objectcenter)
133in the Makefile.  You can do this in objectcenter:
134
135        % xobjectcenter&
136        C++> make Saber
137        C> run -rf WcAll
138
139If everything works OK, then you can install.  You probably need to be
140superuser to install.
141
142        % su
143        Password:
144        # ./makeSun install
145        # ./makeSun install.man
146
147
148Sun with OpenWindows
149--------------------
150
151No imake with openwin for some reason, but the MakeByHand system works
152well.  You should be able to use WcMake1.sun and WcMake2.sun without
153any edits to create an OpenLook specific version of Wcl, and to create
154Ori.
155
156  NOTE: if you have X11R5 and OW, you MUST NOT create Ari by editing
157  WcMake1.tmpl and uncommenting the WcATHENA define.  You MUST create
158  Ari using imake and R5.  This means you need to make and install both
159  an R5 version of Wcl for R5 Athena, AND an openwindows version of
160  Wcl for Ori.
161
162        % ln -s WcMake1.sun WcMake1.tmpl
163        % ln -s WcMake2.sun WcMake2.tmpl
164        % makeSun -f MakeByHand World
165
166You can test the Ori open look resource interpreter like this:
167
168        % setenv LD_LIBRARY_PATH ./Xop:./Wc:/usr/openwin/lib:$LD_LIBRARY_PATH
169        % setenv PATH ./Ori:$PATH
170        % Ori/Ori -rf Ori/Demo
171
172NOTE: The Ori/ScrollingListDemo does not work, I am hoping that someone
173will fix it, so I have left it in the distribution.  With some of the
174Ori examples you might get warnings "OPEN LOOK Toolkit Warning in
175application "Ori": Invalid XtNlabelJustify value: Using OL_LEFT as
176default." which I suppose you can ignore.  This message simply points
177out the limitations of some of the Xol string-to-resource converters
178which will probably be improved over time.
179
180If all the demos work OK otherwise, then install.  By default,
181WcMake1.tmpl installs into /usr/openwin.  Edit the lines about 37 to
182install where you like.  You probably need to be root to install.
183
184        % su
185        Password:
186        # ./makeSun -f MakeByHand install
187        # ./makeSun -f MakeByHand install.man
188
189
190
191IRIX SVR3 with X11R4 and Motif 1.1.3
192-----------------------------------
193        % xmkmf
194        % makeSun World
195
196Test the distribution.  Ari for Athena and Mro for Motif should
197have been built:
198
199        % setenv PATH ./Ari:./Mri:$PATH
200        % Ari -rf Ari/Demo
201        % Mri -rf Mri/Demo
202
203Everything should work except the PerTem and Template demos in
204Mri, since these both require X11R5.
205
206If everything seems to work, then install.  If you have a previous
207version of Wcl on your SGI machine, first remove the include
208directories.  You may also need to make /usr/man/mann for the man
209pages.
210
211        % su
212        Password:
213        # rm -rf /usr/include/X11/Wc
214        # rm -rf /usr/include/X11/Xmp
215        # rm -rf /usr/include/X11/Xp
216        # ./makeSun install
217
218<wait a minute so the log file names created by makeSun do not collide>
219
220        # mkdir /usr/man/mann
221        # chmod ugo+rx /usr/man/mann
222        # ./makeSun install.man
223
224
225SNI SVR4 with X11R5 and Motif
226-----------------------------
227        % xmkmf
228        % makeSNISVR4 World
229        % LD_LIBRARY_PATH=./Xmp:./Xp:./Wc:$LD_LIBRARY_PATH
230        % export LD_LIBRARY_PATH
231        % PATH=./Mri:./Ari:$PATH
232        % export PATH
233        % Ari -rf Ari/Demo
234        % Mri -rf Mri/Demo
235        % su
236        Password:
237        # ./makeSNISVR4 install
238        # ./makeSNISVR4 install.man
239
240
241SVR4 with X11R4 and Motif - static libraries
242--------------------------------------------
243        % ln -s WcMake1.svr4-a WcMake1.tmpl
244        % ln -s WcMake2.svr4-a WcMake2.tmpl
245        <edit WcMake1.tmpl line 24 if you do have Athena widgets>
246        % makeSV -f MakeByHand World
247        % PATH=./Mri:./Ari:$PATH
248        % export PATH
249        % Ari -rf Ari/Demo
250        % Mri -rf Mri/Demo
251        % su
252        Password:
253        # ./makeSV -f MakeByHand install
254        # ./makeSV -f MakeByHand install.man
255
256
257
258SVR4 with X11R4 and Motif - shared libraries
259--------------------------------------------
260
261        % ln -s WcMake1.svr4 WcMake1.tmpl
262        % ln -s WcMake2.svr4 WcMake2.tmpl
263        <edit WcMake1.tmpl line 24 if you do have Athena widgets>
264        % makeSV -f MakeByHand World
265        % LD_LIBRARY_PATH=./Xmp:./Xp:./Wc:$LD_LIBRARY_PATH
266        % export LD_LIBRARY_PATH
267        % PATH=./Mri:./Ari:$PATH
268        % export PATH
269        % Ari -rf Ari/Demo
270        % Mri -rf Mri/Demo
271        % su
272        Password:
273        # ./makeSV -f MakeByHand install
274        # ./makeSV -f MakeByHand install.man
275
276
277
278SCO ODT SVR3 with Motif 1.0
279---------------------------
280
281Sorry, but this is not very well supported.  You will need to edit
2826 of the resource files in the Mri sub-directory, un-commenting
283the resource specification line or lines following the comment lines:
284
285        ! for old Motif 1.0
286
287The files you must edit are Mri/Dialogs, Mri/Goodbye, Mri/Menubar,
288Mri/Periodic, Mri/Wc, and Mri/WcAll.  It will only take a moment...
289
290Then, build as follows:
291
292        % mv WcMake1.sco WcMake1.tmpl
293        % mv WcMake2.sco WcMake2.tmpl
294        % makeSCO -f MakeByHand World
295        % PATH=./Mri:./Ari:$PATH
296        % export PATH
297        % Mri -rf Mri/Demo
298        % su
299        Password:
300        # ./makeSCO -f MakeByHand install
301        # ./makeSCO -f MakeByHand install.man
302
303
304Interactive 3.0.1
305-----------------
306
307This is supported only because someone (J.J.Bailey,
308jjb@jagware.acco.com) sent me the WcMake1 and WcMake2 files for ISC.  I
309cannot test this, but you should be able to build as follows:
310
311        % rm WcMake1.tmpl WcMake2.tmpl
312        % ln -s WcMake1.isc WcMake1.tmpl
313        % ln -s WcMake2.isc WcMake2.tmpl
314        % makeSCO -f MakeByHand World
315        % PATH=./Mri:./Ari:$PATH
316        % export PATH
317        % Mri -rf Mri/Demo
318        % su
319        Password:
320        # ./makeSCO -f MakeByHand install
321        # ./makeSCO -f MakeByHand install.man
322
323AIX
324---
325
326Fairly smooth.  I've only got one AIX machine...
327
328        % rm WcMake1.tmpl WcMake2.tmpl
329        % ln -s WcMake1.aix WcMake1.tmpl
330        % ln -s WcMake2.aix WcMake2.tmpl
331        % makeSV -f MakeByHand World
332        % PATH=./Mri:$PATH
333        % export PATH
334        % Mri -rf Mri/Demo
335        % su
336        Password:
337        # ./makeSV -f MakeByHand install
338        # ./makeSV -f MakeByHand install.man
339
340
341       
342ESIX
343----
344
345The Imake system has some problems on some ESIX platforms.  First,
346try imake.  If you have problems, look at the file ESIX for suggested
347fixes to the Makefiles generated by the ESIX imake.
348
349
350POTENTIAL PROBLEMS
351------------------
352
353If using SunOS 4.1.2 and X11R4 (fixes 1-18), then you may have
354a problem linking Ari:
355
356        ld: Undefined symbol
357        _get_wmShellWidgetClass
358        _get_applicationShellWidgetClass
359
360A solution is to statically link libXmu.a, for example, add:
361
362        XMULIB = /usr/lib/libXmu.a
363
364to your Wc.tmpl.
365
366If you get an undefined symbol error for XtSetDefaultFilePredicate,
367then you somehow have -DXTRACEFILEHACKS passed to cc, and you don't
368have a specially hacked Xt.  Remove this flag.
369
370If you get undefined symbol errors for __XtFree, __XtMalloc, __XtCalloc
371then you somehow have -DXTTRACEMEMORY passed to cc, and you don't have
372a specially built Xt.  Note that if you have -DXTTRACEMEMORY set when
373you build Xt, you really should build all libraries on top of Xt
374(widget libraries, Wcl, the client) also using -DXTTRACEMEMORY.  Hardly
375anyone does this, but I think it is worthwhile for debugging.
376
377You never NEED to build the Stuff directory (it is never installed).
378The Mri/Test resource files can make use of the Stuff library for
379testing dynamic linking of callbacks.  Comment out the references to
380Stuff at about line 289 in Wc.tmpl and about line 72 in WcMake1.tmpl
381to disable doing anything with Stuff.
382
383
384
385
386Passing Wcl on to others
387------------------------
388
389As mentioned in the Wcl copyright (see the COPY.h include file) the entire
390Wcl distribution can be given to others.  In order to make this easy, the
391hand-built Makefile has targets for making compressed tarfiles:
392
393        % make -f MakeByHand tar.Z
394
395   _____________________________________________________________________
396  |  David E. Smyth                         David.E.Smyth@jpl.nasa.gov  |_
397  |_____________________________________________________________________| |
398  |  Project: Mars Pathfinder -- Low Cost Lander with "Rocky IV" Rover  | |
399  |  Team:    Flight Software -- Object-Oriented Software for Mars      | |
400  |_____________________________________________________________________| |
401  |  Voice:    (818) 393-7944                                           | |
402  |  FAX:      (818) 393-0530                                           | |
403  |  Office:   Space Flight Operations Facility 230/207a                | |
404  |  Snail:    JPL, MS 230-200, 4800 Oak Grove Dr., Pasadena, CA 91109  | |
405  |_____________________________________________________________________| |
406    |_____________________________________________________________________|
Note: See TracBrowser for help on using the repository browser.