scons update to enable build with QTKit (Cocoa Quicktime)
authorDamien Plisson <damien.plisson@yahoo.fr>
Wed, 18 Nov 2009 15:54:25 +0000 (15:54 +0000)
committerDamien Plisson <damien.plisson@yahoo.fr>
Wed, 18 Nov 2009 15:54:25 +0000 (15:54 +0000)
Thx Jens Verwiebe for the patch

SConstruct
config/darwin-config.py
source/blender/quicktime/SConscript
tools/btools.py

index e6dd85e8cff6c1702df38b0ee25b3915a18bbe09..369a1801aec496cf9a04a5e7f0d0772512ed5c98 100644 (file)
@@ -224,6 +224,11 @@ if env['WITH_GHOST_COCOA'] == True:
        env.Append(CFLAGS=['-DGHOST_COCOA']) 
        env.Append(CXXFLAGS=['-DGHOST_COCOA'])
        env.Append(CPPFLAGS=['-DGHOST_COCOA'])
+    
+if env['USE_QTKIT'] == True:
+       env.Append(CFLAGS=['-DUSE_QTKIT']) 
+       env.Append(CXXFLAGS=['-DUSE_QTKIT'])
+       env.Append(CPPFLAGS=['-DUSE_QTKIT'])
 
 #check for additional debug libnames
 
index 249598e8a475878666c3e70c7f4b127142ee1f69..825d00f892dff6b27da9545d6c873bec64581f0f 100644 (file)
@@ -13,7 +13,6 @@ USE_SDK=True
 #############################################################################
 ###################     Cocoa & architecture settings      ##################
 #############################################################################
-
 WITH_GHOST_COCOA=True
 MACOSX_ARCHITECTURE = 'i386' # valid archs: ppc, i386, ppc64, x86_64
 
@@ -33,6 +32,10 @@ elif cmd_res[0]=='10':
 
 BF_PYTHON_VERSION = '3.1'
 
+if MACOSX_ARCHITECTURE == 'x86_64' or MACOSX_ARCHITECTURE == 'ppc64':
+       USE_QTKIT=True # Carbon quicktime is not available for 64bit
+
+
 # Default target OSX settings per architecture
 # Can be customized
 
@@ -231,10 +234,7 @@ BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
 BF_FREETYPE_LIB = 'freetype'
 BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
 
-if MACOSX_ARCHITECTURE == 'x86_64' or MACOSX_ARCHITECTURE == 'ppc64':
-       WITH_BF_QUICKTIME = False # -DWITH_QUICKTIME ( disable for 64bit atm )
-else:
-       WITH_BF_QUICKTIME = True
+WITH_BF_QUICKTIME = True
 
 WITH_BF_ICONV = True
 BF_ICONV = '/usr'
@@ -287,7 +287,10 @@ else:
        PLATFORM_LINKFLAGS = ['-fexceptions','-framework','CoreServices','-framework','Foundation','-framework','IOKit','-framework','AppKit','-framework','Carbon','-framework','AGL','-framework','AudioUnit','-framework','AudioToolbox','-framework','CoreAudio','-framework','OpenAL']+ARCH_FLAGS
 
 if WITH_BF_QUICKTIME == True:
-       PLATFORM_LINKFLAGS = PLATFORM_LINKFLAGS+['-framework','QuickTime']
+       if USE_QTKIT == True:
+               PLATFORM_LINKFLAGS = PLATFORM_LINKFLAGS+['-framework','QTKit']
+       else:
+               PLATFORM_LINKFLAGS = PLATFORM_LINKFLAGS+['-framework','QuickTime']
 
 #note to build succesfully on 10.3.9 SDK you need to patch  10.3.9 by adding the SystemStubs.a lib from 10.4
 LLIBS = ['stdc++', 'SystemStubs']
index 10e88a8f4612e72223b5eaa31d89be77140e0edd..1f9847d785425ee38742f98ddb2bdc32442c3c5b 100644 (file)
@@ -1,9 +1,15 @@
 #!/usr/bin/python
 Import ('env')
 
-source_files = ['apple/quicktime_import.c',
+
+if env['USE_QTKIT']:
+    source_files = ['apple/qtkit_import.m',
+                'apple/qtkit_export.m']
+else:
+    source_files = ['apple/quicktime_import.c',
                 'apple/quicktime_export.c']
 
+
 incs  = ['.',
                 '../quicktime',
                 '../makesdna',
index 326c0412cea1b55647e81a8ef8702c1ab7a537cd..e34ee05fbe7bc6bc56fbb751f9431642c391dd02 100755 (executable)
@@ -65,6 +65,7 @@ def validate_arguments(args, bc):
                        'WITHOUT_BF_PYTHON_INSTALL',
                        'WITH_BF_OPENMP',
                        'WITH_GHOST_COCOA',
+                       'USE_QTKIT',
                        'BF_FANCY', 'BF_QUIET',
                        'BF_X264_CONFIG',
                        'BF_XVIDCORE_CONFIG',
@@ -314,6 +315,7 @@ def read_opts(cfg, args):
 
                (BoolVariable('WITH_BF_OPENMP', 'Use OpenMP if true', False)),
                (BoolVariable('WITH_GHOST_COCOA', 'Use Cocoa-framework if true', False)),
+               (BoolVariable('USE_QTKIT', 'Use QTKIT if true', False)),
 
                (BoolVariable('WITH_BF_QUICKTIME', 'Use QuickTime if true', False)),
                ('BF_QUICKTIME', 'QuickTime base path', ''),