]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/mac/install.txt
Applied patched for combo box SELECTED events (no
[wxWidgets.git] / docs / mac / install.txt
... / ...
CommitLineData
1wxWidgets 2.5 for Mac installation
2----------------------------------
3
4On MacOS X, you can download Apple's free developer tools (gcc
5and associated headers and libraries, such as the Carbon API).
6You can then use configure in a similar way to compiling
7wxWidgets on Linux (or on Windows using MinGW or Cygwin). See
8'Apple Developer Tools' below for more details on using
9configure.
10
11To target on MacOS 8 or 9, you need to buy Metrowerks
12CodeWarrior. You can then compile Mac Classic or MacOS X
13applications on Mac OS X, or compile Mac Classic or MacOS X
14applications on Mac Classic. However you can only run and debug
15each type of application on the target operating system.
16
17Installing latest headers (and Carbon Support)
18----------------------------------------------
19
20NOTE: these steps are not necessary for CW Pro 6 and above,
21only for CW Pro 5.3.
22
23The latest build for carbon support leads to a few changes you will have to
24follow, in order to successfully compile the code (also necessary if you don't
25want to build the carbon targets).
26
271. You need CodeWarrior Pro 5.3 , i.e. 5.0 with all the upgrades.
282. 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.
303. put the Interfaces and Libraries Folder into the MacOS Support folder and
31 replace older versions.
324. remove from the MacOS Support folder the separate OpenTransport folder.
335. open the file MacOS Support:MacHeaders:MacHeaders.c and add the line
34 #include <ControlDefinitions.h>
35 after the
36 #include <Controls.h>
376. rebuild all MacHeaders from the MacHeaders.mcp project in the same folder.
38
39If you want to build the carbon targets, you will also need the latest
40carbonized version of MSL from Metrowerks, at the time of writing, this meant
41applying the changes from the folders:
42
43CodeWarrior Pro 5:Pre-Release:Carbon & MacOSX Development:Carbonized MSL and
44CodeWarrior Pro 5:Pre-Release:Carbon & MacOSX Development:Carbonized Runtimes
45(consult the file CodeWarrior Pro 5:Pre-Release:Carbon & MacOSX Development:Carbon & MacOSX README)
46
47Patching headers: CodeWarrior 8.x
48---------------------------------
49
50If you run into trouble with WCHAR_MIN and WCHAR_MAX in ansi.h,
51apply the patch ansi.diff.
52
53You may also need to comment out the _T definition in
54ctype.h if you get multiple definition errors.
55
56setup.h
57-------
58
59in order to build wxMac with CodeWarrior, you must copy or alias the file
60include/wx/mac/setup0.h to include/wx/setup.h.
61
62this step is not needed when using the Apple Developer Tools under Mac OS X
63since the setup.h file is automatically generated during the configuration.
64
65OpenGL
66------
67
68In order to build opengl support with CodeWarrior, you must install the opengl
69libraries and headers from http://developer.apple.com/opengl/index.html
70
71If you want OpenGL support with CodeWarrior, set wxUSE_OPENGL to 1 in
72include/wx/setup.h
73
74If you don't want OpenGl support, set wxUSE_OPENGL to 0 (the
75default) and remove the file OpenGLLibraryStub from the project
76before compilation.
77
78If you want OpenGL support with the Apple Developer Tools under Mac OS X, add
79--with-opengl to the arguments of configure when configuring wxMac.
80
81Project Files
82-------------
83
84The project files are stored as xml text files and converted to binary
85CodeWarrior projects in the distribution (see AppleScript Files below):
86 - *M5.xml -> *M5.mcp for CodeWarrior 5.3
87 - *M6.xml -> *M6.mcp for CodeWarrior 6
88 - *M7.xml -> *M7.mcp for CodeWarrior 7 and above.
89
90In order to build the library (and then the samples) you need to make the
91following projects (for CW 5.3, similar process for CW 7):
92
93:src:wxwindowsM5.mcp
94:src:png:pngM5.mcp
95:src:tiff:tiffM5.mcp
96:src:jpeg:jpegM5.mcp
97:src:zlib:zlibM5.mcp
98
99Note that if using CW 8 and above, when compiling the samples
100you may need to edit the target settings, click on Language
101Settings, C/++ Language and remove the forward slash at the
102start of /wx/wx_cw_d.h (or similar filename).
103
104AppleScript Files
105-----------------
106
107Several AppleScript files are provided in the docs:mac directory:
108
109 - M5xml2mcp.applescript to convert xml files to CodeWarrior 5 projects
110 - M5mcp2xml.applescript to convert CodeWarrior 5 projects to xml files
111 - M5build.applescript to automatically build all samples/demos projects
112 - M8xml2mcp.applescript to convert xml files to CodeWarrior 8 projects
113 - M8mcp2xml.applescript to convert CodeWarrior 8 projects to xml files
114 - SetXMLCreator.applescript to set correct creator type (see below)
115
116To run the XML to MCP conversion scripts:
117
118Double click on e.g. docs/mac/M8xml2mcp.applescript, then "run"
119the applescript and when asked for a folder pick src/. Then it
120takes a while to scan all dirs for the xml files and convert
121them to mcps. If some conversions fail it means an mcp already
122exists (back them up prior to running the script).
123
124To set the correct creator type for importing into CodeWarrior,
125you may need to run SetXMLCreator.applescript.
126
127Apple Developer Tools
128---------------------
129
130As in all Unix projects, you need to do something like this under MacOS X
131with the Apple Developer Tools installed:
132
1331) cd into the base dir
1342) mkdir osx-build
1353) cd osx-build
1364) ../configure
1375) make
138
139If you want to install the library into the system directories you'll need
140to do this as root. The accepted way of running commands as root is to
141use the built-in sudo mechanism. First of all, you must be using an
142account marked as a "Computer Administrator". Then
143
1446) sudo make install
1457) type <YOUR OWN PASSWORD>
146
147Note that while using this method is okay for development, it is not
148recommended that you require endusers to install wxWidgets into their
149system directories in order to use your program. One way to avoid this
150is to configure wxWidgets with --disable-shared. Another way to avoid
151it is to make a framework for wxWidgets. Making frameworks is beyond
152the scope of this document.
153
154Note:
155We recommend you configure a static library instead:
156
1574) ../configure --disable-shared
158
159or activate OpenGL:
160
1614) ../configure --with-opengl
162
163Note:
164It is rarely desirable to install non-Apple software into system directories.
165By configuring the library with --disable-shared and using the full path
166to wx-config with the --in-place option you can avoid installing the library.
167
168Problems with .xpm files
169------------------------
170
171if you have downloaded all the files and get errors like :
172
173Error : the file 'wx/generic/tip.xpm' cannot be opened
174tipdlg.cpp line 201 #include "wx/generic/tip.xpm"
175
176then your cvs has changed the type of the .xpm files to something other than
177text, in order to fix this either change the type by using a resource editor
178or drag the files from /include/wx/generic/..xpm on the SetTypeFromExtension
179application that is included in this folder. This small applet itself queries
180the Internet Config, so you will have to associate the "xpm" extension with
181CodeWarrior before making use of this applet.
182
183Missing PLStringFuncsLib
184------------------------
185
186You will have to build All Targets for MacOS Support:Libraries:Sources:PLStringFuncs:Glue:PLStringFuncsGlue.mcp
187