]>
Commit | Line | Data |
---|---|---|
1 | wxWidgets 2.6.2 for MGL installation | |
2 | ------------------------------------ | |
3 | ||
4 | IMPORTANT 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 | ||
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 | |
15 | ||
16 | First steps | |
17 | ----------- | |
18 | ||
19 | - Download SciTech MGL library from http://www.scitechsoft.com. The | |
20 | downloads page is here (you need MGL version 5.0beta7 or newer): | |
21 | http://scitechsoft.com/products/dev/mgl_download/mgl_down.html | |
22 | ||
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 | |
25 | build wxMGL. | |
26 | ||
27 | Make sure you installed all MGL components, including the "fonts" package | |
28 | (it's called mgl_<ver>-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 | ||
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. | |
36 | ||
37 | - Make a directory such as ~/wx and unarchive the files into this | |
38 | directory. | |
39 | ||
40 | - You can now use configure or makefiles to build wxWidgets and the samples. | |
41 | In case of problems, please use GNU make. | |
42 | ||
43 | ||
44 | COMPILING | |
45 | ========= | |
46 | ||
47 | Following systems are supported by wxMGL so far: | |
48 | - Unix (Linux etc.) | |
49 | - MS-DOS (DJGPP and Watcom compilers) | |
50 | ||
51 | ||
52 | * Compiling using configure | |
53 | ---------------------------- | |
54 | ||
55 | These instructions apply to installation on a Unix system (such as Linux). Please | |
56 | see below for information on using configure on non-Unix platforms. | |
57 | ||
58 | If you compile wxWidgets on Linux for the first time and don't like to read | |
59 | install instructions just do (in the base dir): | |
60 | ||
61 | > ./configure --with-mgl | |
62 | > make | |
63 | > su <type root password> | |
64 | > make install | |
65 | > ldconfig | |
66 | > exit | |
67 | ||
68 | Afterwards you can continue with | |
69 | ||
70 | > make | |
71 | > su <type root password> | |
72 | > make install | |
73 | > ldconfig | |
74 | > exit | |
75 | ||
76 | If you want to remove wxWidgets on Unix you can do this: | |
77 | ||
78 | > su <type root password> | |
79 | > make uninstall | |
80 | > ldconfig | |
81 | > exit | |
82 | ||
83 | You can set many options to configure. Type | |
84 | ||
85 | > ./configure --help | |
86 | ||
87 | and you will get a list of supported options. | |
88 | ||
89 | ||
90 | * Using wxMGL library built with configure | |
91 | ------------------------------------------- | |
92 | ||
93 | 'make install' will install wx-config script that can (and should) be used | |
94 | to get compiler flags that are needed to build your program. wx-config --cxxflags | |
95 | will output necessary C++ compiler flags and wx-config --libs will list all | |
96 | needed libraries. See an example of wxWidgets application makefile: | |
97 | ||
98 | minimal: minimal.o | |
99 | $(CC) -o minimal minimal.o `wx-config --libs` | |
100 | ||
101 | minimal.o: minimal.cpp mondrian.xpm | |
102 | $(CC) `wx-config --cxxflags` -c minimal.cpp -o minimal.o | |
103 | ||
104 | ||
105 | * Using configure to build MS-DOS version | |
106 | ------------------------------------------ | |
107 | ||
108 | Even though configure is a Unix script, you can use it to build MS-DOS version | |
109 | of the wxMGL library. There are two possible ways to achieve this: you can | |
110 | either cross-compile from Unix or compile natively. Either way you will needed | |
111 | the DJGPP port of GCC compiler freely available from: | |
112 | http://www.delorie.com/djgpp/getting.html | |
113 | ||
114 | Scitech MGL must be compiled natively, and to do this you will need to download | |
115 | the following files (from the current/v2 and current/v2gnu directories). You | |
116 | should get the latest versions available rather than the exact versions shown | |
117 | below, they are just an example of what to look for: | |
118 | ||
119 | djdev203.zip B 1,530,778 020811 DJGPP development kit 2.03 | |
120 | bnu2161b.zip B 3,483,132 050708 GNU Binutils 2.16.1 for DJGPP V2 | |
121 | gcc344b.zip B 3,772,211 050527 GNU GCC 3.4.4 for DJGPP V2 | |
122 | gpp344b.zip B 4,026,725 050527 GNU C++ Compiler 3.4.4 for DJGPP V2 | |
123 | ||
124 | If you want to build wxMGL natively using the DJGPP compiler, you will have to | |
125 | install a couple of Unix utilities. I think the following is the minimum that | |
126 | will work: | |
127 | ||
128 | bsh204b.zip B 454,308 020106 GNU Bash shell 2.04 for DJGPP V2 | |
129 | fil41b.zip B 1,738,170 030830 GNU fileutils 4.1 for DJGPP V2 | |
130 | find41b.zip B 306,826 010505 GNU findutils 4.1 for DJGPP V2 | |
131 | grep24b.zip B 254,997 000116 GNU Grep 2.4 for DJGPP V2 | |
132 | mak3791b.zip B 272,798 020106 GNU Make 3.79.1 for DJGPP V2 | |
133 | sed414b.zip B 159,920 050331 GNU Sed 4.1.4 for DJGPP V2 | |
134 | shl2011b.zip B 1,195,021 020419 GNU sh-utils 2.01 for DJGPP V2 | |
135 | ||
136 | You'll probably also want a debugger: | |
137 | gdb611b.zip B 1,585,648 040629 GNU GDB Debugger 6.1.1 for DJGPP V2 | |
138 | ||
139 | And maybe some of these: | |
140 | faq230b.zip B 679,865 000203 FAQ 2.30 for DJGPP v2.03 | |
141 | dif281b.zip B 402,859 040911 GNU Diffutils 2.8.1 for DJGPP V2 | |
142 | gwk314b.zip B 968,667 050321 GNU Awk 3.1.4 for DJGPP V2 | |
143 | gzip135b.zip B 146,138 041215 GNU gzip 1.3.5 for DJGPP V2 | |
144 | lss374b.zip B 199,805 020405 GNU Less 374 for DJGPP V2 | |
145 | pat254b.zip B 114,250 040326 GNU Patch 2.5.4 for DJGPP V2 | |
146 | tar112ab.zip B 236,427 000305 GNU Tar 1.12a for DJGPP V2 | |
147 | whic211b.zip B 86,296 000911 GNU which 2.11 for DJGPP V2 | |
148 | ||
149 | The system you compile on must support long file names. You can use Windows 9x | |
150 | or an x86 version of Windows 2000/XP or later. For example: | |
151 | ||
152 | C:\>set MGL_ROOT=c:/scitech | |
153 | C:\>set DJGPP=c:/djgpp/djgpp.env | |
154 | C:\>PATH=c:\djgpp\bin | |
155 | C:\>set PS1=\w\$ | |
156 | C:\>bash | |
157 | c:/$ mkdir build | |
158 | c:/$ cd build | |
159 | c:/build$ ../wxWidgets/configure | |
160 | c:/build$ make | |
161 | c:/build$ cd samples/minimal | |
162 | c:/build/samples/minimal$ make | |
163 | ||
164 | Cross-compilation is very easy. It works like ordinary compilation with | |
165 | configure, you only have to specify the target: | |
166 | ||
167 | > ./configure --with-mgl --build=i586-linux --host=i586-pc-msdosdjgpp | |
168 | > make | |
169 | ||
170 | For this to work, you must have installed a cross compiler on your system. Ready | |
171 | made binaries are not available for very many systems, so usually this means you | |
172 | must obtain the djgpp sources and compile them yourself. | |
173 | ||
174 | NetBSD does have a binary package which can be installed with: | |
175 | # pkg_add cross-i386-msdosdjgpp | |
176 | ||
177 | You can also try asking on the wx-dev mailing list. If someone else has already | |
178 | built a cross-compiler for you platform they may be willing to send you the | |
179 | binaries. | |
180 | ||
181 | ||
182 | * Building wxMGL for MS-DOS using Watcom C/C++ | |
183 | ----------------------------------------------- | |
184 | ||
185 | <Note: this section is currently out of date> | |
186 | ||
187 | You will need Watcom C/C++ compiler version 11 or newer (Watcom is going to be | |
188 | OpenSourced by SciTech, check out http://www.openwatcom.org). | |
189 | ||
190 | 1. Edit $(WXDIR)\include\wx\univ\setup.h to suit your needs (in same way as you | |
191 | do when compiling wxMSW). | |
192 | ||
193 | 2. Go to $(WXDIR)\src\mgl and run | |
194 | > wmake -f makefile.wat all | |
195 | ||
196 | 3. You can compile the samples by typing 'wmake -f makefile.mgl all' in sample | |
197 | directory if this file is available. If it is not, copy makefile.wat to | |
198 | makefile.mgl and replace the line that says | |
199 | ||
200 | !include $(WXDIR)\src\makeprog.wat | |
201 | ||
202 | with | |
203 | ||
204 | !include $(WXDIR)\src\mgl\makeprog.wat | |
205 | ||
206 | ||
207 | Compilation notes for MGL with DJGPP | |
208 | ------------------------------------ | |
209 | ||
210 | The mvis library doesn't compile with current versions of gcc. However wxMGL | |
211 | does not use this part of MGL, so it can be taken out of the compile, e.g.: | |
212 | ||
213 | --- scitech/src/makefile.orig 2004-04-15 20:36:32.000000000 +0100 | |
214 | +++ scitech/src/makefile 2005-04-26 01:50:12.000000000 +0100 | |
215 | @@ -88,7 +88,7 @@ | |
216 | ||
217 | # Target to build libraries for one compiler for SciTech MGL Graphics Library | |
218 | ||
219 | -all_mgl: $(T_PM) $(T_GCONSOLE) $(T_SNAP) $(T_TECH) $(T_MVIS) $(T_FIXED) \ | |
220 | +all_mgl: $(T_PM) $(T_GCONSOLE) $(T_SNAP) $(T_TECH) $(T_FIXED) \ | |
221 | $(T_GM) $(T_GLUT) $(T_MGL) | |
222 | @$(ECHO) ============================================================================= | |
223 | @$(ECHO) DONE: Single compiler MGL build completed successfully! | |
224 | ||
225 | The following small change is also required to include/tcl/hashmap.hpp: | |
226 | ||
227 | --- scitech/include/tcl/hashtab.hpp.orig 2006-01-20 19:51:12.000000000 +0000 | |
228 | +++ scitech/include/tcl/hashtab.hpp 2006-01-22 14:12:12.000000000 +0000 | |
229 | @@ -60,7 +60,7 @@ | |
230 | TCHashTableNode **prev; | |
231 | ||
232 | friend class TCGenHashTable; | |
233 | - friend ostream& operator << (ostream& o,TCGenHashTable& h); | |
234 | + friend ostream& operator << (ostream& o, class TCGenHashTable& h); | |
235 | public: | |
236 | // Constructor to satisfy some compilers :-( | |
237 | TCHashTableNode() {}; | |
238 | ||
239 | ||
240 | Bug reports | |
241 | ----------- | |
242 | ||
243 | Please send bug reports with a description of your environment, | |
244 | compiler and the error message(s) to the wxwin-developers mailing list at: | |
245 | ||
246 | wx-dev@lists.wxwindows.org | |
247 | ||
248 | Vaclav Slavik, Julian Smart, Robert Roebling and Vadim Zeitlin, February 2002. | |
249 | Mike Wetherell 2005/2006 |