Fix build using gcc under OS X 10.8

* Change the default SDK from OS X 10.6 to 10.7.
   The 10.6 SDK is no longer bundled with the current version of XCode

 * Add explicit casts for permissions value

MD-18896
Reviewed-by: Carles Pina
This commit is contained in:
Robert Knight 2012-10-26 15:07:55 +01:00
parent 932cddfb77
commit 9823b70c5a
3 changed files with 4 additions and 4 deletions

View File

@ -40,7 +40,7 @@ if (APPLE)
# Set the SDK which the updater is built against.
# The available SDK versions are those which exist in /Developer/SDKs/
set(CMAKE_OSX_SDK 10.6)
set(CMAKE_OSX_SDK 10.7)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")
set(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX${CMAKE_OSX_SDK}.sdk")

View File

@ -120,7 +120,7 @@ int FileUtils::fileMode(const char* path) throw (IOException)
void FileUtils::chmod(const char* path, int mode) throw (IOException)
{
#ifdef PLATFORM_UNIX
if (::chmod(path,mode) != 0)
if (::chmod(path,static_cast<mode_t>(mode)) != 0)
{
throw IOException("Failed to set permissions on " + std::string(path) + " to " + intToStr(mode));
}

View File

@ -31,10 +31,10 @@ void MacBundle::create(const std::string& infoPlist,
FileUtils::mkpath(binDir.c_str());
// create the Contents/Info.plist file
FileUtils::writeFile((contentDir + "/Info.plist").c_str(),infoPlist.c_str(),infoPlist.size());
FileUtils::writeFile((contentDir + "/Info.plist").c_str(),infoPlist.c_str(),static_cast<int>(infoPlist.size()));
// save the icon to Contents/Resources/<appname>.icns
FileUtils::writeFile((resourceDir + '/' + m_appName + ".icns").c_str(),icon.c_str(),icon.size());
FileUtils::writeFile((resourceDir + '/' + m_appName + ".icns").c_str(),icon.c_str(),static_cast<int>(icon.size()));
// copy the app binary to Contents/MacOS/<appname>
m_exePath = binDir + '/' + m_appName;