]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/mac/install.txt
Fixes to allow compilation with no wchar_t (djgpp probably has a real wchar_t
[wxWidgets.git] / docs / mac / install.txt
... / ...
CommitLineData
1wxWidgets 2.6.0 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
20Patching headers: CodeWarrior 8.x
21---------------------------------
22
23If you run into trouble with WCHAR_MIN and WCHAR_MAX the for
24MacOS X Support:Headers:(wchar_t Support fix):machine:ansi.h,
25apply the patch ansi.diff.
26
27You may also need to comment out the _T definition in
28ctype.h if you get multiple definition errors.
29
30setup.h
31-------
32
33in order to build wxMac with CodeWarrior, you must copy or alias the file
34include/wx/mac/setup0.h to include/wx/setup.h.
35
36this step is not needed when using the Apple Developer Tools under Mac OS X
37since the setup.h file is automatically generated during the configuration.
38
39OpenGL
40------
41
42In order to build opengl support with CodeWarrior, you must install the opengl
43libraries and headers from http://developer.apple.com/opengl/index.html
44
45If you want OpenGL support with CodeWarrior, set wxUSE_OPENGL to 1 in
46include/wx/setup.h
47
48If you don't want OpenGl support, set wxUSE_OPENGL to 0 (the
49default) and remove the file OpenGLLibraryStub from the project
50before compilation.
51
52If you want OpenGL support with the Apple Developer Tools under Mac OS X, add
53--with-opengl to the arguments of configure when configuring wxMac.
54
55Project Files
56-------------
57
58The project files are stored as xml text files and converted to binary
59CodeWarrior projects in the distribution (see AppleScript Files below):
60
61 - *M8.xml -> *M8.mcp for CodeWarrior 8 and above.
62
63AppleScript Files
64-----------------
65
66Several AppleScript files are provided in the docs:mac directory:
67
68 - M8xml2mcp.applescript to convert xml files to CodeWarrior 8 projects
69 - M8mcp2xml.applescript to convert CodeWarrior 8 projects to xml files
70 - SetXMLCreator.applescript to set correct creator type (see below)
71
72To run the XML to MCP conversion scripts:
73
74Double click on e.g. docs/mac/M8xml2mcp.applescript, then "run"
75the applescript and when asked for a folder pick src/. Then it
76takes a while to scan all dirs for the xml files and convert
77them to mcps. If some conversions fail it means an mcp already
78exists (back them up prior to running the script).
79
80To set the correct creator type for importing into CodeWarrior,
81you may need to run SetXMLCreator.applescript.
82
83Apple Developer Tools
84---------------------
85
86As in all Unix projects, you need to do something like this under MacOS X
87with the Apple Developer Tools installed:
88
891) cd into the base dir
902) mkdir osx-build
913) cd osx-build
924) ../configure
935) make
94
95If you want to install the library into the system directories you'll need
96to do this as root. The accepted way of running commands as root is to
97use the built-in sudo mechanism. First of all, you must be using an
98account marked as a "Computer Administrator". Then
99
1006) sudo make install
1017) type <YOUR OWN PASSWORD>
102
103Note that while using this method is okay for development, it is not
104recommended that you require endusers to install wxWidgets into their
105system directories in order to use your program. One way to avoid this
106is to configure wxWidgets with --disable-shared. Another way to avoid
107it is to make a framework for wxWidgets. Making frameworks is beyond
108the scope of this document.
109
110Note:
111We recommend you configure a static library instead:
112
1134) ../configure --disable-shared
114
115or activate OpenGL:
116
1174) ../configure --with-opengl
118
119Note:
120It is rarely desirable to install non-Apple software into system directories.
121By configuring the library with --disable-shared and using the full path
122to wx-config with the --in-place option you can avoid installing the library.
123
124Problems with .xpm files
125------------------------
126
127if you have downloaded all the files and get errors like :
128
129Error : the file 'wx/generic/tip.xpm' cannot be opened
130tipdlg.cpp line 201 #include "wx/generic/tip.xpm"
131
132then your cvs has changed the type of the .xpm files to something other than
133text, in order to fix this either change the type by using a resource editor
134or drag the files from /include/wx/generic/..xpm on the SetTypeFromExtension
135application that is included in this folder. This small applet itself queries
136the Internet Config, so you will have to associate the "xpm" extension with
137CodeWarrior before making use of this applet.
138
139Missing PLStringFuncsLib
140------------------------
141
142You will have to build All Targets for MacOS Support:Libraries:Sources:PLStringFuncs:Glue:PLStringFuncsGlue.mcp
143