Merge branch 'master' of http://github.com/ardekantur/openmw
commit
2ec96ed7de
@ -1,8 +1,34 @@
|
||||
#include "fileops.hpp"
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
#include <string>
|
||||
|
||||
bool isFile(const char *name)
|
||||
{
|
||||
boost::filesystem::path cfg_file_path(name);
|
||||
return boost::filesystem::exists(cfg_file_path);
|
||||
}
|
||||
|
||||
#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
|
||||
std::string macBundlePath()
|
||||
{
|
||||
char path[1024];
|
||||
CFBundleRef mainBundle = CFBundleGetMainBundle();
|
||||
assert(mainBundle);
|
||||
|
||||
CFURLRef mainBundleURL = CFBundleCopyBundleURL(mainBundle);
|
||||
assert(mainBundleURL);
|
||||
|
||||
CFStringRef cfStringRef = CFURLCopyFileSystemPath(mainBundleURL, kCFURLPOSIXPathStyle);
|
||||
assert(cfStringRef);
|
||||
|
||||
CFStringGetCString(cfStringRef, path, 1024, kCFStringEncodingASCII);
|
||||
|
||||
CFRelease(mainBundleURL);
|
||||
CFRelease(cfStringRef);
|
||||
|
||||
return std::string(path);
|
||||
}
|
||||
#endif
|
||||
|
@ -1,7 +1,13 @@
|
||||
#ifndef __FILEOPS_H_
|
||||
#define __FILEOPS_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
/// Check if a given path is an existing file (not a directory)
|
||||
bool isFile(const char *name);
|
||||
|
||||
#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
|
||||
std::string macBundlePath();
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>OpenMW.icns</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>openmw</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleLongVersionString</key>
|
||||
<string></string>
|
||||
<key>CFBundleName</key>
|
||||
<string>OpenMW</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>0.07</string>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
<key>LSRequiresCarbon</key>
|
||||
<true/>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
Binary file not shown.
Loading…
Reference in New Issue