* 'make bundle' now copies the default theme files into the bundle.
* Common::File will now look inside the application bundle on MacOS X for a file if it can't find it anywhere else (so it'll find default-theme.ini and .zip) * Cleaned up some #ifs. svn-id: r21308
This commit is contained in:
parent
34b89a3258
commit
58eed3830b
5 changed files with 28 additions and 9 deletions
2
Makefile
2
Makefile
|
@ -94,6 +94,8 @@ bundle: scummvm-static
|
||||||
echo "APPL????" > $(bundle_name)/Contents/PkgInfo
|
echo "APPL????" > $(bundle_name)/Contents/PkgInfo
|
||||||
cp $(srcdir)/dists/macosx/Info.plist $(bundle_name)/Contents/
|
cp $(srcdir)/dists/macosx/Info.plist $(bundle_name)/Contents/
|
||||||
cp $(srcdir)/scummvm.icns $(bundle_name)/Contents/Resources/
|
cp $(srcdir)/scummvm.icns $(bundle_name)/Contents/Resources/
|
||||||
|
cp $(srcdir)/gui/themes/default-theme.ini $(bundle_name)/Contents/Resources/
|
||||||
|
cp $(srcdir)/gui/themes/default-theme.zip $(bundle_name)/Contents/Resources/
|
||||||
cp scummvm-static $(bundle_name)/Contents/MacOS/scummvm
|
cp scummvm-static $(bundle_name)/Contents/MacOS/scummvm
|
||||||
$(srcdir)/tools/credits.pl --rtf > $(bundle_name)/Contents/Resources/Credits.rtf
|
$(srcdir)/tools/credits.pl --rtf > $(bundle_name)/Contents/Resources/Credits.rtf
|
||||||
strip $(bundle_name)/Contents/MacOS/scummvm
|
strip $(bundle_name)/Contents/MacOS/scummvm
|
||||||
|
|
|
@ -23,6 +23,10 @@
|
||||||
#include "common/file.h"
|
#include "common/file.h"
|
||||||
#include "common/util.h"
|
#include "common/util.h"
|
||||||
|
|
||||||
|
#ifdef MACOSX
|
||||||
|
#include "CoreFoundation/CoreFoundation.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Common {
|
namespace Common {
|
||||||
|
|
||||||
StringList File::_defaultDirectories;
|
StringList File::_defaultDirectories;
|
||||||
|
@ -98,6 +102,24 @@ static FILE *fopenNoCase(const char *filename, const char *directory, const char
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// If all else fails, try looking inside the application bundle on MacOS for the lowercase file.
|
||||||
|
#ifdef MACOSX
|
||||||
|
if (!file) {
|
||||||
|
ptr = buf + offsetToFileName;
|
||||||
|
while (*ptr) {
|
||||||
|
*ptr = tolower(*ptr);
|
||||||
|
ptr++;
|
||||||
|
}
|
||||||
|
|
||||||
|
CFStringRef fileName = CFStringCreateWithBytes(NULL, (const UInt8 *)buf, strlen(buf), kCFStringEncodingASCII, false);
|
||||||
|
CFURLRef fileUrl = CFBundleCopyResourceURL(CFBundleGetMainBundle(), fileName, NULL, NULL);
|
||||||
|
if (fileUrl) {
|
||||||
|
if (CFURLGetFileSystemRepresentation(fileUrl, true, (UInt8 *)buf, sizeof(buf)))
|
||||||
|
file = fopen(buf, mode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return file;
|
return file;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,12 +36,10 @@ extern "C" {
|
||||||
// NOTE: if your compiler uses different mangled names, add another
|
// NOTE: if your compiler uses different mangled names, add another
|
||||||
// condition here
|
// condition here
|
||||||
|
|
||||||
#ifndef _WIN32
|
#if !defined(_WIN32) && !defined(MACOSX)
|
||||||
#ifndef MACOSX
|
|
||||||
#define RGBtoYUV _RGBtoYUV
|
#define RGBtoYUV _RGBtoYUV
|
||||||
#define LUT16to32 _LUT16to32
|
#define LUT16to32 _LUT16to32
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -28,11 +28,9 @@
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
||||||
#ifndef _WIN32
|
#if !defined(_WIN32) && !defined(MACOSX)
|
||||||
#ifndef MACOSX
|
|
||||||
#define hq2x_16 _hq2x_16
|
#define hq2x_16 _hq2x_16
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
void hq2x_16(const byte *, byte *, uint32, uint32, uint32, uint32);
|
void hq2x_16(const byte *, byte *, uint32, uint32, uint32, uint32);
|
||||||
|
|
||||||
|
|
|
@ -28,11 +28,10 @@
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
||||||
#ifndef _WIN32
|
#if !defined(_WIN32) && !defined(MACOSX)
|
||||||
#ifndef MACOSX
|
|
||||||
#define hq3x_16 _hq3x_16
|
#define hq3x_16 _hq3x_16
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
void hq3x_16(const byte *, byte *, uint32, uint32, uint32, uint32);
|
void hq3x_16(const byte *, byte *, uint32, uint32, uint32, uint32);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue