Permalink
Browse files

common: fix non-apple builds

Signed-off-by: Tim Blechmann <tim@klingt.org>
  • Loading branch information...
1 parent 9606569 commit 3dd2773c1cb634717938adae9207a9af7d76f81e @timblechmann timblechmann committed Jun 23, 2012
Showing with 15 additions and 15 deletions.
  1. +15 −15 common/SC_DirUtils.cpp
View
@@ -227,6 +227,21 @@ void sc_GetResourceDirectory(char* pathBuf, int length)
SC_StandAloneInfo::GetResourceDir(pathBuf, length);
}
+void sc_AppendBundleName(char *str, int size)
+{
+ CFBundleRef mainBundle;
+ mainBundle = CFBundleGetMainBundle();
+ CFDictionaryRef dictRef = CFBundleGetInfoDictionary(mainBundle);
+ CFStringRef strRef;
+ strRef = (CFStringRef)CFDictionaryGetValue(dictRef, CFSTR("CFBundleName"));
+ if(!mainBundle || !strRef){
+ sc_AppendToPath(str, size, "SuperCollider");
+ } else {
+ const char *bundleName = CFStringGetCStringPtr(strRef, kCFStringEncodingMacRoman);
+ sc_AppendToPath(str, size, bundleName);
+ }
+}
+
#elif defined(SC_IPHONE)
bool sc_IsStandAlone()
@@ -277,21 +292,6 @@ void sc_GetResourceDirectory(char* pathBuf, int length)
#endif
-void sc_AppendBundleName(char *str, int size)
-{
- CFBundleRef mainBundle;
- mainBundle = CFBundleGetMainBundle();
- CFDictionaryRef dictRef = CFBundleGetInfoDictionary(mainBundle);
- CFStringRef strRef;
- strRef = (CFStringRef)CFDictionaryGetValue(dictRef, CFSTR("CFBundleName"));
- if(!mainBundle || !strRef){
- sc_AppendToPath(str, size, "SuperCollider");
- } else {
- const char *bundleName = CFStringGetCStringPtr(strRef, kCFStringEncodingMacRoman);
- sc_AppendToPath(str, size, bundleName);
- }
-}
-
// Support for Extensions
// Get the user home directory.

0 comments on commit 3dd2773

Please sign in to comment.