]> git.saurik.com Git - wxWidgets.git/blame - docs/mgl/install.txt
extracted the part of ProcessEvent() which is repeated multiple times during the...
[wxWidgets.git] / docs / mgl / install.txt
CommitLineData
f5ce6d56
MW
1wxWidgets for MGL installation
2------------------------------
a502b34f
VS
3
4IMPORTANT NOTE:
5
f5ce6d56
MW
6 wxMGL is currently in need of some work to bring it up to the
7 standard of some of the other wxWidgets ports.
8
a502b34f
VS
9 If you experience problems installing, please re-read these
10 instructions and other related files (todo.txt, bugs.txt and
11 osname.txt for your platform if it exists) carefully before
12 mailing wxwin-users or the author. Preferably, try to fix the
13 problem first and then send a patch to the author.
6330f4bb
MW
14
15 When sending bug reports tell us what version of wxWidgets you are
16 using (including the beta) and what compiler on what system. One
b45ab290 17 example: wxMGL 2.8.0, gcc 2.95.3, Redhat 7.0
a502b34f
VS
18
19First steps
20-----------
21
6330f4bb
MW
22- Download SciTech MGL library from http://www.scitechsoft.com. The
23 downloads page is here (you need MGL version 5.0beta7 or newer):
3877be21 24 http://scitechsoft.com/products/dev/mgl_download/mgl_down.html
6330f4bb 25
2b5f62a0 26 Install MGL according to provided instructions. In particular, make sure that
a502b34f
VS
27 MGL_ROOT and NUCLEUS_PATH environment variables are set before attempting to
28 build wxMGL.
29
2b5f62a0 30 Make sure you installed all MGL components, including the "fonts" package
6330f4bb 31 (it's called mgl_<ver>-font.tar.gz in Linux version). It is important to have
2b5f62a0 32 SciTech's basic fonts in $(MGL_ROOT)/fonts directory (you may want to add
6330f4bb 33 Arial TrueType font for better output quality) and basic cursors in
2b5f62a0
VZ
34 $(MGL_ROOT)/cursors. wxMGL depends on their presence.
35
a502b34f
VS
36- Download wxMGL-x.y.z.tgz, where x.y.z is the version number.
37 Download documentation in a preferred format, such as
fc2171bd 38 wxWidgets-HTML.zip or wxWidgets-PDF.zip.
a502b34f
VS
39
40- Make a directory such as ~/wx and unarchive the files into this
41 directory.
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
6330f4bb 59see below for information on using configure on non-Unix platforms.
a502b34f 60
6330f4bb 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
86e778e2
MW
114the DJGPP port of GCC compiler freely available from:
115 http://www.delorie.com/djgpp/getting.html
116
117Scitech MGL must be compiled natively, and to do this you will need to download
118the following files (from the current/v2 and current/v2gnu directories). You
119should get the latest versions available rather than the exact versions shown
120below, they are just an example of what to look for:
121
122djdev203.zip B 1,530,778 020811 DJGPP development kit 2.03
123bnu2161b.zip B 3,483,132 050708 GNU Binutils 2.16.1 for DJGPP V2
124gcc344b.zip B 3,772,211 050527 GNU GCC 3.4.4 for DJGPP V2
125gpp344b.zip B 4,026,725 050527 GNU C++ Compiler 3.4.4 for DJGPP V2
126
127If you want to build wxMGL natively using the DJGPP compiler, you will have to
128install a couple of Unix utilities. I think the following is the minimum that
129will work:
130
131bsh204b.zip B 454,308 020106 GNU Bash shell 2.04 for DJGPP V2
132fil41b.zip B 1,738,170 030830 GNU fileutils 4.1 for DJGPP V2
133find41b.zip B 306,826 010505 GNU findutils 4.1 for DJGPP V2
134grep24b.zip B 254,997 000116 GNU Grep 2.4 for DJGPP V2
135mak3791b.zip B 272,798 020106 GNU Make 3.79.1 for DJGPP V2
136sed414b.zip B 159,920 050331 GNU Sed 4.1.4 for DJGPP V2
137shl2011b.zip B 1,195,021 020419 GNU sh-utils 2.01 for DJGPP V2
138
139You'll probably also want a debugger:
140gdb611b.zip B 1,585,648 040629 GNU GDB Debugger 6.1.1 for DJGPP V2
141
142And maybe some of these:
143faq230b.zip B 679,865 000203 FAQ 2.30 for DJGPP v2.03
144dif281b.zip B 402,859 040911 GNU Diffutils 2.8.1 for DJGPP V2
145gwk314b.zip B 968,667 050321 GNU Awk 3.1.4 for DJGPP V2
146gzip135b.zip B 146,138 041215 GNU gzip 1.3.5 for DJGPP V2
147lss374b.zip B 199,805 020405 GNU Less 374 for DJGPP V2
148pat254b.zip B 114,250 040326 GNU Patch 2.5.4 for DJGPP V2
149tar112ab.zip B 236,427 000305 GNU Tar 1.12a for DJGPP V2
150whic211b.zip B 86,296 000911 GNU which 2.11 for DJGPP V2
151
152The system you compile on must support long file names. You can use Windows 9x
6330f4bb 153or an x86 version of Windows 2000/XP or later. For example:
86e778e2
MW
154
155C:\>set MGL_ROOT=c:/scitech
156C:\>set DJGPP=c:/djgpp/djgpp.env
157C:\>PATH=c:\djgpp\bin
158C:\>set PS1=\w\$
159C:\>bash
160c:/$ mkdir build
161c:/$ cd build
162c:/build$ ../wxWidgets/configure
163c:/build$ make
164c:/build$ cd samples/minimal
165c:/build/samples/minimal$ make
166
167Cross-compilation is very easy. It works like ordinary compilation with
168configure, you only have to specify the target:
a502b34f
VS
169
170> ./configure --with-mgl --build=i586-linux --host=i586-pc-msdosdjgpp
171> make
172
f5ce6d56
MW
173For this to work, you must have installed a cross compiler on your system.
174
175Linux rpms are available here:
176 http://ap1.pp.fi/djgpp/gcc/cross-compiler/index.html
a502b34f 177
f5ce6d56 178NetBSD has a binary package which can be installed with:
86e778e2 179 # pkg_add cross-i386-msdosdjgpp
a502b34f 180
f5ce6d56
MW
181For other systems you will need to obtain the djgpp sources and compile them
182yourself.
a502b34f
VS
183
184
185* Building wxMGL for MS-DOS using Watcom C/C++
186-----------------------------------------------
187
6330f4bb
MW
188<Note: this section is currently out of date>
189
190You will need Watcom C/C++ compiler version 11 or newer (Watcom is going to be
a502b34f
VS
191OpenSourced by SciTech, check out http://www.openwatcom.org).
192
1931. Edit $(WXDIR)\include\wx\univ\setup.h to suit your needs (in same way as you
194 do when compiling wxMSW).
195
1962. Go to $(WXDIR)\src\mgl and run
197 > wmake -f makefile.wat all
198
1993. You can compile the samples by typing 'wmake -f makefile.mgl all' in sample
6330f4bb 200 directory if this file is available. If it is not, copy makefile.wat to
a502b34f
VS
201 makefile.mgl and replace the line that says
202
203 !include $(WXDIR)\src\makeprog.wat
204
205 with
206
207 !include $(WXDIR)\src\mgl\makeprog.wat
208
209
f5ce6d56
MW
210Compilation notes for MGL with gcc
211----------------------------------
3877be21
MW
212
213The mvis library doesn't compile with current versions of gcc. However wxMGL
214does not use this part of MGL, so it can be taken out of the compile, e.g.:
215
216--- scitech/src/makefile.orig 2004-04-15 20:36:32.000000000 +0100
217+++ scitech/src/makefile 2005-04-26 01:50:12.000000000 +0100
218@@ -88,7 +88,7 @@
6330f4bb 219
3877be21 220 # Target to build libraries for one compiler for SciTech MGL Graphics Library
6330f4bb 221
3877be21
MW
222-all_mgl: $(T_PM) $(T_GCONSOLE) $(T_SNAP) $(T_TECH) $(T_MVIS) $(T_FIXED) \
223+all_mgl: $(T_PM) $(T_GCONSOLE) $(T_SNAP) $(T_TECH) $(T_FIXED) \
224 $(T_GM) $(T_GLUT) $(T_MGL)
225 @$(ECHO) =============================================================================
226 @$(ECHO) DONE: Single compiler MGL build completed successfully!
227
6330f4bb
MW
228The following small change is also required to include/tcl/hashmap.hpp:
229
230--- scitech/include/tcl/hashtab.hpp.orig 2006-01-20 19:51:12.000000000 +0000
231+++ scitech/include/tcl/hashtab.hpp 2006-01-22 14:12:12.000000000 +0000
232@@ -60,7 +60,7 @@
233 TCHashTableNode **prev;
234
235 friend class TCGenHashTable;
236- friend ostream& operator << (ostream& o,TCGenHashTable& h);
237+ friend ostream& operator << (ostream& o, class TCGenHashTable& h);
238 public:
239 // Constructor to satisfy some compilers :-(
240 TCHashTableNode() {};
241
3877be21 242
a502b34f
VS
243Bug reports
244-----------
245
246Please send bug reports with a description of your environment,
247compiler and the error message(s) to the wxwin-developers mailing list at:
248
249 wx-dev@lists.wxwindows.org
250
251Vaclav Slavik, Julian Smart, Robert Roebling and Vadim Zeitlin, February 2002.
6330f4bb 252Mike Wetherell 2005/2006