Changes between Version 9 and Version 10 of MacBuild
- Timestamp:
- Aug 2, 2007, 5:02:05 PM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MacBuild
v9 v10 244 244 === Adding a Finder icon to your application === 245 245 246 There is an optional API `setMacIcon()` in the `libboinc_api.a` library. This allows science 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:246 There is an optional API `setMacIcon()` in the `libboinc_api.a` library. This allows science 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: 247 247 248 248 * Use '/Developer/Applications/utilities/Icon Composer.app' to create a xxx.icns file. (Use any name you wish instead of xxx.) 249 249 * Convert the xxx.icns file to an app_icon.h file as follows: in Terminal, run: 250 251 250 {{{ 252 251 {path}/MakeAppIcon_h {source_file_path}/xxx.icns {dest_file_path}/app_icon.h 253 252 }}} 254 255 253 (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 science application's project. 256 254 * In the science application's main(), add 257 258 255 {{{ 259 256 #include "app_icon.h" 260 257 }}} 261 262 258 and call: 263 264 259 {{{ 265 260 setMacIcon(argv[0], MacAppIconData, sizeof(MacAppIconData));