MeVisLabToolboxReference
|
00001 // **InsertLicense** code author="Felix Ritter" version="1.0" 00002 00006 00007 #ifndef __macBundle_H 00008 #define __macBundle_H 00009 #if defined(__APPLE__) 00010 00011 #include <string> 00012 00013 namespace macx { 00014 00016 class Bundle 00017 { 00018 public: 00019 00021 static std::string getBundleName(const std::string &bundlePath = std::string()); 00022 00024 static std::string getBundleDirectory(const std::string &id = std::string()); 00025 00027 static std::string getBundleDirectoryOfSubDirectory(const std::string &path); 00028 00030 static std::string getBundleDirectoryPreferUmbrellaBundle(); 00031 00033 static std::string getUmbrellaBundleDirectory(); 00034 00036 static std::string getBundleResourcesDirectory(const std::string &bundlePath = std::string()); 00037 00039 static std::string getBundlePrivateFrameworksDirectory(const std::string &bundlePath = std::string()); 00040 00042 static std::string getBundleSharedSupportDirectory(const std::string &bundlePath = std::string()); 00043 00045 static std::string getBundleId(const std::string &bundlePath = std::string()); 00046 00048 static std::string getBundleExecutable(const std::string &bundlePath = std::string()); 00049 00051 static std::string getSupportAppWithName(const std::string &appName, const std::string &bundlePath = std::string()); 00052 00054 static std::string getSupportAppWithId(const std::string &id, const std::string &bundlePath = std::string()); 00055 00057 static bool isApplicationBundle(const std::string &filePath); 00058 00060 static std::string getStringForInfoDictionaryKey(const std::string &key, const std::string &bundlePath = std::string()); 00061 00063 00069 static bool isSystemVersionSufficientForBundle(const std::string &minimumSystemVersionInfoDictKey = "MLMinimumSystemVersion", 00070 bool displaySoftwareUpdateDialog = true); 00071 }; 00072 00073 } 00074 00075 #endif // __APPLE__ 00076 #endif // __macBundle_H