mirror of
https://github.com/etlegacy/Update-Installer.git
synced 2024-11-10 06:31:49 +00:00
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:
parent
932cddfb77
commit
9823b70c5a
3 changed files with 4 additions and 4 deletions
|
@ -40,7 +40,7 @@ if (APPLE)
|
||||||
|
|
||||||
# Set the SDK which the updater is built against.
|
# Set the SDK which the updater is built against.
|
||||||
# The available SDK versions are those which exist in /Developer/SDKs/
|
# 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_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")
|
||||||
set(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX${CMAKE_OSX_SDK}.sdk")
|
set(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX${CMAKE_OSX_SDK}.sdk")
|
||||||
|
|
|
@ -120,7 +120,7 @@ int FileUtils::fileMode(const char* path) throw (IOException)
|
||||||
void FileUtils::chmod(const char* path, int mode) throw (IOException)
|
void FileUtils::chmod(const char* path, int mode) throw (IOException)
|
||||||
{
|
{
|
||||||
#ifdef PLATFORM_UNIX
|
#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));
|
throw IOException("Failed to set permissions on " + std::string(path) + " to " + intToStr(mode));
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,10 +31,10 @@ void MacBundle::create(const std::string& infoPlist,
|
||||||
FileUtils::mkpath(binDir.c_str());
|
FileUtils::mkpath(binDir.c_str());
|
||||||
|
|
||||||
// create the Contents/Info.plist file
|
// 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
|
// 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>
|
// copy the app binary to Contents/MacOS/<appname>
|
||||||
m_exePath = binDir + '/' + m_appName;
|
m_exePath = binDir + '/' + m_appName;
|
||||||
|
|
Loading…
Reference in a new issue