]>
Commit | Line | Data |
---|---|---|
ce3ed50d JS |
1 | <HTML> |
2 | ||
3 | <HEAD> | |
4 | <TITLE>wxWindows 2 for Mac FAQ</TITLE> | |
5 | </HEAD> | |
6 | ||
7 | <BODY BGCOLOR=#FFFFFF TEXT=#000000 LINK=#FF0000 VLINK=#000000> | |
8 | ||
9 | <font face="Arial, Lucida Sans, Helvetica"> | |
10 | ||
f6bcfd97 | 11 | <table width=100% border=0 cellpadding=5 cellspacing=0> |
ce3ed50d | 12 | <tr> |
f6bcfd97 BP |
13 | <td bgcolor="#C4ECF9"> |
14 | <font size=+1 face="Arial, Lucida Sans, Helvetica" color="#000000"> | |
ce3ed50d JS |
15 | wxWindows 2 for Mac FAQ |
16 | </font> | |
17 | </td> | |
18 | </tr> | |
19 | </table> | |
20 | ||
21 | <P> | |
22 | ||
23 | See also <a href="faq.htm">top-level FAQ page</a>. | |
24 | <hr> | |
31523f51 GD |
25 | <h3>List of questions in this category</h3> |
26 | <ul> | |
27 | <li><a href="#release">When is wxMac 2.x due to be released?</a></li> | |
28 | <li><a href="#macplat">Which Mac platforms are supported?</a></li> | |
29 | <li><a href="#macosx">How is the Mac OS X port different from the Classic Mac OS port?</a></li> | |
30 | <li><a href="#macclassic">How are improvements to the Classic Mac OS port integra ted into the Mac OS X port?</a></li> | |
31 | <li><a href="#compilers">What compilers are supported?</a></li> | |
32 | <li><a href="#filetypes">How does CVS handle file types/creators under Mac OS 8.x /9.x?</a></li> | |
33 | <li><a href="#filetypesx">How does CVS handle file types/creators under Mac OS X? </a></li> | |
34 | <li><a href="#cwpro53">What steps are required to build wxMac using CodeWarrior P ro 5.3?</a></li> | |
8b283bb8 | 35 | <li><a href="#buildx">What steps are required to build wxMac under Mac OS X?</a></li> |
31523f51 GD |
36 | <li><a href="#settings">What important settings are required in the CodeWarrior P roject Preferences?</a></li> |
37 | <li><a href="#smarterrors">What are the smart preprocessing errors with the Apple Developer Tools?</a></li> | |
8b283bb8 | 38 | <li><a href="#aboutmenu">How does wxMac support the standard Apple About menu item and Help menu?</a></li> |
31523f51 GD |
39 | </ul> |
40 | <hr> | |
41 | <h3><a name="release">When is wxMac 2.x due to be released?</a></h3> | |
ce3ed50d | 42 | |
8b283bb8 | 43 | There is a <a href="dl_mac2.htm">preview</a> available. |
31523f51 GD |
44 | The author of this port is <a href="mailto:csomor@advancedconcepts.ch">Stefan Csomor</a>. |
45 | <P> | |
46 | ||
47 | <table border=0 cellpadding=5> | |
48 | <tr> | |
49 | <td bgcolor="#C4ECF9"> | |
50 | <FONT FACE="Arial, Lucida Sans, Helvetica"> | |
51 | <font size=2> | |
52 | Please note that the version of wxMac in CVS is more robust and nearly feature-complete compared with the packaged 2.0 release. | |
8b283bb8 | 53 | Until a new release is made, it is recommended that you download the wxMac 2.3.1 <a href="dl_mac2.htm#dev">development snapshot</a> or the sources from the <a href="cvs.htm">CVS trunk</a>. |
31523f51 | 54 | </font> |
8b283bb8 | 55 | </font></td> |
31523f51 GD |
56 | </tr> |
57 | </table> | |
58 | ||
59 | <P> | |
60 | ||
61 | <h3><a name="macplat">Which Mac platforms are supported?</a></h3> | |
62 | ||
63 | wxWindows 2 can be used to develop and deliver applications on Classic Mac OS (e.g. Mac OS 8.x/9.x) both as Carbon and non-Carbon applications. | |
64 | <P> | |
65 | A Mac OS X port is in progress in order to be able to build wxWindows applications using the Apple Developer Tools that are delivered with every copy of Mac OS X. | |
66 | The Mac OS X port is based on and, for the most part, merged with the Carbon code for Classic Mac OS. | |
67 | <P> | |
68 | ||
69 | <h3><a name="macosx">How is the Mac OS X port different from the Classic Mac OS port?</a></h3> | |
70 | ||
71 | wxMac for Mac OS X shares code both with wxMac for Mac OS and common Unix code in wxWindows. The aim is to use the same Mac OS Carbon code both for Classic Mac OS and for Mac OS X while leveraging the fact that Mac OS X is a BSD Unix. | |
72 | <P> | |
73 | This hybrid approach was suggested by Apple to the <a href="http://www.mozilla.org/ports/fizzilla/">Fizzilla</a> team working on <a href="http://www.mozilla.org/">Mozilla</a> for Mac OS X. | |
74 | <P> | |
75 | ||
76 | <h3><a name="macclassic">How are improvements to the Classic Mac OS port integrated into the Mac OS X port?</a></h3> | |
77 | ||
78 | Since the source code is shared between the two ports, any Carbon compliant improvements to wxMac for Classic Mac OS are automatically available in the Mac OS X port. | |
79 | <P> | |
80 | The following points should be considered when improving wxMac: | |
81 | <ul> | |
82 | <li>Non Carbon compliant changes for Classic Mac OS will most likely break the Mac OS X port. <em>Such changes should be tested using the Carbon targets in the CodeWarrior projects for Classic Mac OS.</em> | |
83 | <li>Non Carbon compliant changes for Mac OS X will most likely break the Classic Mac OS port. <em>Such changes should be tested using CodeWarrior under Mac OS 8.x/9.x.</em> | |
84 | </ul> | |
85 | <P> | |
86 | ||
87 | <h3><a name="compilers">What compilers are supported?</a></h3> | |
88 | ||
89 | Under Classic Mac OS, MetroWerks CodeWarrior Pro 5.3 or 6 are required to build wxMac. | |
90 | <P> | |
91 | Under Mac OS X, the Developer Tools are sufficient to build wxMac. CodeWarrior Pro 6 can also be used to build the Carbon targets. | |
92 | <P> | |
93 | ||
94 | <h3><a name="filetypes">How does CVS handle file types/creators under Mac OS 8.x/9.x?</a></h3> | |
95 | ||
96 | Before checking out the wxWindows code using a CVS client under Mac OS 8.x/9.x, be sure your computer is set up to treat <code>xpm</code> and <code>xbm</code> images correctly: | |
97 | <ul> | |
98 | <li>bring up the Internet control panel, select the <i>Advanced Options</i> tab, click on the <i>File Mapping</i> icon from the list at the left and see if there are is an entry for ".xpm" files and another for ".xbm". | |
99 | <li>if an entry exists, click <i>Change...</i> and make sure <i>File Type</i> is <code>TEXT</code> (just those four capital letters); correct it if necessary. If there is no entry, make one with type set to <code>TEXT</code> and creator set to anything you like; reasonable choices include <code>GKON</code> (Graphic Converter) or <code>CWIE</code> (CodeWarrior). | |
100 | <li>if you want to edit <code>xpm</code> or <code>xbm</code> files in CodeWarrior, set up a file mapping in the CodeWarrior project settings for analogous to ".h" files. | |
101 | </ul> | |
102 | <P> | |
103 | ||
104 | <h3><a name="filetypesx">How does CVS handle file types/creators under Mac OS X?</a></h3> | |
105 | ||
106 | The Mac OS X CVS client does not handle file types and creators at all (just like every Unix command line CVS client). This is an issue only when the checked out files will also be used under Mac OS 8.x/9.x. | |
107 | <P> | |
108 | All files checked out under Mac OS X will be untyped and CodeWarrior will not recognize them correctly. To correct this, use the autotyper provided in the CVS sources: | |
109 | <ul> | |
110 | <li>decode and decompress the file <code>wxWindows/docs/mac/TypeAsMetrowerksText.sea.hqx</code> | |
111 | <li>drag the wxWindows CVS sandbox directory onto the autotyper and most of the files will be typed according to the file extension | |
112 | </ul> | |
113 | <P> | |
114 | ||
115 | <h3><a name="cwpro53">What steps are required to build wxMac using CodeWarrior Pro 5.3?</a></h3> | |
116 | ||
117 | The latest build for Carbon support lead to a few changes that you will have to follow in order to successfully compile the code. | |
118 | This is also necessary even if you don'want to build the Carbon targets. | |
119 | ||
120 | <ol> | |
121 | <li>you need CodeWarrior Pro 5.3, i.e. 5.0 with all the upgrades | |
122 | <li>you have to download the Universal Interfaces 3.3.2 or later from the Apple Developer web site, Universal Interfaces 3.4 is required for Carbon Printing support | |
123 | <li>put the Universal folder into the MacOS Support folder and replace older versions | |
124 | <li>remove from the MacOS Support folder the separate OpenTransport folder | |
125 | <li>open the file MacOS Support:MacHeaders:MacHeaders.c and add the line | |
126 | <pre>#include <ControlDefinitions.h></pre> | |
127 | after the line | |
128 | <pre>#include <Controls.h></pre> | |
129 | <li>rebuild all MacHeaders from the MacHeaders.mcp project in the same folder | |
130 | </ol> | |
131 | <P> | |
132 | Build the projects (<code>makemac6.mcp</code> for CodeWarrior Pro 6; <code>makemac.mpc</code> for CodeWarrior Pro 5) in the following five directories: | |
133 | <ul> | |
134 | <li>wxWindows:src: | |
135 | <li>wxWindows:src:jpeg: | |
136 | <li>wxWindows:src:png: | |
137 | <li>wxWindows:src:tiff: | |
138 | <li>wxWindows:src:zlib: | |
139 | </ul> | |
140 | <P> | |
141 | ||
142 | <h3><a name="buildx">What steps are required to build wxMac under Mac OS X?</a></h3> | |
143 | ||
144 | You need to have the Apple Developer Tools installed. The Developer Tools CD is one of the 3 CDs that are delivered with Mac OS X but must be installed in addition to the default Mac OS X installation. | |
145 | <P> | |
146 | Building wxMac completely without configure is not supported. | |
147 | <P> | |
148 | Building wxWindows directly in the CVS sandbox is not recommended. Instead, wxWindows should be built in a directory configured relatively to the CVS sandbox. | |
149 | For instance, to build wxMac with configure, start in the base wxWindows directory and type: | |
150 | <ul> | |
151 | <li><code>mkdir macbuild</code> | |
152 | <li><code>cd macbuild</code> | |
153 | <li><code>../configure</code> <b>or</b> <code>../configure --enable-debug</code> | |
154 | <li><code>make</code> | |
155 | </ul> | |
156 | <P> | |
157 | ||
158 | <h3><a name="settings">What important settings are required in the CodeWarrior Project Preferences?</a></h3> | |
159 | ||
160 | For some reasons the CodeWarrior project settings may get changed and this may lead to the inability to compile a certain target. In order to verify the settings click on the target tab, double click on the respective target and then select the following items on the tree-view on the left. Here are the important checks: | |
161 | ||
162 | <ol> | |
163 | ||
164 | <li>under <code>Target/Access Paths</code>, make sure the first user include does not have a folder icon for recursive search. | |
165 | ||
166 | <li> under <code>Language Settings/C/C++ Language</code>, make sure that the only checked items are: | |
167 | <ul> | |
168 | <li><code>Enable C++ Exceptions</code> | |
169 | <li><code>Enable RTTI</code> | |
170 | <li><code>Enable bool Support</code> | |
171 | <li><code>Enable wchar_t Support</code> | |
172 | <li><code>Relaxed Pointer Type Rules</code> | |
173 | <li><code>Use Unsigned Chars</code> | |
174 | </ul> | |
175 | ||
176 | <li>under <code>Language Settings/C/C++ Warnings</code>, make sure that the only checked items are: | |
177 | <ul> | |
178 | <li><code>Illegal Pragmas</code> | |
179 | <li><code>Extended Error Checking</code> | |
180 | <li><code>Inconsistent Use of 'class' and 'struct' Keywords</code> | |
181 | <li><code>Hidden Virtual Functions</code> but be aware that the framework itself has some of these beauty spots | |
182 | </ul> | |
183 | ||
184 | <li>under <code>Linker/PPC Linker</code>, make sure that the following items are checked: | |
185 | <ul> | |
186 | <li><code>Dead-strip Static Initialization Code</code> in order to avoid including libraries that are not needed, especially as things like <a href="http://developer.apple.com/opengl/index.html">OpenGL</a> get added to the projects and sources | |
187 | </ul> | |
188 | ||
189 | </ol> | |
190 | <P> | |
191 | ||
192 | <h3><a name="smarterrors">What are the smart preprocessing errors with the Apple Developer Tools?</a></h3> | |
193 | ||
194 | Smart preprocessing is activated with the <code>-cpp-precomp</code> option and allows much faster preprocessing of the source files by loading precompiled Carbon header files. This option speeds up the compilation of wxMac by a factor of 2 at least. | |
195 | When compiling wxMac using the Apple Developer Tools, the following error is displayed for certain files: | |
196 | <ul> | |
197 | <li><code>cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode</code> | |
198 | </ul> | |
199 | ||
200 | This error is due to the smart precompiler which does not fully understand C++ syntax and reverts to basic preprocessing when a smart preprocessing error occurs. | |
201 | This error can sometimes be corrected or avoided by modifying the source code. However, leaving these errors is not a problem since the preprocessor automatically switches to basic preprocessing if necessary. | |
202 | <P> | |
203 | ||
204 | <h3><a name="aboutmenu">How does wxMac support the standard Apple About menu item and Help menu?</a></h3> | |
205 | ||
206 | Because wxWindows does not have a specific API for the <i>About</i> menu item or the <i>Help</i> menu, the Mac OS port uses some static variables to help the engine make the right decisions: | |
207 | <ul> | |
208 | <li>It assumes that the <i>About</i> menu item is part of a <i>Help</i> menu. | |
209 | <li>The title of the <i>Help</i> menu is stored in <code>wxApp::s_macHelpMenuTitleName</code>, it defaults to "&Help", but you can change it in your constructor to your specific menu title. | |
210 | <li>The item Id of the <i>About</i> menu is stored in <code>wxApp::s_macAboutMenuItemID</code>, it defaults to <code>wxID_ABOUT</code>, but can be changed as well to suit your needs. | |
211 | <li>The other items of the wxWindows help menu are appended to the Mac OS <i>Help</i> menu and the translation of Ids is handled transparently for your application. | |
212 | </ul> | |
ce3ed50d JS |
213 | <P> |
214 | ||
215 | </font> | |
216 | ||
217 | </BODY> | |
218 | ||
219 | </HTML> |