]> git.saurik.com Git - wxWidgets.git/blame - docs/mac/install.txt
Give BitmapButton its own demo, get rid of ErrorDialogs
[wxWidgets.git] / docs / mac / install.txt
CommitLineData
6b9a6d77
DS
1wxWindows 2.5 for Mac installation
2----------------------------------
2b5f62a0
VZ
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
6b9a6d77
DS
7wxWindows on Linux (or on Windows using MinGW or Cygwin). See
8'Apple Developer Tools' below for more details on using
2b5f62a0
VZ
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
2e492c85
SC
17Installing latest headers (and Carbon Support)
18----------------------------------------------
19
2b5f62a0
VZ
20NOTE: these steps are not necessary for CW Pro 6 and above,
21only for CW Pro 5.3.
8d823dab 22
2b5f62a0 23The latest build for carbon support leads to a few changes you will have to
f69fcd07 24follow, in order to successfully compile the code (also necessary if you don't
2b5f62a0
VZ
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.
f9e45bd7 335. open the file MacOS Support:MacHeaders:MacHeaders.c and add the line
1eaf1962
SC
34 #include <ControlDefinitions.h>
35 after the
36 #include <Controls.h>
2b5f62a0 376. rebuild all MacHeaders from the MacHeaders.mcp project in the same folder.
1eaf1962 38
2b5f62a0 39If you want to build the carbon targets, you will also need the latest
f69fcd07 40carbonized version of MSL from Metrowerks, at the time of writing, this meant
2b5f62a0
VZ
41applying the changes from the folders:
42
1eaf1962
SC
43CodeWarrior Pro 5:Pre-Release:Carbon & MacOSX Development:Carbonized MSL and
44CodeWarrior Pro 5:Pre-Release:Carbon & MacOSX Development:Carbonized Runtimes
1ebfaf0c
SC
45(consult the file CodeWarrior Pro 5:Pre-Release:Carbon & MacOSX Development:Carbon & MacOSX README)
46
90838153
GD
47setup.h
48-------
49
f69fcd07
GD
50in order to build wxMac with CodeWarrior, you must copy or alias the file
51include/wx/mac/setup0.h to include/wx/setup.h.
90838153 52
f69fcd07
GD
53this step is not needed when using the Apple Developer Tools under Mac OS X
54since the setup.h file is automatically generated during the configuration.
90838153 55
0a67a93b
SC
56OpenGL
57------
58
f69fcd07
GD
59In order to build opengl support with CodeWarrior, you must install the opengl
60libraries and headers from http://developer.apple.com/opengl/index.html
90838153 61
f69fcd07
GD
62If you want OpenGL support with CodeWarrior, set wxUSE_OPENGL to 1 in
63include/wx/setup.h
0a67a93b 64
2b5f62a0
VZ
65If you don't want OpenGl support, set wxUSE_OPENGL to 0 (the
66default) and remove the file OpenGLLibraryStub from the project
67before compilation.
b9eed05d 68
f69fcd07
GD
69If 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.
0a67a93b 71
8d823dab
SC
72Project Files
73-------------
74
f69fcd07
GD
75The project files are stored as xml text files and converted to binary
76CodeWarrior 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
2b5f62a0 79 - *M7.xml -> *M7.mcp for CodeWarrior 7 and above.
b9eed05d 80
eb5420bf 81In order to build the library (and then the samples) you need to make the
2b5f62a0
VZ
82following projects (for CW 5.3, similar process for CW 7):
83
84:src:wxwindowsM5.mcp
f69fcd07
GD
85:src:png:pngM5.mcp
86:src:tiff:tiffM5.mcp
87:src:jpeg:jpegM5.mcp
88:src:zlib:zlibM5.mcp
89
2b5f62a0
VZ
90Note that if using CW 8 and above, when compiling the samples
91you may need to edit the target settings, click on Language
92Settings, C/++ Language and remove the forward slash at the
93start of /wx/wx_cw_d.h (or similar filename).
94
f69fcd07
GD
95AppleScript Files
96-----------------
97
a4411ee2
JS
98Several AppleScript files are provided in the docs:mac directory:
99
100 - M5xml2mcp.applescript to convert xml files to CodeWarrior 5 projects
101 - M5mcp2xml.applescript to convert CodeWarrior 5 projects to xml files
f69fcd07 102 - M5build.applescript to automatically build all samples/demos projects
a4411ee2
JS
103 - M8xml2mcp.applescript to convert xml files to CodeWarrior 8 projects
104 - M8mcp2xml.applescript to convert CodeWarrior 8 projects to xml files
105
106To run the XML to MCP conversion scripts:
107
108Double click on e.g. docs/mac/M8xml2mcp.applescript, then "run"
109the applescript and when asked for a folder pick src/. Then it
110takes a while to scan all dirs for the xml files and convert
111them to mcps. If some conversions fail it means an mcp already
112exists (back them up prior to running the script).
b9eed05d 113
6b9a6d77
DS
114Apple Developer Tools
115---------------------
b9eed05d 116
6b9a6d77
DS
117As in all Unix projects, you need to do something like this under MacOS X
118with the Apple Developer Tools installed:
b9eed05d 119
c5229494 1201) cd into the base dir
6b9a6d77
DS
1212) mkdir osx-build
1223) cd osx-build
b9eed05d
RR
1234) ../configure
1245) make
125
980550fc
DE
126If you want to install the library into the system directories you'll need
127to do this as root. The accepted way of running commands as root is to
128use the built-in sudo mechanism. First of all, you must be using an
129account marked as a "Computer Administrator". Then
b9eed05d 130
980550fc
DE
1316) sudo make install
1327) type <YOUR OWN PASSWORD>
133
134Note that while using this method is okay for development, it is not
135recommended that you require endusers to install wxWindows into their
136system directories in order to use your program. One way to avoid this
137is to configure wxWindows with --disable-shared. Another way to avoid
138it is to make a framework for wxWindows. Making frameworks is beyond
139the scope of this document.
b9eed05d 140
f69fcd07 141Note:
980550fc 142We recommend you configure a static library instead:
b9eed05d
RR
143
1444) ../configure --disable-shared
145
f69fcd07
GD
146or activate OpenGL:
147
1484) ../configure --with-opengl
b9eed05d 149
980550fc
DE
150Note:
151It is rarely desirable to install non-Apple software into system directories.
152By configuring the library with --disable-shared and using the full path
153to wx-config with the --in-place option you can avoid installing the library.
8d823dab 154
2e492c85
SC
155Problems with .xpm files
156------------------------
1ebfaf0c
SC
157
158if you have downloaded all the files and get errors like :
159
160Error : the file 'wx/generic/tip.xpm' cannot be opened
161tipdlg.cpp line 201 #include "wx/generic/tip.xpm"
162
f69fcd07
GD
163then your cvs has changed the type of the .xpm files to something other than
164text, in order to fix this either change the type by using a resource editor
165or drag the files from /include/wx/generic/..xpm on the SetTypeFromExtension
166application that is included in this folder. This small applet itself queries
167the Internet Config, so you will have to associate the "xpm" extension with
168CodeWarrior before making use of this applet.
2e492c85
SC
169
170Missing PLStringFuncsLib
171------------------------
172
b9eed05d 173You will have to build All Targets for MacOS Support:Libraries:Sources:PLStringFuncs:Glue:PLStringFuncsGlue.mcp
2b5f62a0 174