1 wxWidgets 2.6.2 for MGL installation
2 ------------------------------------
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.
12 When sending bug reports tell us what version of wxWidgets you are
13 using (including the beta) and what compiler on what system. One
14 example: wxMGL 2.6.2, gcc 2.95.3, Redhat 7.0
19 - Download SciTech MGL library (version 5.0) from http://www.scitechsoft.com.
20 The downloads page is here (you need MGL version 5.0beta7 or newer):
21 http://scitechsoft.com/products/dev/mgl_download/mgl_down.html
23 Install MGL according to provided instructions. In particular, make sure that
24 MGL_ROOT and NUCLEUS_PATH environment variables are set before attempting to
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.
33 - Download wxMGL-x.y.z.tgz, where x.y.z is the version number.
34 Download documentation in a preferred format, such as
35 wxWidgets-HTML.zip or wxWidgets-PDF.zip.
37 - Make a directory such as ~/wx and unarchive the files into this
40 - It is recommended that you install bison and flex; using yacc
41 and lex may require tweaking of the makefiles.
43 - You can now use configure or makefiles to build wxWidgets and the samples.
44 In case of problems, please use GNU make.
50 Following systems are supported by wxMGL so far:
52 - MS-DOS (DJGPP and Watcom compilers)
55 * Compiling using configure
56 ----------------------------
58 These instructions apply to installation on a Unix system (such as Linux). Please
59 see bellow for information on using configure on non-Unix platforms.
61 If you compile wxWidgets on Linux for the first time and don't like to read
62 install instructions just do (in the base dir):
64 > ./configure --with-mgl
66 > su <type root password>
71 Afterwards you can continue with
74 > su <type root password>
79 If you want to remove wxWidgets on Unix you can do this:
81 > su <type root password>
86 You can set many options to configure. Type
90 and you will get a list of supported options.
93 * Using wxMGL library built with configure
94 -------------------------------------------
96 'make install' will install wx-config script that can (and should) be used
97 to get compiler flags that are needed to build your program. wx-config --cxxflags
98 will output necessary C++ compiler flags and wx-config --libs will list all
99 needed libraries. See an example of wxWidgets application makefile:
102 $(CC) -o minimal minimal.o `wx-config --libs`
104 minimal.o: minimal.cpp mondrian.xpm
105 $(CC) `wx-config --cxxflags` -c minimal.cpp -o minimal.o
108 * Using configure to build MS-DOS version
109 ------------------------------------------
111 Even though configure is a Unix script, you can use it to build MS-DOS version
112 of the wxMGL library. There are two possible ways to achieve this: you can
113 either cross-compile from Unix or compile natively. Either way you will needed
114 the DJGPP port of GCC compiler freely available from http://www.djgpp.org. You will
115 also need DJGPP version of SciTech MGL (this must be built using native tools).
117 Cross-compilation is very easy. It works like ordinary compilation with configure,
118 you only have to specify the target:
120 > ./configure --with-mgl --build=i586-linux --host=i586-pc-msdosdjgpp
123 If you want to build wxMGL natively using DJGPP compiler, you will have to install
124 a couple of Unix utilities. The easiest way to get them is to install the Cygwin
125 package (available from RedHat, see http://freshmeat.net/search/?q=cygwin for exact
126 URL). Cygwin contains win32 compiler, so make sure you did *not* install it! Once
127 you have Cygwin utilities and DJGPP compiler in your PATH, run bash.exe and type
129 > ./configure --with-mgl
132 in wxWidgets top directory. You can build wxMGL in MS-DOS with configure, sorry.
135 * Building wxMGL for MS-DOS using Watcom C/C++
136 -----------------------------------------------
138 You will need Watcom C/C++ compiler version 11 or newer (Watcom is going to be
139 OpenSourced by SciTech, check out http://www.openwatcom.org).
141 1. Edit $(WXDIR)\include\wx\univ\setup.h to suit your needs (in same way as you
142 do when compiling wxMSW).
144 2. Go to $(WXDIR)\src\mgl and run
145 > wmake -f makefile.wat all
147 3. 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
151 !include $(WXDIR)\src\makeprog.wat
155 !include $(WXDIR)\src\mgl\makeprog.wat
158 Compilation notes for MGL 5.1
159 -----------------------------
161 The mvis library doesn't compile with current versions of gcc. However wxMGL
162 does not use this part of MGL, so it can be taken out of the compile, e.g.:
164 --- scitech/src/makefile.orig 2004-04-15 20:36:32.000000000 +0100
165 +++ scitech/src/makefile 2005-04-26 01:50:12.000000000 +0100
168 # Target to build libraries for one compiler for SciTech MGL Graphics Library
170 -all_mgl: $(T_PM) $(T_GCONSOLE) $(T_SNAP) $(T_TECH) $(T_MVIS) $(T_FIXED) \
171 +all_mgl: $(T_PM) $(T_GCONSOLE) $(T_SNAP) $(T_TECH) $(T_FIXED) \
172 $(T_GM) $(T_GLUT) $(T_MGL)
173 @$(ECHO) =============================================================================
174 @$(ECHO) DONE: Single compiler MGL build completed successfully!
176 The dos version of _lztimer.asm can't be assembled by the GNU assember. A
177 newer version is available from Scitech, a patch between the version in MGL
178 5.1 and the newer version is included below:
180 --- scitech/src/pm/dos/_lztimer.asm.orig 2004-04-15 20:36:33.000000000 +0100
181 +++ scitech/src/pm/dos/_lztimer.asm 2005-04-26 18:39:57.000000000 +0100
184 ;* ========================================================================
186 -;* Copyright (C) 1991-2002 SciTech Software, Inc. All rights reserved.
187 +;* Copyright (C) 1991-2004 SciTech Software, Inc. All rights reserved.
189 ;* This file may be distributed and/or modified under the terms of the
190 -;* GNU Lesser General Public License version 2.1 as published by the Free
191 -;* Software Foundation and appearing in the file LICENSE.LGPL included
192 +;* GNU General Public License version 2.0 as published by the Free
193 +;* Software Foundation and appearing in the file LICENSE.GPL included
194 ;* in the packaging of this file.
196 ;* Licensees holding a valid Commercial License for this product from
198 ; Convert the BIOS time to microseconds
201 - mov ax,[WORD EndBIOSCount]
202 - sub ax,[WORD StartBIOSCount]
203 + mov ax,[EndBIOSCount]
204 + sub ax,[StartBIOSCount]
205 mov dx,54925 ; Number of microseconds each
206 ; BIOS count represents.
208 @@ -352,17 +352,17 @@
209 ; See if more than an hour passed during timing. If so, notify the user.
212 - mov ax,[WORD StartBIOSCount+2]
213 - cmp ax,[WORD EndBIOSCount+2]
214 + mov ax,[StartBIOSCount+2]
215 + cmp ax,[EndBIOSCount+2]
216 jz @@CalcBIOSTime ; Hour count didn't change, so
220 - cmp ax,[WORD EndBIOSCount+2]
221 + cmp ax,[EndBIOSCount+2]
222 jnz @@TestTooLong ; Two hour boundaries passed, so the
223 ; results are no good
224 - mov ax,[WORD EndBIOSCount]
225 - cmp ax,[WORD StartBIOSCount]
226 + mov ax,[EndBIOSCount]
227 + cmp ax,[StartBIOSCount]
228 jb @@CalcBIOSTime ; a single hour boundary passed. That's
229 ; OK, so long as the total time wasn't
232 ; Convert the BIOS time to microseconds
235 - mov ax,[WORD EndBIOSCount]
236 - sub ax,[WORD StartBIOSCount]
237 + mov ax,[EndBIOSCount]
238 + sub ax,[StartBIOSCount]
239 mov dx,54925 ; Number of microseconds each
240 ; BIOS count represents.
247 Please send bug reports with a description of your environment,
248 compiler and the error message(s) to the wxwin-developers mailing list at:
250 wx-dev@lists.wxwindows.org
252 Vaclav Slavik, Julian Smart, Robert Roebling and Vadim Zeitlin, February 2002.