]>
Commit | Line | Data |
---|---|---|
2b5f62a0 VZ |
1 | Installing and compiling wxMac |
2 | ============================================================ | |
3 | ||
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 Developers Tools' below for more details on using | |
9 | configure. | |
10 | ||
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. | |
16 | ||
2e492c85 SC |
17 | Installing latest headers (and Carbon Support) |
18 | ---------------------------------------------- | |
19 | ||
2b5f62a0 VZ |
20 | NOTE: these steps are not necessary for CW Pro 6 and above, |
21 | only for CW Pro 5.3. | |
8d823dab | 22 | |
2b5f62a0 | 23 | The latest build for carbon support leads to a few changes you will have to |
f69fcd07 | 24 | follow, in order to successfully compile the code (also necessary if you don't |
2b5f62a0 VZ |
25 | want to build the carbon targets). |
26 | ||
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. | |
f9e45bd7 | 33 | 5. 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 | 37 | 6. rebuild all MacHeaders from the MacHeaders.mcp project in the same folder. |
1eaf1962 | 38 | |
2b5f62a0 | 39 | If you want to build the carbon targets, you will also need the latest |
f69fcd07 | 40 | carbonized version of MSL from Metrowerks, at the time of writing, this meant |
2b5f62a0 VZ |
41 | applying the changes from the folders: |
42 | ||
1eaf1962 SC |
43 | CodeWarrior Pro 5:Pre-Release:Carbon & MacOSX Development:Carbonized MSL and |
44 | CodeWarrior 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 |
47 | setup.h |
48 | ------- | |
49 | ||
f69fcd07 GD |
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. | |
90838153 | 52 | |
f69fcd07 GD |
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. | |
90838153 | 55 | |
0a67a93b SC |
56 | OpenGL |
57 | ------ | |
58 | ||
f69fcd07 GD |
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 | |
90838153 | 61 | |
f69fcd07 GD |
62 | If you want OpenGL support with CodeWarrior, set wxUSE_OPENGL to 1 in |
63 | include/wx/setup.h | |
0a67a93b | 64 | |
2b5f62a0 VZ |
65 | If you don't want OpenGl support, set wxUSE_OPENGL to 0 (the |
66 | default) and remove the file OpenGLLibraryStub from the project | |
67 | before compilation. | |
b9eed05d | 68 | |
f69fcd07 GD |
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. | |
0a67a93b | 71 | |
8d823dab SC |
72 | Project Files |
73 | ------------- | |
74 | ||
f69fcd07 GD |
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 | |
2b5f62a0 | 79 | - *M7.xml -> *M7.mcp for CodeWarrior 7 and above. |
b9eed05d | 80 | |
eb5420bf | 81 | In order to build the library (and then the samples) you need to make the |
2b5f62a0 VZ |
82 | following 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 |
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). | |
94 | ||
f69fcd07 GD |
95 | AppleScript Files |
96 | ----------------- | |
97 | ||
98 | Several AppleScript files are provided in the docs:mac directory (currently | |
99 | only for CodeWarrior 5.3 related projects): | |
100 | - M5xml2mcp.applescript to convert xml files to CodeWarrior projects | |
101 | - M5mcp2xml.applescript to convert CodeWarrior projects to xml files | |
102 | - M5build.applescript to automatically build all samples/demos projects | |
b9eed05d RR |
103 | |
104 | Apple Developers Tools | |
105 | ---------------------- | |
106 | ||
f69fcd07 GD |
107 | As in all Unix projects, you need to do something like this under MacOS 10.1 |
108 | with the Apple Developers Tools installed: | |
b9eed05d | 109 | |
c5229494 | 110 | 1) cd into the base dir |
b9eed05d RR |
111 | 2) mkdir build |
112 | 3) cd build | |
113 | 4) ../configure | |
114 | 5) make | |
115 | ||
f69fcd07 GD |
116 | If you want to install the library, you need to be able to log in as "root". |
117 | For this, "root" has to be activated in the NetInfo utility - there you will | |
118 | also have to choose a password for the "root" user. Then | |
b9eed05d RR |
119 | |
120 | 6) su | |
121 | 7) type <PASSWORD> | |
122 | 8) make install | |
123 | 9) exit | |
124 | ||
f69fcd07 GD |
125 | Note: |
126 | You might want to configure a static library instead: | |
b9eed05d RR |
127 | |
128 | 4) ../configure --disable-shared | |
129 | ||
f69fcd07 GD |
130 | or activate OpenGL: |
131 | ||
132 | 4) ../configure --with-opengl | |
b9eed05d | 133 | |
8d823dab | 134 | |
2e492c85 SC |
135 | Problems with .xpm files |
136 | ------------------------ | |
1ebfaf0c SC |
137 | |
138 | if you have downloaded all the files and get errors like : | |
139 | ||
140 | Error : the file 'wx/generic/tip.xpm' cannot be opened | |
141 | tipdlg.cpp line 201 #include "wx/generic/tip.xpm" | |
142 | ||
f69fcd07 GD |
143 | then your cvs has changed the type of the .xpm files to something other than |
144 | text, in order to fix this either change the type by using a resource editor | |
145 | or drag the files from /include/wx/generic/..xpm on the SetTypeFromExtension | |
146 | application that is included in this folder. This small applet itself queries | |
147 | the Internet Config, so you will have to associate the "xpm" extension with | |
148 | CodeWarrior before making use of this applet. | |
2e492c85 SC |
149 | |
150 | Missing PLStringFuncsLib | |
151 | ------------------------ | |
152 | ||
b9eed05d | 153 | You will have to build All Targets for MacOS Support:Libraries:Sources:PLStringFuncs:Glue:PLStringFuncsGlue.mcp |
2b5f62a0 | 154 |