source:
trunk/config.tests/mac/xcodeversion.cpp@
353
Last change on this file since 353 was 2, checked in by , 16 years ago | |
---|---|
File size: 1.4 KB |
Line | |
---|---|
1 | #include <stdlib.h> |
2 | #include <stdio.h> |
3 | #include <CoreFoundation/CoreFoundation.h> |
4 | #include <Carbon/Carbon.h> |
5 | |
6 | int success = 0; |
7 | int fail = 1; |
8 | int internal_error = success; // enable dwarf on internal errors |
9 | |
10 | int main(int argc, const char **argv) |
11 | { |
12 | CFURLRef cfurl; |
13 | OSStatus err = LSFindApplicationForInfo(0, CFSTR("com.apple.Xcode"), 0, 0, &cfurl); |
14 | if (err != noErr) |
15 | return internal_error; |
16 | |
17 | CFBundleRef bundle = CFBundleCreate(0, cfurl); |