Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorDamien Plisson <damien.plisson@yahoo.fr>2009-10-27 16:40:41 +0300
committerDamien Plisson <damien.plisson@yahoo.fr>2009-10-27 16:40:41 +0300
commitb8a7f844ca2bf07a70b4e33ca6b28bb7312df11d (patch)
treeb832df93007e65df862fb16a0626ccbdd4cca0f1 /intern
parent54facb5cfe2134d17790a1c24f910bbaaab4e272 (diff)
Mac:
Fixed gcc-4.0 compile error (cocoa) Updated scons to build cocoa (32bit & 64bit) (Thx Jens Verwiebe for the patch): - make sure right python is unzipped to app-bundle ( printing information at the end of compiling ) - make sure arch-setting appends needed flags ( depending on OSX-version obsolete sometimes but harmless ) - link correct frameworks depending on gfx-api ( cocoa/carbon) - conscript prepared for cocoa objC-files - link to openAL-framework, using the headers from blender-lib + the symbols in framework Usage instruction: The default build is Cocoa 32bit. To change it, copy config/darwin-config.py to user-config.py in the blender folder, and edit: - WITH_GHOST_COCOA & MACOSX_ARCHITECTURE variables to select cocoa/carbon, and the arch (i386, X86_64, ppc, ..) - the libs options as usual
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/SConscript27
-rw-r--r--intern/ghost/intern/GHOST_SystemCocoa.mm2
2 files changed, 24 insertions, 5 deletions
diff --git a/intern/ghost/SConscript b/intern/ghost/SConscript
index 48009152699..95399227c99 100644
--- a/intern/ghost/SConscript
+++ b/intern/ghost/SConscript
@@ -6,7 +6,17 @@ Import ('env')
window_system = env['OURPLATFORM']
-sources = env.Glob('intern/*.cpp')
+sources = env.Glob('intern/*.cpp') + env.Glob('intern/*.mm')
+
+if env['WITH_GHOST_COCOA'] == True:
+ env.Append(CFLAGS=['-DGHOST_COCOA'])
+ env.Append(CXXFLAGS=['-DGHOST_COCOA'])
+ env.Append(CPPFLAGS=['-DGHOST_COCOA'])
+
+#defs = ''
+#if env['WITH_GHOST_COCOA']:
+# defs += 'GHOST_COCOA'
+# maybe we need it later
pf = ['GHOST_DisplayManager', 'GHOST_System', 'GHOST_Window']
@@ -19,9 +29,17 @@ elif window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64
sources.remove('intern' + os.sep + f + 'X11.cpp')
sources.remove('intern' + os.sep + f + 'Carbon.cpp')
elif window_system == 'darwin':
- for f in pf:
- sources.remove('intern' + os.sep + f + 'Win32.cpp')
- sources.remove('intern' + os.sep + f + 'X11.cpp')
+ if env['WITH_GHOST_COCOA']:
+ for f in pf:
+ sources.remove('intern' + os.sep + f + 'Win32.cpp')
+ sources.remove('intern' + os.sep + f + 'X11.cpp')
+ sources.remove('intern' + os.sep + f + 'Carbon.cpp')
+ else:
+ for f in pf:
+ sources.remove('intern' + os.sep + f + 'Win32.cpp')
+ sources.remove('intern' + os.sep + f + 'X11.cpp')
+ sources.remove('intern' + os.sep + f + 'Cocoa.mm')
+
else:
print "Unknown window system specified."
Exit()
@@ -30,3 +48,4 @@ incs = '. ../string ' + env['BF_OPENGL_INC']
if window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-vc'):
incs = env['BF_WINTAB_INC'] + ' ' + incs
env.BlenderLib ('bf_ghost', sources, Split(incs), defines=['_USE_MATH_DEFINES'], libtype=['intern','player'], priority = [40,15] )
+
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm
index 03a617ebdd7..5dbf79a0293 100644
--- a/intern/ghost/intern/GHOST_SystemCocoa.mm
+++ b/intern/ghost/intern/GHOST_SystemCocoa.mm
@@ -700,7 +700,7 @@ GHOST_TSuccess GHOST_SystemCocoa::setCursorPosition(GHOST_TInt32 x, GHOST_TInt32
//Quartz Display Services uses the old coordinates (top left origin)
yf = screenRect.size.height -yf;
- CGDisplayMoveCursorToPoint([[[windowScreen deviceDescription] objectForKey:@"NSScreenNumber"] unsignedIntValue], CGPointMake(xf, yf));
+ CGDisplayMoveCursorToPoint((CGDirectDisplayID)[[[windowScreen deviceDescription] objectForKey:@"NSScreenNumber"] unsignedIntValue], CGPointMake(xf, yf));
return GHOST_kSuccess;
}