]> git.saurik.com Git - wxWidgets.git/blame - docs/mgl/install.txt
Wise path to generic dialogs sources.
[wxWidgets.git] / docs / mgl / install.txt
CommitLineData
fc2171bd 1wxWidgets 2.5 for MGL installation
a502b34f
VS
2------------------------------------
3
4IMPORTANT NOTE:
5
6 If you experience problems installing, please re-read these
7 instructions and other related files (todo.txt, bugs.txt and
8 osname.txt for your platform if it exists) carefully before
9 mailing wxwin-users or the author. Preferably, try to fix the
10 problem first and then send a patch to the author.
11
fc2171bd 12 When sending bug reports tell us what version of wxWidgets you are
a502b34f 13 using (including the beta) and what compiler on what system. One
2a3476f2 14 example: wxMGL 2.5.3, gcc 2.95.3, Redhat 7.0
a502b34f
VS
15
16First steps
17-----------
18
19- Download SciTech MGL library (version 5.0) from http://www.scitechsoft.com.
2b5f62a0 20 The downloads page is here (you need MGL version 5.0beta7 or newer):
a0a26e43 21 http://www.scitechsoft.com/products/embedded/mgl_home.html
2b5f62a0
VZ
22
23 Install MGL according to provided instructions. In particular, make sure that
a502b34f
VS
24 MGL_ROOT and NUCLEUS_PATH environment variables are set before attempting to
25 build wxMGL.
26
2b5f62a0
VZ
27 Make sure you installed all MGL components, including the "fonts" package
28 (it's called mgl50b7-font.tar.gz in Linux version). It is important to have
29 SciTech's basic fonts in $(MGL_ROOT)/fonts directory (you may want to add
30 Arial TrueType font for better output quality) and basic cursors in
31 $(MGL_ROOT)/cursors. wxMGL depends on their presence.
32
a502b34f
VS
33- Download wxMGL-x.y.z.tgz, where x.y.z is the version number.
34 Download documentation in a preferred format, such as
fc2171bd 35 wxWidgets-HTML.zip or wxWidgets-PDF.zip.
a502b34f
VS
36
37- Make a directory such as ~/wx and unarchive the files into this
38 directory.
39
40- It is recommended that you install bison and flex; using yacc
41 and lex may require tweaking of the makefiles.
42
fc2171bd 43- You can now use configure or makefiles to build wxWidgets and the samples.
a502b34f
VS
44 In case of problems, please use GNU make.
45
46
47COMPILING
48=========
49
50Following systems are supported by wxMGL so far:
51 - Unix (Linux etc.)
52 - MS-DOS (DJGPP and Watcom compilers)
53
54
55* Compiling using configure
56----------------------------
57
58These instructions apply to installation on a Unix system (such as Linux). Please
59see bellow for information on using configure on non-Unix platforms.
60
fc2171bd 61If you compile wxWidgets on Linux for the first time and don't like to read
a502b34f
VS
62install instructions just do (in the base dir):
63
64> ./configure --with-mgl
65> make
66> su <type root password>
67> make install
68> ldconfig
69> exit
70
71Afterwards you can continue with
72
73> make
74> su <type root password>
75> make install
76> ldconfig
77> exit
78
fc2171bd 79If you want to remove wxWidgets on Unix you can do this:
a502b34f
VS
80
81> su <type root password>
82> make uninstall
83> ldconfig
84> exit
85
86You can set many options to configure. Type
87
88> ./configure --help
89
90and you will get a list of supported options.
91
92
93* Using wxMGL library built with configure
94-------------------------------------------
95
96'make install' will install wx-config script that can (and should) be used
97to get compiler flags that are needed to build your program. wx-config --cxxflags
2edb0bde 98will output necessary C++ compiler flags and wx-config --libs will list all
fc2171bd 99needed libraries. See an example of wxWidgets application makefile:
a502b34f
VS
100
101minimal: minimal.o
102 $(CC) -o minimal minimal.o `wx-config --libs`
103
104minimal.o: minimal.cpp mondrian.xpm
105 $(CC) `wx-config --cxxflags` -c minimal.cpp -o minimal.o
106
107
108* Using configure to build MS-DOS version
109------------------------------------------
110
111Even though configure is a Unix script, you can use it to build MS-DOS version
112of the wxMGL library. There are two possible ways to achieve this: you can
113either cross-compile from Unix or compile natively. Either way you will needed
114the DJGPP port of GCC compiler freely available from http://www.djgpp.org. You will
115also need DJGPP version of SciTech MGL (this must be built using native tools).
116
117Cross-compilation is very easy. It works like ordinary compilation with configure,
118you only have to specify the target:
119
120> ./configure --with-mgl --build=i586-linux --host=i586-pc-msdosdjgpp
121> make
122
123If you want to build wxMGL natively using DJGPP compiler, you will have to install
124a couple of Unix utilities. The easiest way to get them is to install the Cygwin
125package (available from RedHat, see http://freshmeat.net/search/?q=cygwin for exact
126URL). Cygwin contains win32 compiler, so make sure you did *not* install it! Once
127you have Cygwin utilities and DJGPP compiler in your PATH, run bash.exe and type
128
129> ./configure --with-mgl
130> make
131
fc2171bd 132in wxWidgets top directory. You can build wxMGL in MS-DOS with configure, sorry.
a502b34f
VS
133
134
135* Building wxMGL for MS-DOS using Watcom C/C++
136-----------------------------------------------
137
138You will need Watcom C/C++ compiler version 11 or newer (Watcom is going to be
139OpenSourced by SciTech, check out http://www.openwatcom.org).
140
1411. Edit $(WXDIR)\include\wx\univ\setup.h to suit your needs (in same way as you
142 do when compiling wxMSW).
143
1442. Go to $(WXDIR)\src\mgl and run
145 > wmake -f makefile.wat all
146
1473. You can compile the samples by typing 'wmake -f makefile.mgl all' in sample
148 directory if this file is available. If it is not, copy makefile.wat to
149 makefile.mgl and replace the line that says
150
151 !include $(WXDIR)\src\makeprog.wat
152
153 with
154
155 !include $(WXDIR)\src\mgl\makeprog.wat
156
157
158Bug reports
159-----------
160
161Please send bug reports with a description of your environment,
162compiler and the error message(s) to the wxwin-developers mailing list at:
163
164 wx-dev@lists.wxwindows.org
165
166Vaclav Slavik, Julian Smart, Robert Roebling and Vadim Zeitlin, February 2002.