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