]> git.saurik.com Git - wxWidgets.git/blob - docs/motif/install.txt
wxProcess-related code now works
[wxWidgets.git] / docs / motif / install.txt
1 wxWindows 2.0 for Motif installation
2 ------------------------------------
3
4 - Prerequisites: Motif 1.2 or above, or Lesstif
5 (not yet tested). Motif 2.0 and above may also be suitable.
6
7 - Download the files wx200gen.zip and wx200mot.zip, and
8 documentation in a preferred format, such as wx200htm.zip
9 or wx200pdf.zip.
10
11 - Make a directory such as ~/wx and unzip the files into this
12 directory. Use the -a option if available to convert the ASCII
13 files to Unix format. Don't worry about files being
14 overwritten: they should be identical anyway.
15
16 (See http://www.cdrom.com/pub/infozip/ if you don't have zip/unzip
17 already installed. Zip isn't the same as gzip!)
18
19 - It is recommended that you install bison and flex; using yacc
20 and lex may require tweaking of the makefiles. You also need
21 Xpm (see comments in the Notes section below).
22
23 - You now have the option of using the configure-based system,
24 or the simple makefile system. Configure is more hard to debug
25 if things go wrong, but may be easier to use if they go OK :-)
26 Makefiles are easier to tweak.
27
28 COMPILING USING CONFIGURE
29 =========================
30
31 - You can use the wxGTK configure system to make wxMotif, or
32 you can follow the following steps to use the simpler (but
33 less automatic) makefile system. If using configure, the
34 following script should make the library and samples, when
35 run from the top-level wxWindows directory (see also 'makewxmotif'
36 in this directory). Make this script executable with the command
37 chmod a+x makewxmotif.
38
39 -------:x-----Cut here-----:x-----
40 # makewxmotif
41 # Sets permissions (in case we extracted wxMotif from zip files)
42 # and makes wxMotif.
43 # Call from top-level wxWindows directory.
44 # Note that this uses standard (but commonly-used) configure options;
45 # if you're feeling brave, you may wish to compile with threads.
46 # -- Julian Smart
47 chmod a+x configure config.sub config.guess setup/general/* setup/shared/*
48 ./configure --with-shared --with-motif --without-gtk --with-debug_flag --with-debug_info --without-threads
49 make makefiles
50 make
51 -------:x-----Cut here-----:x-----
52
53 This script will build wxMotif using shared libraries.
54
55 - Change directory to a sample e.g. samples/minimal, and type make.
56 The binary will end up under the Linux (or other appropriate) subdirectory.
57
58 - To build an application outside the wxWindows hierarchy, you can
59 use `wx-config --cflags` when compiling source files and `wx-config --libs`
60 when linking, where wx-config is in the wxWindows root directory.
61 These invocations return the appropriate flags for the compiler.
62
63 - When compiling certain utilities such as Dialog Editor, you may find
64 that the makefile refers to wx-config as above. Unless you have used
65 "make install" to install wxWindows, wx-config won't be found, so
66 either edit the makefile to hard-wire the flags, or place wx-config
67 where it will be found by the makefile.
68
69 COMPILING USING MAKEFILES
70 =========================
71
72 - Choose a .env file from src/makeenvs that matches your
73 environment, and copy it to src/make.env. These are the
74 settings read by wxWindows for Motif makefiles.
75
76 - Edit src/make.env to change options according to your local
77 environment. In particular, change WXDIR to where wxWindows is
78 found on your system, or set the WXWIN environment variable
79 before compilation, e.g.:
80
81 export WXWIN=/home/jacs/wx2
82
83 Please feel free to contribute settings files for your environment.
84
85 - Change directory to src/motif and type:
86
87 make -f makefile.unx motif
88
89 This should make the library libwx_motif.a in the lib
90 directory. Note that this makefile system does not build shared
91 libraries, only static ones (that is, the wxWindows library will be
92 linked statically; to see remaining dependencies on shared libraries,
93 type e.g. ldd minimal_motif).
94
95 - Make a sample, such as the minimal sample:
96
97 cd samples/minimal
98 make -f makefile.unx motif
99
100 and run the resulting minimal_motif binary.
101
102 Notes:
103 ------
104
105 - Better installation and makefile systems are
106 required. A revised configure system is in preparation.
107
108 - Debugging mode is switched on by default. To compile in non-debug
109 mode, remove the -D__WXDEBUG__ switch in make.env (or if using the
110 configure system, change --with-debug_flag to --without_debug_flag
111 and --with-debug_info to --without-debug_info in the makewxmotif
112 script).
113
114 - Some classes can be switched off in include/wx/motif/setup.h,
115 if you are having trouble with a particular file. However,
116 I'd prefer you to fix the problem and send the fix to me :-) or at
117 least let me know about it.
118
119 - Thread support is switched off by default in setup.h (wxUSE_THREADS)
120 because standard Unices often do not have the necessary thread library
121 installed. Please see ../docs/gtk/install.txt for more details on this.
122 For Linux, the problem is expected to go away with future
123 distributions of the operating system.
124
125 - If you have trouble compiling the file y_tab.c, or have strange
126 linking errors, check whether you're using a C or C++ compiler for this file.
127 You should specify a C compiler in the CCLEX variable in src/make.env.
128
129 - If you run into problems with a missing X11/Xpm.h header, you
130 need to install the XPM package. It can be obtained from:
131
132 ftp://ftp.x.org/contrib/libraries/xpm-3.4k.tar.gz
133 http://sunfreeware.com
134
135 You may need to modify make.env to add -I and -L options pointing to where Xpm
136 is installed and possibly change bitmap.cpp to
137 include <xpm.h> instead of <X11/xpm.h>
138
139 Alternatively, edit include/motif/setup.h, set wxUSE_XPM
140 to 0, and recompile. You will not be able to load any XPMs,
141 though (currently the only supported colour bitmap format).
142
143 - Please send bug reports with a description of your environment,
144 compiler and the error message(s) to the wxwin-users mailing list at:
145
146 wxwin-users@wx.dent.med.uni-muenchen.de
147
148
149 Julian Smart, January 1999.
150 julian.smart@ukonline.co.uk