| 194 | == Upgrading applications for version 6 graphics == |
| 195 | |
| 196 | One of the major changes in BOINC for version 6 is that applications are now expected to generate graphics in a separate executable. The graphics application typically communicates with the worker application using shared memory. |
| 197 | |
| 198 | For additional information, please see [milestone:6.0 the 6.0 roadmap] and the [GraphicsApi Graphics API] page. |
| 199 | |
| 200 | == Adding a Finder icon to your graphics application == |
| 201 | |
| 202 | There is an optional API `setMacIcon()` in the `libboinc_api.a` library. This allows science graphics applications to display an application icon in the Dock and in the Finder. (The icon does not appear in the Dock until the application displays graphics.) To implement this, do the following: |
| 203 | |
| 204 | * Use '/Developer/Applications/utilities/Icon Composer.app' to create a xxx.icns file. (Use any name you wish instead of xxx.) |
| 205 | * Convert the xxx.icns file to an app_icon.h file as follows: in Terminal, run: |
| 206 | {{{ |
| 207 | {path}/MakeAppIcon_h {source_file_path}/xxx.icns {dest_file_path}/app_icon.h |
| 208 | }}} |
| 209 | (The !MakeAppIcon_h command-line utility is built by the Mac boinc XCode project in the 'boinc/mac_build/build/' directory.) Add the app_icon.h file to your graphics application's project. |
| 210 | * In the graphics application's main(), add |
| 211 | {{{ |
| 212 | #include "app_icon.h" |
| 213 | }}} |
| 214 | and call: |
| 215 | {{{ |
| 216 | setMacIcon(argv[0], MacAppIconData, sizeof(MacAppIconData)); |
| 217 | }}} |
| 218 | * The graphics application must link with Carbon.framework to use setMacIcon(). |
| 219 | |