1 wxWindows 2.5 for Mac installation
2 ----------------------------------
4 On MacOS X, you can download Apple's free developer tools (gcc
5 and associated headers and libraries, such as the Carbon API).
6 You can then use configure in a similar way to compiling
7 wxWindows on Linux (or on Windows using MinGW or Cygwin). See
8 'Apple Developer Tools' below for more details on using
11 To target on MacOS 8 or 9, you need to buy Metrowerks
12 CodeWarrior. You can then compile Mac Classic or MacOS X
13 applications on Mac OS X, or compile Mac Classic or MacOS X
14 applications on Mac Classic. However you can only run and debug
15 each type of application on the target operating system.
17 Installing latest headers (and Carbon Support)
18 ----------------------------------------------
20 NOTE: these steps are not necessary for CW Pro 6 and above,
23 The latest build for carbon support leads to a few changes you will have to
24 follow, in order to successfully compile the code (also necessary if you don't
25 want to build the carbon targets).
27 1. You need CodeWarrior Pro 5.3 , i.e. 5.0 with all the upgrades.
28 2. You have to download the 3.4.0 (or greater) universal interfaces from
29 ftp://ftp.apple.com/developer/Development_Kits/UniversalHeaders3.4.1.img.bin.
30 3. put the Interfaces and Libraries Folder into the MacOS Support folder and
31 replace older versions.
32 4. remove from the MacOS Support folder the separate OpenTransport folder.
33 5. open the file MacOS Support:MacHeaders:MacHeaders.c and add the line
34 #include <ControlDefinitions.h>
37 6. rebuild all MacHeaders from the MacHeaders.mcp project in the same folder.
39 If you want to build the carbon targets, you will also need the latest
40 carbonized version of MSL from Metrowerks, at the time of writing, this meant
41 applying the changes from the folders:
43 CodeWarrior Pro 5:Pre-Release:Carbon & MacOSX Development:Carbonized MSL and
44 CodeWarrior Pro 5:Pre-Release:Carbon & MacOSX Development:Carbonized Runtimes
45 (consult the file CodeWarrior Pro 5:Pre-Release:Carbon & MacOSX Development:Carbon & MacOSX README)
50 in order to build wxMac with CodeWarrior, you must copy or alias the file
51 include/wx/mac/setup0.h to include/wx/setup.h.
53 this step is not needed when using the Apple Developer Tools under Mac OS X
54 since the setup.h file is automatically generated during the configuration.
59 In order to build opengl support with CodeWarrior, you must install the opengl
60 libraries and headers from http://developer.apple.com/opengl/index.html
62 If you want OpenGL support with CodeWarrior, set wxUSE_OPENGL to 1 in
65 If you don't want OpenGl support, set wxUSE_OPENGL to 0 (the
66 default) and remove the file OpenGLLibraryStub from the project
69 If you want OpenGL support with the Apple Developer Tools under Mac OS X, add
70 --with-opengl to the arguments of configure when configuring wxMac.
75 The project files are stored as xml text files and converted to binary
76 CodeWarrior projects in the distribution (see AppleScript Files below):
77 - *M5.xml -> *M5.mcp for CodeWarrior 5.3
78 - *M6.xml -> *M6.mcp for CodeWarrior 6
79 - *M7.xml -> *M7.mcp for CodeWarrior 7 and above.
81 In order to build the library (and then the samples) you need to make the
82 following projects (for CW 5.3, similar process for CW 7):
90 Note that if using CW 8 and above, when compiling the samples
91 you may need to edit the target settings, click on Language
92 Settings, C/++ Language and remove the forward slash at the
93 start of /wx/wx_cw_d.h (or similar filename).
98 Several AppleScript files are provided in the docs:mac directory:
100 - M5xml2mcp.applescript to convert xml files to CodeWarrior 5 projects
101 - M5mcp2xml.applescript to convert CodeWarrior 5 projects to xml files
102 - M5build.applescript to automatically build all samples/demos projects
103 - M8xml2mcp.applescript to convert xml files to CodeWarrior 8 projects
104 - M8mcp2xml.applescript to convert CodeWarrior 8 projects to xml files
106 To run the XML to MCP conversion scripts:
108 Double click on e.g. docs/mac/M8xml2mcp.applescript, then "run"
109 the applescript and when asked for a folder pick src/. Then it
110 takes a while to scan all dirs for the xml files and convert
111 them to mcps. If some conversions fail it means an mcp already
112 exists (back them up prior to running the script).
114 Apple Developer Tools
115 ---------------------
117 As in all Unix projects, you need to do something like this under MacOS X
118 with the Apple Developer Tools installed:
120 1) cd into the base dir
126 If you want to install the library into the system directories you'll need
127 to do this as root. The accepted way of running commands as root is to
128 use the built-in sudo mechanism. First of all, you must be using an
129 account marked as a "Computer Administrator". Then
132 7) type <YOUR OWN PASSWORD>
134 Note that while using this method is okay for development, it is not
135 recommended that you require endusers to install wxWindows into their
136 system directories in order to use your program. One way to avoid this
137 is to configure wxWindows with --disable-shared. Another way to avoid
138 it is to make a framework for wxWindows. Making frameworks is beyond
139 the scope of this document.
142 We recommend you configure a static library instead:
144 4) ../configure --disable-shared
148 4) ../configure --with-opengl
151 It is rarely desirable to install non-Apple software into system directories.
152 By configuring the library with --disable-shared and using the full path
153 to wx-config with the --in-place option you can avoid installing the library.
155 Problems with .xpm files
156 ------------------------
158 if you have downloaded all the files and get errors like :
160 Error : the file 'wx/generic/tip.xpm' cannot be opened
161 tipdlg.cpp line 201 #include "wx/generic/tip.xpm"
163 then your cvs has changed the type of the .xpm files to something other than
164 text, in order to fix this either change the type by using a resource editor
165 or drag the files from /include/wx/generic/..xpm on the SetTypeFromExtension
166 application that is included in this folder. This small applet itself queries
167 the Internet Config, so you will have to associate the "xpm" extension with
168 CodeWarrior before making use of this applet.
170 Missing PLStringFuncsLib
171 ------------------------
173 You will have to build All Targets for MacOS Support:Libraries:Sources:PLStringFuncs:Glue:PLStringFuncsGlue.mcp