macOS: officially upgrade to 10.9 libraries from lib/darwin.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Thu, 28 Sep 2017 18:52:22 +0000 (20:52 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Thu, 28 Sep 2017 18:53:06 +0000 (20:53 +0200)
This removes a bunch of code that is no longer needed, and running
"make update" will now automatically download the new libraries.

Differential Revision: https://developer.blender.org/D2861

CMakeLists.txt
GNUmakefile
build_files/buildbot/master.cfg
build_files/cmake/platform/platform_apple.cmake
build_files/cmake/platform/platform_apple_xcode.cmake
intern/ghost/intern/GHOST_SystemCocoa.mm
intern/ghost/intern/GHOST_WindowCocoa.h
intern/ghost/intern/GHOST_WindowCocoa.mm
source/creator/CMakeLists.txt

index 6f43049..1bb514b 100644 (file)
@@ -500,7 +500,12 @@ endif()
 # Experimental support of C11 and C++11
 #
 # We default options to whatever default standard in the current compiler.
-if(CMAKE_COMPILER_IS_GNUCC AND (NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "6.0") AND (NOT WITH_CXX11))
+if(APPLE)
+       set(_c11_init ON)
+       set(_cxx11_init ON)
+       set(WITH_C11 ON)
+       set(WITH_CXX11 ON)
+elseif(CMAKE_COMPILER_IS_GNUCC AND (NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "6.0") AND (NOT WITH_CXX11))
        set(_c11_init ON)
        set(_cxx11_init ON)
 else()
index d1e575c..f220e2f 100644 (file)
@@ -419,10 +419,15 @@ icons: .FORCE
        "$(BLENDER_DIR)/release/datafiles/prvicons_update.py"
 
 update: .FORCE
+       if [ "$(OS_NCASE)" == "darwin" ] && [ ! -d "../lib/$(OS_NCASE)" ]; then \
+               svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/$(OS_NCASE) ../lib/$(OS_NCASE) ; \
+       fi
        if [ -d "../lib" ]; then \
+               svn cleanup ../lib/* ; \
                svn update ../lib/* ; \
        fi
-       git pull --rebase
+       git submodule update --init --recursive
+       git submodule foreach git checkout master
        git submodule foreach git pull --rebase origin master
 
 
index dad7f1e..d5be6e1 100644 (file)
@@ -312,7 +312,7 @@ def generic_builder(id, libdir='', branch='', rsync=False):
 
 # Builders
 
-add_builder(c, 'mac_x86_64_10_6_cmake', 'darwin-9.x.universal', generic_builder, hour=1)
+add_builder(c, 'mac_x86_64_10_6_cmake', 'darwin', generic_builder, hour=1)
 add_builder(c, 'linux_glibc219_i686_cmake', '', generic_builder, hour=2)
 add_builder(c, 'linux_glibc219_x86_64_cmake', '', generic_builder, hour=1)
 add_builder(c, 'win32_cmake_vc2013', 'windows_vc12', generic_builder, hour=1)
index d067077..a08f94e 100644 (file)
@@ -28,11 +28,7 @@ macro(find_package_wrapper)
 endmacro()
 
 if(NOT DEFINED LIBDIR)
-       if(WITH_CXX11)
-               set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin)
-       else()
-               set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-9.x.universal)
-       endif()
+       set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin)
 else()
        message(STATUS "Using pre-compiled LIBDIR: ${LIBDIR}")
 endif()
@@ -93,11 +89,7 @@ if(WITH_PYTHON)
                # normally cached but not since we include them with blender
                set(PYTHON_INCLUDE_DIR "${LIBDIR}/python/include/python${PYTHON_VERSION}m")
                set(PYTHON_EXECUTABLE "${LIBDIR}/python/bin/python${PYTHON_VERSION}m")
-               if(WITH_CXX11)
-                       set(PYTHON_LIBRARY ${LIBDIR}/python/lib/libpython${PYTHON_VERSION}m.a)
-               else()
-                       set(PYTHON_LIBRARY python${PYTHON_VERSION}m)
-               endif()
+               set(PYTHON_LIBRARY ${LIBDIR}/python/lib/libpython${PYTHON_VERSION}m.a)
                set(PYTHON_LIBPATH "${LIBDIR}/python/lib/python${PYTHON_VERSION}")
                # set(PYTHON_LINKFLAGS "-u _PyMac_Error")  # won't  build with this enabled
        else()
@@ -148,11 +140,7 @@ if(WITH_IMAGE_OPENEXR)
        set(OPENEXR ${LIBDIR}/openexr)
        set(OPENEXR_INCLUDE_DIR ${OPENEXR}/include)
        set(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR} ${OPENEXR}/include/OpenEXR)
-       if(WITH_CXX11)
-               set(OPENEXR_POSTFIX -2_2)
-       else()
-               set(OPENEXR_POSTFIX)
-       endif()
+       set(OPENEXR_POSTFIX -2_2)
        set(OPENEXR_LIBRARIES
                Iex${OPENEXR_POSTFIX}
                Half
@@ -169,20 +157,16 @@ if(WITH_CODEC_FFMPEG)
                avcodec avdevice avformat avutil
                mp3lame swscale x264 xvidcore theora theoradec theoraenc vorbis vorbisenc vorbisfile ogg
        )
-       if(WITH_CXX11)
-               set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} schroedinger orc vpx webp swresample)
-       endif()
+       set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} schroedinger orc vpx webp swresample)
        set(FFMPEG_LIBPATH ${FFMPEG}/lib)
 endif()
 
 if(WITH_OPENJPEG OR WITH_CODEC_FFMPEG)
        # use openjpeg from libdir that is linked into ffmpeg
-       if(WITH_CXX11)
-               set(OPENJPEG ${LIBDIR}/openjpeg)
-               set(WITH_SYSTEM_OPENJPEG ON)
-               set(OPENJPEG_INCLUDE_DIRS ${OPENJPEG}/include)
-               set(OPENJPEG_LIBRARIES ${OPENJPEG}/lib/libopenjpeg.a)
-       endif()
+       set(OPENJPEG ${LIBDIR}/openjpeg)
+       set(WITH_SYSTEM_OPENJPEG ON)
+       set(OPENJPEG_INCLUDE_DIRS ${OPENJPEG}/include)
+       set(OPENJPEG_LIBRARIES ${OPENJPEG}/lib/libopenjpeg.a)
 endif()
 
 find_library(SYSTEMSTUBS_LIBRARY
@@ -200,11 +184,7 @@ set(PLATFORM_LINKFLAGS
        "-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Cocoa -framework Carbon -framework AudioUnit -framework AudioToolbox -framework CoreAudio"
 )
 
-if(WITH_CXX11)
-       list(APPEND PLATFORM_LINKLIBS c++)
-else()
-       list(APPEND PLATFORM_LINKLIBS stdc++)
-endif()
+list(APPEND PLATFORM_LINKLIBS c++)
 
 if(WITH_JACK)
        set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -F/Library/Frameworks -weak_framework jackmp")
@@ -255,11 +235,7 @@ if(WITH_SDL)
        set(SDL_INCLUDE_DIR ${SDL}/include)
        set(SDL_LIBRARY SDL2)
        set(SDL_LIBPATH ${SDL}/lib)
-       if(WITH_CXX11)
-               set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -framework ForceFeedback")
-       else()
-               set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -lazy_framework ForceFeedback")
-       endif()
+       set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -framework ForceFeedback")
 endif()
 
 set(PNG "${LIBDIR}/png")
@@ -280,11 +256,7 @@ endif()
 if(WITH_BOOST)
        set(BOOST ${LIBDIR}/boost)
        set(BOOST_INCLUDE_DIR ${BOOST}/include)
-       if(WITH_CXX11)
-               set(BOOST_POSTFIX)
-       else()
-               set(BOOST_POSTFIX -mt)
-       endif()
+       set(BOOST_POSTFIX)
        set(BOOST_LIBRARIES
                boost_date_time${BOOST_POSTFIX}
                boost_filesystem${BOOST_POSTFIX}
@@ -321,9 +293,7 @@ if(WITH_OPENIMAGEIO)
                ${OPENEXR_LIBRARIES}
                ${ZLIB_LIBRARIES}
        )
-       if(WITH_CXX11)
-               set(OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARIES} ${LIBDIR}/ffmpeg/lib/libwebp.a)
-       endif()
+       set(OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARIES} ${LIBDIR}/ffmpeg/lib/libwebp.a)
        set(OPENIMAGEIO_LIBPATH
                ${OPENIMAGEIO}/lib
                ${JPEG_LIBPATH}
@@ -461,10 +431,8 @@ set(PLATFORM_LINKFLAGS
        "${PLATFORM_LINKFLAGS} -Xlinker -unexported_symbols_list -Xlinker ${CMAKE_SOURCE_DIR}/source/creator/osx_locals.map"
 )
 
-if(WITH_CXX11)
-       set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
-       set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -stdlib=libc++")
-endif()
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
+set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -stdlib=libc++")
 
 # Suppress ranlib "has no symbols" warnings (workaround for T48250)
 set(CMAKE_C_ARCHIVE_CREATE   "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
index c380bfb..8bb08b5 100644 (file)
@@ -101,21 +101,14 @@ if(OSX_SYSTEM MATCHES 10.9)
        set(CMAKE_FIND_ROOT_PATH ${CMAKE_OSX_SYSROOT})
 endif()
 
-if(WITH_CXX11)
-       # 10.9 is our min. target, if you use higher sdk, weak linking happens
-       if(CMAKE_OSX_DEPLOYMENT_TARGET)
-               if(${CMAKE_OSX_DEPLOYMENT_TARGET} VERSION_LESS 10.9)
-                       message(STATUS "Setting deployment target to 10.9, lower versions are incompatible with WITH_CXX11")
-                       set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "" FORCE)
-               endif()
-       else()
+# 10.9 is our min. target, if you use higher sdk, weak linking happens
+if(CMAKE_OSX_DEPLOYMENT_TARGET)
+       if(${CMAKE_OSX_DEPLOYMENT_TARGET} VERSION_LESS 10.9)
+               message(STATUS "Setting deployment target to 10.9, lower versions are incompatible with WITH_CXX11")
                set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "" FORCE)
        endif()
 else()
-       if(NOT CMAKE_OSX_DEPLOYMENT_TARGET)
-               # 10.6 is our min. target, if you use higher sdk, weak linking happens
-               set(CMAKE_OSX_DEPLOYMENT_TARGET "10.6" CACHE STRING "" FORCE)
-       endif()
+       set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "" FORCE)
 endif()
 
 if(NOT ${CMAKE_GENERATOR} MATCHES "Xcode")
index 4582dfb..42ccfb0 100644 (file)
@@ -1254,27 +1254,6 @@ bool GHOST_SystemCocoa::handleTabletEvent(void *eventPtr)
        }
 }
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED < 1070
-enum {
-       NSEventPhaseNone = 0,
-       NSEventPhaseBegan = 0x1 << 0,
-       NSEventPhaseStationary = 0x1 << 1,
-       NSEventPhaseChanged = 0x1 << 2,
-       NSEventPhaseEnded = 0x1 << 3,
-       NSEventPhaseCancelled = 0x1 << 4,
-};
-typedef NSUInteger NSEventPhase;
-
-@interface NSEvent (AvailableOn1070AndLater)
-- (BOOL)hasPreciseScrollingDeltas;
-- (CGFloat)scrollingDeltaX;
-- (CGFloat)scrollingDeltaY;
-- (NSEventPhase)momentumPhase;
-- (BOOL)isDirectionInvertedFromDevice;
-- (NSEventPhase)phase;
-@end
-#endif
-
 GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
 {
        NSEvent *event = (NSEvent *)eventPtr;
@@ -1459,7 +1438,6 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
                                        double dx;
                                        double dy;
 
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
                                        /* with 10.7 nice scrolling deltas are supported */
                                        dx = [event scrollingDeltaX];
                                        dy = [event scrollingDeltaY];
@@ -1469,29 +1447,6 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
                                                dx = [event deltaX];
                                                dy = [event deltaY];
                                        }
-#else
-                                       /* trying to pretend you have nice scrolls... */
-                                       dx = [event deltaX];
-                                       dy = -[event deltaY];
-                                       const double deltaMax = 50.0;
-
-                                       if ((dx == 0) && (dy == 0)) break;
-
-                                       /* Quadratic acceleration */
-                                       dx = dx*(fabs(dx) + 0.5);
-                                       if (dx < 0.0) dx -= 0.5;
-                                       else          dx += 0.5;
-                                       if      (dx < -deltaMax) dx = -deltaMax;
-                                       else if (dx >  deltaMax) dx =  deltaMax;
-
-                                       dy = dy*(fabs(dy) + 0.5);
-                                       if (dy < 0.0) dy -= 0.5;
-                                       else          dy += 0.5;
-                                       if      (dy < -deltaMax) dy= -deltaMax;
-                                       else if (dy >  deltaMax) dy=  deltaMax;
-
-                                       dy = -dy;
-#endif
                                        window->clientToScreenIntern(mousePos.x, mousePos.y, x, y);
 
                                        pushEvent(new GHOST_EventTrackpad([event timestamp] * 1000, window, GHOST_kTrackpadEventScroll, x, y, dx, dy));
index 5168c48..9dbc85d 100644 (file)
@@ -303,8 +303,6 @@ protected:
 
        GHOST_TabletData m_tablet;
 
-       bool m_lionStyleFullScreen;
-
        bool m_immediateDraw;
        bool m_debug_context; // for debug messages during context setup
 };
index 73c89f9..20060ac 100644 (file)
 
 #include <sys/sysctl.h>
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED < 1070
-/* Lion style fullscreen support when building with the 10.6 SDK */
-enum {
-       NSWindowCollectionBehaviorFullScreenPrimary = 1 << 7,
-       NSFullScreenWindowMask = 1 << 14
-};
-#endif
-
 #pragma mark Cocoa window delegate object
 
 @interface CocoaWindowDelegate : NSObject
@@ -511,14 +503,6 @@ enum {
 
 #pragma mark initialization / finalization
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED < 1070
-@interface NSView (NSOpenGLSurfaceResolution)
-- (BOOL)wantsBestResolutionOpenGLSurface;
-- (void)setWantsBestResolutionOpenGLSurface:(BOOL)flag;
-- (NSRect)convertRectToBacking:(NSRect)bounds;
-@end
-#endif
-
 GHOST_WindowCocoa::GHOST_WindowCocoa(
        GHOST_SystemCocoa *systemCocoa,
        const STR_String& title,
@@ -537,7 +521,6 @@ GHOST_WindowCocoa::GHOST_WindowCocoa(
        m_systemCocoa = systemCocoa;
        m_fullScreen = false;
        m_immediateDraw = false;
-       m_lionStyleFullScreen = false;
 
        NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
        
@@ -613,16 +596,6 @@ GHOST_WindowCocoa::GHOST_WindowCocoa(
        if (state == GHOST_kWindowStateFullScreen)
                setState(GHOST_kWindowStateFullScreen);
 
-       // Starting with 10.9 (darwin 13.x.x), we can use Lion fullscreen,
-       // since it now has better multi-monitor support
-       // if the screens are spawned, additional screens get useless,
-       // so we only use lionStyleFullScreen when screens have separate spaces
-       
-       if ([NSScreen respondsToSelector:@selector(screensHaveSeparateSpaces)] && [NSScreen screensHaveSeparateSpaces]) {
-               // implies we are on >= OSX 10.9
-               m_lionStyleFullScreen = true;
-       }
-       
        [pool drain];
 }
 
@@ -760,28 +733,18 @@ void GHOST_WindowCocoa::getClientBounds(GHOST_Rect& bounds) const
        
        NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
        
-       if (!m_fullScreen) {
-               NSRect screenSize = [[m_window screen] visibleFrame];
+       NSRect screenSize = [[m_window screen] visibleFrame];
 
-               //Max window contents as screen size (excluding title bar...)
-               NSRect contentRect = [CocoaWindow contentRectForFrameRect:screenSize
-                                     styleMask:(NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | NSResizableWindowMask)];
+       //Max window contents as screen size (excluding title bar...)
+       NSRect contentRect = [CocoaWindow contentRectForFrameRect:screenSize
+                                                 styleMask:(NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | NSResizableWindowMask)];
 
-               rect = [m_window contentRectForFrameRect:[m_window frame]];
-               
-               bounds.m_b = contentRect.size.height - (rect.origin.y -contentRect.origin.y);
-               bounds.m_l = rect.origin.x -contentRect.origin.x;
-               bounds.m_r = rect.origin.x-contentRect.origin.x + rect.size.width;
-               bounds.m_t = contentRect.size.height - (rect.origin.y + rect.size.height -contentRect.origin.y);
-       }
-       else {
-               NSRect screenSize = [[m_window screen] frame];
-               
-               bounds.m_b = screenSize.origin.y + screenSize.size.height;
-               bounds.m_l = screenSize.origin.x;
-               bounds.m_r = screenSize.origin.x + screenSize.size.width;
-               bounds.m_t = screenSize.origin.y;
-       }
+       rect = [m_window contentRectForFrameRect:[m_window frame]];
+       
+       bounds.m_b = contentRect.size.height - (rect.origin.y -contentRect.origin.y);
+       bounds.m_l = rect.origin.x -contentRect.origin.x;
+       bounds.m_r = rect.origin.x-contentRect.origin.x + rect.size.width;
+       bounds.m_t = contentRect.size.height - (rect.origin.y + rect.size.height -contentRect.origin.y);
        [pool drain];
 }
 
@@ -856,9 +819,6 @@ GHOST_TWindowState GHOST_WindowCocoa::getState() const
                        state = GHOST_kWindowStateNormal;
                }
        }
-       else if (m_fullScreen) {
-               state = GHOST_kWindowStateFullScreen;
-       } 
        else if ([m_window isMiniaturized]) {
                state = GHOST_kWindowStateMinimized;
        }
@@ -940,15 +900,12 @@ NSScreen* GHOST_WindowCocoa::getScreen()
 /* called for event, when window leaves monitor to another */
 void GHOST_WindowCocoa::setNativePixelSize(void)
 {
-       /* make sure 10.6 keeps running */
-       if ([m_openGLView respondsToSelector:@selector(setWantsBestResolutionOpenGLSurface:)]) {
-               NSRect backingBounds = [m_openGLView convertRectToBacking:[m_openGLView bounds]];
-               
-               GHOST_Rect rect;
-               getClientBounds(rect);
+       NSRect backingBounds = [m_openGLView convertRectToBacking:[m_openGLView bounds]];
+       
+       GHOST_Rect rect;
+       getClientBounds(rect);
 
-               m_nativePixelSize = (float)backingBounds.size.width / (float)rect.getWidth();
-       }
+       m_nativePixelSize = (float)backingBounds.size.width / (float)rect.getWidth();
 }
 
 /**
@@ -973,35 +930,8 @@ GHOST_TSuccess GHOST_WindowCocoa::setState(GHOST_TWindowState state)
                {
                        NSUInteger masks = [m_window styleMask];
 
-                       if (!m_fullScreen && !(masks & NSFullScreenWindowMask)) {
-                               if (m_lionStyleFullScreen) {
-                                       [m_window toggleFullScreen:nil];
-                                       break;
-                               }
-                               NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-                       
-                               /* This status change needs to be done before Cocoa call to enter fullscreen mode
-                                * to give window delegate hint not to forward its deactivation to ghost wm that
-                                * doesn't know view/window difference. */
-                               m_fullScreen = true;
-
-                               /* Disable toggle for Lion style fullscreen */
-                               [m_window setCollectionBehavior:NSWindowCollectionBehaviorDefault];
-
-                               //10.6 provides Cocoa functions to autoshow menu bar, and to change a window style
-                               //Hide menu & dock if on primary screen. else only menu
-                               if ([[m_window screen] isEqual:[[NSScreen screens] objectAtIndex:0]]) {
-                                       [NSApp setPresentationOptions:(NSApplicationPresentationAutoHideDock | NSApplicationPresentationAutoHideMenuBar)];
-                               }
-                               //Make window borderless and enlarge it
-                               [m_window setStyleMask:NSBorderlessWindowMask];
-                               [m_window setFrame:[[m_window screen] frame] display:YES];
-                               [m_window makeFirstResponder:m_openGLView];
-                       
-                               //Tell WM of view new size
-                               m_systemCocoa->handleWindowEvent(GHOST_kEventWindowSize, this);
-                               
-                               [pool drain];
+                       if (!(masks & NSFullScreenWindowMask)) {
+                               [m_window toggleFullScreen:nil];
                        }
                        break;
                }
@@ -1014,26 +944,6 @@ GHOST_TSuccess GHOST_WindowCocoa::setState(GHOST_TWindowState state)
                                // Lion style fullscreen
                                [m_window toggleFullScreen:nil];
                        }
-                       else if (m_fullScreen) {
-                               m_fullScreen = false;
-
-                               /* Enable toggle for into Lion style fullscreen */
-                               [m_window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
-
-                               //Exit fullscreen
-                               //Show again menu & dock if needed
-                               if ([[m_window screen] isEqual:[NSScreen mainScreen]]) {
-                                       [NSApp setPresentationOptions:NSApplicationPresentationDefault];
-                               }
-                               //Make window normal and resize it
-                               [m_window setStyleMask:(NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | NSResizableWindowMask)];
-                               [m_window setFrame:[[m_window screen] visibleFrame] display:YES];
-                               //TODO for 10.6 only : window title is forgotten after the style change
-                               [m_window makeFirstResponder:m_openGLView];
-                       
-                               //Tell WM of view new size
-                               m_systemCocoa->handleWindowEvent(GHOST_kEventWindowSize, this);
-                       }
                        else if ([m_window isMiniaturized])
                                [m_window deminiaturize:nil];
                        else if ([m_window isZoomed])
@@ -1223,7 +1133,6 @@ GHOST_TSuccess GHOST_WindowCocoa::setProgressBar(float progress)
        return GHOST_kSuccess;
 }
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080
 static void postNotification()
 {
        NSUserNotification *notification = [[NSUserNotification alloc] init];
@@ -1233,7 +1142,6 @@ static void postNotification()
        [[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification:notification];
        [notification release];
 }
-#endif
 
 GHOST_TSuccess GHOST_WindowCocoa::endProgressBar()
 {
@@ -1248,15 +1156,13 @@ GHOST_TSuccess GHOST_WindowCocoa::endProgressBar()
        [dockIcon unlockFocus];
        [NSApp setApplicationIconImage:dockIcon];
        
-       
-       // With OSX 10.8 and later, we can use notifications to inform the user when the progress reached 100%
-       // Atm. just fire this when the progressbar ends, the behavior is controlled in the NotificationCenter
-       // If Blender is not frontmost window, a message pops up with sound, in any case an entry in notifications
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080
+       // We use notifications to inform the user when the progress reached 100%
+       // Atm. just fire this when the progressbar ends, the behavior is controlled
+       // in the NotificationCenter If Blender is not frontmost window, a message
+       // pops up with sound, in any case an entry in notifications
        if ([NSUserNotificationCenter respondsToSelector:@selector(defaultUserNotificationCenter)]) {
                postNotification();
        }
-#endif
 
        [dockIcon release];
        
index 469ec2d..54a212f 100644 (file)
@@ -915,49 +915,11 @@ elseif(APPLE)
 
        # python
        if(WITH_PYTHON AND NOT WITH_PYTHON_MODULE AND NOT WITH_PYTHON_FRAMEWORK)
-               if(WITH_CXX11)
-                       # Copy the python libs into the install directory
-                       install_dir(
-                               ${PYTHON_LIBPATH}
-                               ${TARGETDIR_VER}/python/lib
-                       )
-               else()
-                       # the python zip is first extracted as part of the build process,
-                       # and then later installed as part of make install. this is much
-                       # quicker, and means we can easily exclude files on copy
-                       # Not needed for PYTHON_MODULE or WEB_PLUGIN due uses Pyhon framework
-                       # use a hash of the .zip path to handle switching between different
-                       # lib directories without needing a clean build
-                       string(SHA1 PYTHON_ZIP_HASH ${LIBDIR}/release/${PYTHON_ZIP})
-                       set(PYTHON_EXTRACT_DIR ${CMAKE_CURRENT_BINARY_DIR}/${PYTHON_ZIP_HASH}/python)
-
-                       add_custom_target(
-                               extractpyzip
-                               DEPENDS ${PYTHON_EXTRACT_DIR})
-
-                       set(PYTHON_ZIP "python_${CMAKE_OSX_ARCHITECTURES}.zip")
-
-                       add_custom_command(
-                               OUTPUT ${PYTHON_EXTRACT_DIR}
-                               COMMAND ${CMAKE_COMMAND} -E remove_directory "${PYTHON_EXTRACT_DIR}/"
-                               COMMAND ${CMAKE_COMMAND} -E make_directory "${PYTHON_EXTRACT_DIR}/"
-                               COMMAND ${CMAKE_COMMAND} -E chdir "${PYTHON_EXTRACT_DIR}/"
-                                               ${CMAKE_COMMAND} -E tar xzfv "${LIBDIR}/release/${PYTHON_ZIP}"
-                               DEPENDS ${LIBDIR}/release/${PYTHON_ZIP})
-
-                       add_dependencies(blender extractpyzip)
-
-                       # copy extracted python files
-                       install_dir(
-                               ${PYTHON_EXTRACT_DIR}
-                               \${TARGETDIR_VER}
-                       )
-                       # copy site-packages files
-                       install_dir(
-                               ${LIBDIR}/release/site-packages
-                               \${TARGETDIR_VER}/python/lib/python${PYTHON_VERSION}
-                       )
-               endif()
+               # Copy the python libs into the install directory
+               install_dir(
+                       ${PYTHON_LIBPATH}
+                       ${TARGETDIR_VER}/python/lib
+               )
 
                install(DIRECTORY ${LIBDIR}/python/bin
                        DESTINATION ${TARGETDIR_VER}/python
@@ -1012,27 +974,11 @@ elseif(APPLE)
 
                # python
                if(WITH_PYTHON AND NOT WITH_PYTHON_FRAMEWORK)
-                       if(WITH_CXX11)
-                               # Copy the python libs into the install directory
-                               install_dir(
-                                       ${PYTHON_LIBPATH}
-                                       ${PLAYER_TARGETDIR_VER}/python/lib
-                               )
-                       else()
-                               add_custom_command(
-                                       OUTPUT ${PYTHON_EXTRACT_DIR}
-                                       COMMAND ${CMAKE_COMMAND} -E remove_directory "${PYTHON_EXTRACT_DIR}/"
-                                       COMMAND ${CMAKE_COMMAND} -E make_directory "${PYTHON_EXTRACT_DIR}/"
-                                       COMMAND ${CMAKE_COMMAND} -E chdir "${PYTHON_EXTRACT_DIR}/"
-                                                       ${CMAKE_COMMAND} -E tar xzfv "${LIBDIR}/release/${PYTHON_ZIP}"
-                                       DEPENDS ${LIBDIR}/release/${PYTHON_ZIP})
-
-                               # copy extracted python files
-                               install_dir(
-                                       ${PYTHON_EXTRACT_DIR}
-                                       \${PLAYER_TARGETDIR_VER}
-                               )
-                       endif()
+                       # Copy the python libs into the install directory
+                       install_dir(
+                               ${PYTHON_LIBPATH}
+                               ${PLAYER_TARGETDIR_VER}/python/lib
+                       )
                endif()
 
        endif()