From 1b902c06c63d4e9cb1df4d4ff385759e1ddcd4bd Mon Sep 17 00:00:00 2001 From: Michael Weirauch Date: Tue, 10 Mar 2009 21:09:23 +0000 Subject: [PATCH] * WIP blender 2.47 patch --- media-gfx/blender/blender-2.47-haiku-1.diff | 1913 +++++++++++++++++++ 1 file changed, 1913 insertions(+) create mode 100644 media-gfx/blender/blender-2.47-haiku-1.diff diff --git a/media-gfx/blender/blender-2.47-haiku-1.diff b/media-gfx/blender/blender-2.47-haiku-1.diff new file mode 100644 index 000000000..3924b2f29 --- /dev/null +++ b/media-gfx/blender/blender-2.47-haiku-1.diff @@ -0,0 +1,1913 @@ +diff -Naur _res/blender-2.47/config/haiku1-config.py ./blender-2.47-haiku-1/config/haiku1-config.py +--- _res/blender-2.47/config/haiku1-config.py 1970-01-01 01:00:00.000000000 +0100 ++++ ./blender-2.47-haiku-1/config/haiku1-config.py 2008-12-01 22:45:02.000000000 +0100 +@@ -0,0 +1,191 @@ ++import os ++ ++HAIKU_DEVELOP_DIR = '/boot/develop' ++HAIKU_DEVELOP_LIB = HAIKU_DEVELOP_DIR + '/lib/x86' # TODO arch ++HAIKU_DEVELOP_INCLUDE = HAIKU_DEVELOP_DIR + '/headers' ++HAIKU_DEVELOP_INCLUDE_OS = HAIKU_DEVELOP_INCLUDE + '/os' ++HAIKU_DEVELOP_INCLUDE_3RDPARTY = HAIKU_DEVELOP_INCLUDE + '/3rdparty' ++HAIKU_COMMON_DIR = '/boot/common' ++HAIKU_COMMON_LIB = HAIKU_COMMON_DIR + '/lib' ++HAIKU_COMMON_INCLUDE = HAIKU_COMMON_DIR + '/include' ++ ++WITH_BF_VERSE = 'false' ++BF_VERSE_INCLUDE = "#extern/verse/dist" ++ ++BF_PYTHON = HAIKU_COMMON_DIR ++BF_PYTHON_VERSION = '2.5' ++BF_PYTHON_INC = HAIKU_COMMON_INCLUDE + '/python' + BF_PYTHON_VERSION ++BF_PYTHON_BINARY = BF_PYTHON + '/bin/python' + BF_PYTHON_VERSION ++BF_PYTHON_LIB = 'python' + BF_PYTHON_VERSION ++BF_PYTHON_LIBPATH = HAIKU_COMMON_LIB ++BF_PYTHON_LINKFLAGS = os.popen("python-config --ldflags").readline() ++ ++WITH_BF_OPENAL = 'false' # TODO ++#BF_OPENAL = '/usr' ++#BF_OPENAL_INC = '${BF_OPENAL}/include' ++#BF_OPENAL_LIB = 'openal' ++# some distros have a separate libalut ++# if you get linker complaints, you need to uncomment the line below ++# BF_OPENAL_LIB = 'openal alut' ++ ++WITH_BF_SDL = 'true' # setting is ignored ++BF_SDL = HAIKU_COMMON_DIR ++BF_SDL_INC = HAIKU_COMMON_INCLUDE + '/SDL' ++BF_SDL_LIB = 'SDL' ++ ++WITH_BF_FMOD = 'false' # TODO ++##BF_FMOD = LIBDIR + '/fmod' ++ ++WITH_BF_OPENEXR = 'false' # TODO ++#BF_OPENEXR = '/usr' ++# when compiling with your own openexr lib you might need to set... ++# BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR ${BF_OPENEXR}/include' ++ ++#BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR' ++#BF_OPENEXR_LIB = 'Half IlmImf Iex Imath ' ++# BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib' ++ ++WITH_BF_DDS = 'true' ++ ++WITH_BF_JPEG = 'true' # setting is ignored ++BF_JPEG = HAIKU_COMMON_DIR ++BF_JPEG_INC = HAIKU_COMMON_INCLUDE ++BF_JPEG_LIB = 'jpeg' ++BF_JPEG_LIBPATH = HAIKU_COMMON_LIB ++ ++WITH_BF_PNG = 'true' ++BF_PNG = HAIKU_DEVELOP_DIR ++BF_PNG_INC = HAIKU_DEVELOP_INCLUDE_3RDPARTY ++BF_PNG_LIB = 'png' ++ ++WITH_BF_TIFF = 'true' # setting is ignored ++BF_TIFF = HAIKU_COMMON_DIR ++BF_TIFF_INC = HAIKU_COMMON_INCLUDE ++ ++WITH_BF_ZLIB = 'true' ++BF_ZLIB = HAIKU_DEVELOP_DIR ++BF_ZLIB_INC = HAIKU_DEVELOP_INCLUDE_3RDPARTY ++BF_ZLIB_LIB = 'z' ++ ++WITH_BF_INTERNATIONAL = 'false' # TODO ++ ++#BF_GETTEXT = '/usr' ++#BF_GETTEXT_INC = '${BF_GETTEXT}/include' ++#BF_GETTEXT_LIB = 'gettextlib' ++#BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib' ++ ++WITH_BF_FTGL = 'false' # TODO ++#BF_FTGL = '#extern/bFTGL' ++#BF_FTGL_INC = '${BF_FTGL}/include' ++#BF_FTGL_LIB = 'extern_ftgl' ++ ++WITH_BF_GAMEENGINE='false' # TODO ++ ++WITH_BF_ODE = 'false' ++##BF_ODE = LIBDIR + '/ode' ++BF_ODE_INC = BF_ODE + '/include' ++BF_ODE_LIB = BF_ODE + '/lib/libode.a' ++ ++WITH_BF_BULLET = 'true' ++BF_BULLET = '#extern/bullet2/src' ++BF_BULLET_INC = '${BF_BULLET}' ++BF_BULLET_LIB = 'extern_bullet' ++ ++BF_SOLID = '#extern/solid' ++BF_SOLID_INC = '${BF_SOLID}' ++BF_SOLID_LIB = 'extern_solid' ++ ++WITH_BF_YAFRAY = 'true' ++ ++#WITH_BF_NSPR = 'true' ++#BF_NSPR = $(LIBDIR)/nspr ++#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr ++#BF_NSPR_LIB = ++ ++# Uncomment the following line to use Mozilla inplace of netscape ++#CPPFLAGS += -DMOZ_NOT_NET ++# Location of MOZILLA/Netscape header files... ++#BF_MOZILLA = $(LIBDIR)/mozilla ++#BF_MOZILLA_INC = -I$(BF_MOZILLA)/include/mozilla/nspr -I$(BF_MOZILLA)/include/mozilla -I$(BF_MOZILLA)/include/mozilla/xpcom -I$(BF_MOZILLA)/include/mozilla/idl ++#BF_MOZILLA_LIB = ++# Will fall back to look in BF_MOZILLA_INC/nspr and BF_MOZILLA_LIB ++# if this is not set. ++# ++# Be paranoid regarding library creation (do not update archives) ++#BF_PARANOID = 'true' ++ ++# enable freetype2 support for text objects ++WITH_BF_FREETYPE = 'false' ++#BF_FREETYPE = '/usr' ++#BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2' ++#BF_FREETYPE_LIB = 'freetype' ++ ++WITH_BF_QUICKTIME = 'false' ++#BF_QUICKTIME = '/usr/local' ++#BF_QUICKTIME_INC = '${BF_QUICKTIME}/include' ++ ++WITH_BF_ICONV = 'false' # TODO ++##BF_ICONV = LIBDIR + "/iconv" ++#BF_ICONV_INC = '${BF_ICONV}/include' ++#BF_ICONV_LIB = 'iconv' ++#BF_ICONV_LIBPATH = '${BF_ICONV}/lib' ++ ++WITH_BF_BINRELOC = 'false' # TODO? ++ ++# enable ffmpeg support ++WITH_BF_FFMPEG = 'false' # -DWITH_FFMPEG ++#BF_FFMPEG = '#extern/ffmpeg' ++#BF_FFMPEG_LIB = '' ++# Uncomment the following two lines to use system's ffmpeg ++# BF_FFMPEG = '/usr' ++# BF_FFMPEG_LIB = 'avformat avcodec swscale avutil' ++#BF_FFMPEG_INC = '${BF_FFMPEG}/include' ++#BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib' ++ ++# Mesa Libs should go here if your using them as well.... ++WITH_BF_STATICOPENGL = 'false' ++#BF_OPENGL = '/usr' ++BF_OPENGL_INC = '${HAIKU_DEVELOP_INCLUDE_OS}/opengl' ++BF_OPENGL_LIB = 'GL' ++BF_OPENGL_LIBPATH = '${HAIKU_DEVELOP_LIB}' ++#BF_OPENGL_LIB_STATIC = '${BF_OPENGL}/libGL.a ${BF_OPENGL}/libGLU.a ${BF_OPENGL}/libXxf86vm.a ${BF_OPENGL}/libX11.a ${BF_OPENGL}/libXi.a ${BF_OPENGL}/libXext.a ${BF_OPENGL}/libXxf86vm.a' ++ ++## ++CC = 'gcc' ++CXX = 'g++' ++ ++# TODO CHECK ALL VALUES! ++##CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing'] ++ ++##CPPFLAGS = ['-DXP_UNIX'] ++##CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing'] ++REL_CFLAGS = ['-O2'] ++REL_CCFLAGS = ['-O2'] ++##BF_DEPEND = 'true' ++## ++##AR = ar ++##ARFLAGS = ruv ++##ARFLAGSQUIET = ru ++## ++##C_WARN = '-Wall -Wno-char-subscripts -Wdeclaration-after-statement' ++ ++##CC_WARN = '-Wall' ++ ++##FIX_STUBS_WARNINGS = -Wno-unused ++ ++LLIBS = 'stdc++.r4 network be' ++##LOPTS = --dynamic ++##DYNLDFLAGS = -shared $(LDFLAGS) ++ ++#BF_PROFILE_FLAGS = ['-pg','-g'] ++#BF_PROFILE = 'false' ++ ++CPPDEFINES = 'GHOST_DEBUG' ++DEFINES = ['GHOST_DEBUG'] ++ ++BF_DEBUG = 'false' ++BF_DEBUG_FLAGS = '-g' ++ ++BF_BUILDDIR = '../build-haiku1' ++BF_INSTALLDIR='../install-haiku1' ++ +diff -Naur _res/blender-2.47/extern/glew/src/glew.c ./blender-2.47-haiku-1/extern/glew/src/glew.c +--- _res/blender-2.47/extern/glew/src/glew.c 2008-12-29 19:15:29.000000000 +0100 ++++ ./blender-2.47-haiku-1/extern/glew/src/glew.c 2008-12-29 19:26:04.000000000 +0100 +@@ -32,7 +32,7 @@ + #include + #if defined(_WIN32) + # include +-#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX) ++#elif (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) && !defined(__HAIKU__) + # include + #endif + +@@ -86,7 +86,7 @@ + } + #endif /* __APPLE__ */ + +-#if defined(__sgi) || defined (__sun) ++#if defined(__sgi) || defined (__sun) || defined(__HAIKU__) + #include + #include + #include +@@ -107,7 +107,7 @@ + else + return dlsym(h, (const char*)name); + } +-#endif /* __sgi || __sun */ ++#endif /* __sgi || __sun || __HAIKU__ */ + + /* + * Define glewGetProcAddress. +@@ -118,7 +118,7 @@ + # if defined(__APPLE__) + # define glewGetProcAddress(name) NSGLGetProcAddress(name) + # else +-# if defined(__sgi) || defined(__sun) ++# if defined(__sgi) || defined(__sun) || defined(__HAIKU__) + # define glewGetProcAddress(name) dlGetProcAddress(name) + # else /* __linux */ + # define glewGetProcAddress(name) (*glXGetProcAddressARB)(name) +@@ -6422,7 +6422,7 @@ + return GLEW_OK; + } + +-#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX) ++#elif (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) && !defined(__HAIKU__) + + PFNGLXGETCURRENTDISPLAYPROC __glewXGetCurrentDisplay = NULL; + +@@ -7139,7 +7139,7 @@ + return GLEW_OK; + } + +-#endif /* !__APPLE__ || GLEW_APPLE_GLX */ ++#endif /* (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) && !defined(__HAIKU__) */ + + /* ------------------------------------------------------------------------ */ + +@@ -7176,7 +7176,7 @@ + + #if defined(_WIN32) + extern GLenum wglewContextInit (void); +-#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX) /* _UNIX */ ++#elif (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) && !defined(__HAIKU__) + extern GLenum glxewContextInit (void); + #endif /* _WIN32 */ + +@@ -7186,7 +7186,7 @@ + if ( (r = glewContextInit()) ) return r; + #if defined(_WIN32) + return wglewContextInit(); +-#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX) /* _UNIX */ ++#elif (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) && !defined(__HAIKU__) + return glxewContextInit(); + #else + return r; +@@ -9429,7 +9429,7 @@ + return ret; + } + +-#elif !defined(__APPLE__) || defined(GLEW_APPLE_GLX) ++#elif (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) && !defined(__HAIKU__) + + #if defined(GLEW_MX) + GLboolean glxewContextIsSupported (GLXEWContext* ctx, const char* name) +diff -Naur _res/blender-2.47/intern/ghost/SConscript ./blender-2.47-haiku-1/intern/ghost/SConscript +--- _res/blender-2.47/intern/ghost/SConscript 2008-12-29 19:15:26.000000000 +0100 ++++ ./blender-2.47-haiku-1/intern/ghost/SConscript 2008-12-01 22:44:59.000000000 +0100 +@@ -14,14 +14,22 @@ + for f in pf: + sources.remove('intern' + os.sep + f + 'Win32.cpp') + sources.remove('intern' + os.sep + f + 'Carbon.cpp') ++ sources.remove('intern' + os.sep + f + 'Haiku.cpp') + elif window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross'): + for f in pf: + sources.remove('intern' + os.sep + f + 'X11.cpp') + sources.remove('intern' + os.sep + f + 'Carbon.cpp') ++ sources.remove('intern' + os.sep + f + 'Haiku.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') ++ sources.remove('intern' + os.sep + f + 'Haiku.cpp') ++elif window_system == 'haiku1': ++ 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: + print "Unknown window system specified." + Exit() +diff -Naur _res/blender-2.47/intern/ghost/intern/GHOST_Debug.h ./blender-2.47-haiku-1/intern/ghost/intern/GHOST_Debug.h +--- _res/blender-2.47/intern/ghost/intern/GHOST_Debug.h 2008-12-29 19:15:26.000000000 +0100 ++++ ./blender-2.47-haiku-1/intern/ghost/intern/GHOST_Debug.h 2008-12-01 22:44:59.000000000 +0100 +@@ -31,6 +31,9 @@ + * Macro's used in GHOST debug target. + */ + ++// FIXME1 ++#define GHOST_DEBUG ++ + #ifndef _GHOST_DEBUG_H_ + #define _GHOST_DEBUG_H_ + +diff -Naur _res/blender-2.47/intern/ghost/intern/GHOST_DisplayManagerHaiku.cpp ./blender-2.47-haiku-1/intern/ghost/intern/GHOST_DisplayManagerHaiku.cpp +--- _res/blender-2.47/intern/ghost/intern/GHOST_DisplayManagerHaiku.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ ./blender-2.47-haiku-1/intern/ghost/intern/GHOST_DisplayManagerHaiku.cpp 2008-12-01 22:44:59.000000000 +0100 +@@ -0,0 +1,104 @@ ++#ifdef HAVE_CONFIG_H ++#include ++#endif ++ ++#include "GHOST_Debug.h" ++#include "GHOST_DisplayManagerHaiku.h" ++ ++#include ++ ++GHOST_DisplayManagerHaiku::GHOST_DisplayManagerHaiku(void) { ++} ++ ++GHOST_DisplayManagerHaiku::~GHOST_DisplayManagerHaiku(void) { ++} ++ ++GHOST_TSuccess ++GHOST_DisplayManagerHaiku::initialize(void) { ++ return GHOST_kSuccess; ++} ++ ++GHOST_TSuccess ++GHOST_DisplayManagerHaiku::getNumDisplays(GHOST_TUns8& numDisplays) const { ++ /* For now, we only support one screen. */ ++ numDisplays = 1; ++ return GHOST_kSuccess; ++} ++ ++GHOST_TSuccess ++GHOST_DisplayManagerHaiku::getNumDisplaySettings(GHOST_TUns8 display, GHOST_TInt32& numSettings) const { ++ GHOST_ASSERT(display < 1, "GHOST_DisplayManagerHaiku::getNumDisplaySettings() : Single display support only!\n"); ++ numSettings = GHOST_TInt32( 1 ); ++ return GHOST_kSuccess; ++} ++ ++GHOST_TSuccess ++GHOST_DisplayManagerHaiku::getDisplaySetting(GHOST_TUns8 display, GHOST_TInt32 index, GHOST_DisplaySetting& setting) const { ++ GHOST_ASSERT(display < 1, "GHOST_DisplayManagerHaiku::getDisplaySetting() : Single display support only!\n"); ++ GHOST_ASSERT(index < 1, "GHOST_DisplayManagerHaiku::getDisplaySetting() : Single display setting support only!\n"); ++ ++ BScreen screen; ++ if (!screen.IsValid()) ++ return GHOST_kFailure; ++ ++ color_space cspace; ++ cspace = screen.ColorSpace(); ++ ++ switch (cspace) ++ { ++ case B_CMAP8 : ++ { ++ setting.bpp = 8; ++ break; ++ } ++ case B_RGB15 : ++ case B_RGBA15 : ++ { ++ setting.bpp = 15; ++ break; ++ } ++ case B_RGB16 : ++ { ++ setting.bpp = 16; ++ break; ++ } ++ case B_RGB32 : ++ case B_RGBA32 : ++ { ++ setting.bpp = 32; ++ break; ++ } ++ default : ++ { ++ setting.bpp = 16; ++ } ++ } ++ ++ display_mode mode; ++ screen.GetMode(&mode); ++ ++ float total_size = mode.timing.h_total * mode.timing.v_total; ++ float refresh_rate = floor((((float)mode.timing.pixel_clock * 1000.0) / ((float)total_size))); ++ ++ setting.xPixels = mode.timing.h_display; ++ setting.yPixels = mode.timing.v_display; ++ setting.frequency = (GHOST_TUns32)refresh_rate; ++ ++#ifdef GHOST_DEBUG ++ printf("GHOST_DisplayManagerHaiku::getDisplaySetting() : %ldx%ldx%d refresh_rate:%luHz\n", ++ setting.xPixels, setting.yPixels, setting.bpp, setting.frequency); ++#endif ++ ++ return GHOST_kSuccess; ++} ++ ++GHOST_TSuccess ++GHOST_DisplayManagerHaiku::getCurrentDisplaySetting(GHOST_TUns8 display, GHOST_DisplaySetting& setting) const { ++ return getDisplaySetting(display, (GHOST_TInt32)0, setting); ++} ++ ++GHOST_TSuccess ++GHOST_DisplayManagerHaiku::setCurrentDisplaySetting(GHOST_TUns8 display, const GHOST_DisplaySetting& setting) { ++ GHOST_PRINT("TODO GHOST_DisplayManagerHaiku::setCurrentDisplaySetting() : TODO\n"); ++ return GHOST_kFailure; ++} +diff -Naur _res/blender-2.47/intern/ghost/intern/GHOST_DisplayManagerHaiku.h ./blender-2.47-haiku-1/intern/ghost/intern/GHOST_DisplayManagerHaiku.h +--- _res/blender-2.47/intern/ghost/intern/GHOST_DisplayManagerHaiku.h 1970-01-01 01:00:00.000000000 +0100 ++++ ./blender-2.47-haiku-1/intern/ghost/intern/GHOST_DisplayManagerHaiku.h 2008-12-01 22:44:59.000000000 +0100 +@@ -0,0 +1,75 @@ ++#ifndef _GHOST_DISPLAY_MANAGER_HAIKU_H_ ++#define _GHOST_DISPLAY_MANAGER_HAIKU_H_ ++ ++#include "GHOST_DisplayManager.h" ++ ++class GHOST_SystemHaiku; ++ ++/** ++ * Haiku GHOST_DisplayManager implementation ++ * @author Michael Weirauch ++ * @date 2008-10-04 ++ * @see GHOST_DisplayManager ++ */ ++class GHOST_DisplayManagerHaiku : public GHOST_DisplayManager { ++public: ++ /** ++ * Constructor. ++ */ ++ GHOST_DisplayManagerHaiku(void); ++ ++ /** ++ * Destructor. ++ */ ++ ~GHOST_DisplayManagerHaiku(void); ++ ++ /** ++ * Initializes the list with devices and settings. ++ * @return Indication of success. ++ */ ++ GHOST_TSuccess initialize(void); ++ ++ /** ++ * Returns the number of display devices on this system. ++ * @param numDisplays The number of displays on this system. ++ * @return Indication of success. ++ */ ++ GHOST_TSuccess getNumDisplays(GHOST_TUns8& numDisplays) const; ++ ++ /** ++ * Returns the number of display settings for this display device. ++ * @param display The index of the display to query with 0 <= display < getNumDisplays(). ++ * @param setting The number of settings of the display device with this index. ++ * @return Indication of success. ++ */ ++ GHOST_TSuccess getNumDisplaySettings(GHOST_TUns8 display, GHOST_TInt32& numSettings) const; ++ ++ /** ++ * Returns the current setting for this display device. ++ * @param display The index of the display to query with 0 <= display < getNumDisplays(). ++ * @param index The setting index to be returned. ++ * @param setting The setting of the display device with this index. ++ * @return Indication of success. ++ */ ++ GHOST_TSuccess getDisplaySetting(GHOST_TUns8 display, GHOST_TInt32 index, GHOST_DisplaySetting& setting) const; ++ ++ /** ++ * Returns the current setting for this display device. ++ * @param display The index of the display to query with 0 <= display < getNumDisplays(). ++ * @param setting The current setting of the display device with this index. ++ * @return Indication of success. ++ */ ++ GHOST_TSuccess getCurrentDisplaySetting(GHOST_TUns8 display, GHOST_DisplaySetting& setting) const; ++ ++ /** ++ * Changes the current setting for this display device. ++ * The setting given to this method is matched againts the available diplay settings. ++ * The best match is activated (@see findMatch()). ++ * @param display The index of the display to query with 0 <= display < getNumDisplays(). ++ * @param setting The setting of the display device to be matched and activated. ++ * @return Indication of success. ++ */ ++ GHOST_TSuccess setCurrentDisplaySetting(GHOST_TUns8 display, const GHOST_DisplaySetting& setting); ++}; ++ ++#endif /* _GHOST_DISPLAY_MANAGER_HAIKU_H_ */ +diff -Naur _res/blender-2.47/intern/ghost/intern/GHOST_ISystem.cpp ./blender-2.47-haiku-1/intern/ghost/intern/GHOST_ISystem.cpp +--- _res/blender-2.47/intern/ghost/intern/GHOST_ISystem.cpp 2008-12-29 19:15:26.000000000 +0100 ++++ ./blender-2.47-haiku-1/intern/ghost/intern/GHOST_ISystem.cpp 2008-12-01 22:44:59.000000000 +0100 +@@ -42,12 +42,12 @@ + + #ifdef WIN32 + # include "GHOST_SystemWin32.h" ++#elif __APPLE__ ++# include "GHOST_SystemCarbon.h" ++#elif __HAIKU__ ++# include "GHOST_SystemHaiku.h" + #else +-# ifdef __APPLE__ +-# include "GHOST_SystemCarbon.h" +-# else +-# include "GHOST_SystemX11.h" +-# endif ++# include "GHOST_SystemX11.h" + #endif + + +@@ -60,13 +60,13 @@ + if (!m_system) { + #ifdef WIN32 + m_system = new GHOST_SystemWin32 (); +-#else +-# ifdef __APPLE__ ++#elif __APPLE__ + m_system = new GHOST_SystemCarbon (); +-# else ++#elif __HAIKU__ ++ m_system = new GHOST_SystemHaiku (); ++#else + m_system = new GHOST_SystemX11 (); +-# endif +-#endif ++#endif + success = m_system != 0 ? GHOST_kSuccess : GHOST_kFailure; + } + else { +diff -Naur _res/blender-2.47/intern/ghost/intern/GHOST_NDOFManager.cpp ./blender-2.47-haiku-1/intern/ghost/intern/GHOST_NDOFManager.cpp +--- _res/blender-2.47/intern/ghost/intern/GHOST_NDOFManager.cpp 2008-12-29 19:15:26.000000000 +0100 ++++ ./blender-2.47-haiku-1/intern/ghost/intern/GHOST_NDOFManager.cpp 2008-12-01 22:44:59.000000000 +0100 +@@ -28,7 +28,7 @@ + // the variable is outside the class because it must be accessed from plugin + static volatile GHOST_TEventNDOFData currentNdofValues = {0,0,0,0,0,0,0,0,0,0,0}; + +-#if !defined(_WIN32) && !defined(__APPLE__) ++#if !defined(_WIN32) && !defined(__APPLE__) && !defined(__HAIKU__) + #include "GHOST_SystemX11.h" + #endif + +@@ -76,7 +76,7 @@ + #if 0 + printf("%i client \n", Pid); + #endif +- #if defined(_WIN32) || defined(__APPLE__) ++ #if defined(_WIN32) || defined(__APPLE__) || defined(__HAIKU__) + m_DeviceHandle = ndofDeviceOpen((void *)¤tNdofValues); + #else + GHOST_SystemX11 *sys; +diff -Naur _res/blender-2.47/intern/ghost/intern/GHOST_SystemHaiku.cpp ./blender-2.47-haiku-1/intern/ghost/intern/GHOST_SystemHaiku.cpp +--- _res/blender-2.47/intern/ghost/intern/GHOST_SystemHaiku.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ ./blender-2.47-haiku-1/intern/ghost/intern/GHOST_SystemHaiku.cpp 2008-12-01 22:44:59.000000000 +0100 +@@ -0,0 +1,129 @@ ++#include "GHOST_Debug.h" ++#include "GHOST_SystemHaiku.h" ++#include "GHOST_WindowHaiku.h" ++#include "GHOST_WindowManager.h" ++ ++GHOST_SystemHaiku::GHOST_SystemHaiku() ++ : fDisplayManager(NULL), ++ fApplication(NULL) ++{ ++} ++ ++GHOST_TSuccess ++GHOST_SystemHaiku::init() ++{ ++ GHOST_PRINT("GHOST_SystemHaiku::init()\n"); ++ ++ if (GHOST_kSuccess != GHOST_System::init()) { ++ cout << "GHOST_SystemHaiku::init() : GHOST_System::init() failed!" << endl; ++ return GHOST_kFailure; ++ } ++ ++ fApplication = new BApplication("application/x-vnd.GHOST.BApplication"); ++ ++// thread_id appThread = spawn_thread(GHOST_SystemHaiku::BApplicationThread, ++// "GHOST.BApplication", B_NORMAL_PRIORITY, 0); ++// if (appThread == B_NO_MORE_THREADS) { ++// GHOST_PRINT("GHOST_SystemHaiku::init() : Reached maximum number of threads!\n"); ++// return GHOST_kFailure; ++// } ++// if (appThread == B_NO_MEMORY) { ++// GHOST_PRINT( "GHOST_SystemHaiku::init() : Not enough memory to allocate the resources for another thread.\n"); ++// return GHOST_kFailure; ++// } ++ ++ // TODO: It seems the application is not necessary to be Run()ed. ++ /* Resume the initially suspended thread. */ ++// if (B_OK != resume_thread(appThread)) ++// return GHOST_kFailure; ++ ++ fDisplayManager = new GHOST_DisplayManagerHaiku(); ++ ++ return GHOST_kSuccess; ++} ++ ++GHOST_TSuccess ++GHOST_SystemHaiku::exit() ++{ ++ GHOST_PRINT("GHOST_SystemHaiku::exit()\n"); ++ fApplication->Quit(); ++ return GHOST_System::exit(); ++} ++ ++GHOST_TUns8 ++GHOST_SystemHaiku::getNumDisplays() const ++{ ++ GHOST_TUns8 numDisplays; ++ fDisplayManager->getNumDisplays(numDisplays); ++ return numDisplays; ++} ++ ++void ++GHOST_SystemHaiku::getMainDisplayDimensions(GHOST_TUns32& width, GHOST_TUns32& height) const ++{ ++ //GHOST_PRINT("GHOST_SystemHaiku::getMainDisplayDimensions()\n"); ++ GHOST_DisplaySetting setting; ++ fDisplayManager->getDisplaySetting((GHOST_TUns8)0, (GHOST_TInt32)0, setting); ++ width = setting.xPixels; ++ height = setting.yPixels; ++} ++ ++GHOST_IWindow* ++GHOST_SystemHaiku::createWindow( ++ const STR_String& title, ++ GHOST_TInt32 left, GHOST_TInt32 top, GHOST_TUns32 width, GHOST_TUns32 height, ++ GHOST_TWindowState state, GHOST_TDrawingContextType type, ++ const bool stereoVisual) ++{ ++ GHOST_WindowHaiku* window = new GHOST_WindowHaiku( ++ this, title, left, top, width, height, state, type, stereoVisual); ++ ++ m_windowManager->addWindow(window); ++ ++ return window; ++} ++ ++bool ++GHOST_SystemHaiku::processEvents(bool waitForEvent) ++{ ++ // TODO ++ //GHOST_PRINT("TODO GHOST_SystemHaiku::processEvents()"); ++ return true; ++} ++ ++GHOST_TSuccess ++GHOST_SystemHaiku::getCursorPosition(GHOST_TInt32& x, GHOST_TInt32& y) const ++{ ++ return GHOST_kFailure; ++} ++ ++GHOST_TSuccess ++GHOST_SystemHaiku::setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y) const ++{ ++ return GHOST_kFailure; ++} ++ ++GHOST_TSuccess ++GHOST_SystemHaiku::getModifierKeys(GHOST_ModifierKeys& keys) const ++{ ++ return GHOST_kFailure; ++} ++ ++GHOST_TSuccess ++GHOST_SystemHaiku::getButtons(GHOST_Buttons& buttons) const ++{ ++ return GHOST_kFailure; ++} ++ ++GHOST_TUns8* ++GHOST_SystemHaiku::getClipboard(int flag) const ++{ ++ // TODO ++ return NULL; ++} ++ ++void ++GHOST_SystemHaiku::putClipboard(GHOST_TInt8 *buffer, int flag) const ++{ ++ // TODO ++} +diff -Naur _res/blender-2.47/intern/ghost/intern/GHOST_SystemHaiku.h ./blender-2.47-haiku-1/intern/ghost/intern/GHOST_SystemHaiku.h +--- _res/blender-2.47/intern/ghost/intern/GHOST_SystemHaiku.h 1970-01-01 01:00:00.000000000 +0100 ++++ ./blender-2.47-haiku-1/intern/ghost/intern/GHOST_SystemHaiku.h 2008-12-01 22:44:59.000000000 +0100 +@@ -0,0 +1,145 @@ ++#ifndef _GHOST_SYSTEM_HAIKU_H_ ++#define _GHOST_SYSTEM_HAIKU_H_ ++ ++#include "GHOST_System.h" ++#include "../GHOST_Types.h" ++#include "GHOST_DisplayManagerHaiku.h" ++ ++#include ++ ++/** ++ * Haiku GHOST_System implementation ++ * @author Michael Weirauch ++ * @date 2008-10-04 ++ * @see GHOST_System ++ */ ++class GHOST_SystemHaiku : public GHOST_System ++{ ++public: ++ GHOST_SystemHaiku(); ++ ++ /** ++ * Initialize the system. ++ * @return Indication of success. ++ */ ++ virtual GHOST_TSuccess init(); ++ ++ static int32 BApplicationThread(void* arg) { ++ // TODO investigate why the look is necessary here. ++ be_app->Lock(); ++ return be_app->Run(); ++ } ++ ++ /** ++ * Shut the system down. ++ * @return Indication of success. ++ */ ++ virtual GHOST_TSuccess exit(); ++ ++ /*************************************************************************************** ++ ** Display/window management functionality ++ ***************************************************************************************/ ++ ++ /** ++ * Returns the number of displays on this system. ++ * @return The number of displays. ++ */ ++ virtual GHOST_TUns8 getNumDisplays() const; ++ ++ /** ++ * Returns the dimensions of the main display on this system. ++ * @return The dimension of the main display. ++ */ ++ virtual void getMainDisplayDimensions(GHOST_TUns32& width, GHOST_TUns32& height) const; ++ ++ /** ++ * Create a new window. ++ * The new window is added to the list of windows managed. ++ * Never explicitly delete the window, use disposeWindow() instead. ++ * @param title The name of the window (displayed in the title bar of the window if the OS supports it). ++ * @param left The coordinate of the left edge of the window. ++ * @param top The coordinate of the top edge of the window. ++ * @param width The width the window. ++ * @param height The height the window. ++ * @param state The state of the window when opened. ++ * @param type The type of drawing context installed in this window. ++ * @param stereoVisual Create a stereo visual for quad buffered stereo. ++ * @return The new window (or 0 if creation failed). ++ */ ++ virtual GHOST_IWindow* createWindow( ++ const STR_String& title, ++ GHOST_TInt32 left, GHOST_TInt32 top, GHOST_TUns32 width, GHOST_TUns32 height, ++ GHOST_TWindowState state, GHOST_TDrawingContextType type, ++ const bool stereoVisual); ++ ++ /*************************************************************************************** ++ ** Event management functionality ++ ***************************************************************************************/ ++ ++ /** ++ * Retrieves events from the system and stores them in the queue. ++ * @param waitForEvent Flag to wait for an event (or return immediately). ++ * @return Indication of the presence of events. ++ */ ++ virtual bool processEvents(bool waitForEvent); ++ ++ /*************************************************************************************** ++ ** Cursor management functionality ++ ***************************************************************************************/ ++ ++ /** ++ * Returns the current location of the cursor (location in screen coordinates) ++ * @param x The x-coordinate of the cursor. ++ * @param y The y-coordinate of the cursor. ++ * @return Indication of success. ++ */ ++ virtual GHOST_TSuccess getCursorPosition(GHOST_TInt32& x, GHOST_TInt32& y) const; ++ ++ /** ++ * Updates the location of the cursor (location in screen coordinates). ++ * Not all operating systems allow the cursor to be moved (without the input device being moved). ++ * @param x The x-coordinate of the cursor. ++ * @param y The y-coordinate of the cursor. ++ * @return Indication of success. ++ */ ++ virtual GHOST_TSuccess setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y) const; ++ ++ /*************************************************************************************** ++ ** Other (internal) functionality. ++ ***************************************************************************************/ ++ ++ /** ++ * Returns the state of all modifier keys. ++ * @param keys The state of all modifier keys (true == pressed). ++ * @return Indication of success. ++ */ ++ virtual GHOST_TSuccess getModifierKeys(GHOST_ModifierKeys& keys) const; ++ ++ /** ++ * Returns the state of the mouse buttons (ouside the message queue). ++ * @param buttons The state of the buttons. ++ * @return Indication of success. ++ */ ++ virtual GHOST_TSuccess getButtons(GHOST_Buttons& buttons) const; ++ ++ /** ++ * Returns the selection buffer ++ * @param flag Only used on X11 ++ * @return Returns the clipboard data ++ */ ++ virtual GHOST_TUns8* getClipboard(int flag) const; ++ ++ /** ++ * Put data to the Clipboard ++ * @param buffer The buffer to copy to the clipboard ++ * @param flag The clipboard to copy too only used on X11 ++ */ ++ virtual void putClipboard(GHOST_TInt8 *buffer, int flag) const; ++ ++private: ++ GHOST_DisplayManagerHaiku* fDisplayManager; ++ ++ BApplication* fApplication; ++}; ++ ++#endif /* _GHOST_SYSTEM_HAIKU_H_ */ +diff -Naur _res/blender-2.47/intern/ghost/intern/GHOST_WindowHaiku.cpp ./blender-2.47-haiku-1/intern/ghost/intern/GHOST_WindowHaiku.cpp +--- _res/blender-2.47/intern/ghost/intern/GHOST_WindowHaiku.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ ./blender-2.47-haiku-1/intern/ghost/intern/GHOST_WindowHaiku.cpp 2008-12-29 19:13:13.000000000 +0100 +@@ -0,0 +1,554 @@ ++#include "GHOST_Debug.h" ++#include "GHOST_Event.h" ++#include "GHOST_EventButton.h" ++#include "GHOST_EventCursor.h" ++#include "GHOST_EventWheel.h" ++#include "GHOST_Window.h" ++#include "GHOST_WindowHaiku.h" ++ ++#include ++ ++GHOST_WindowHaiku::GHOST_WindowHaiku( ++ GHOST_System* system, ++ const STR_String& title, ++ GHOST_TInt32 left, ++ GHOST_TInt32 top, ++ GHOST_TUns32 width, ++ GHOST_TUns32 height, ++ GHOST_TWindowState state, ++ GHOST_TDrawingContextType type = GHOST_kDrawingContextTypeNone, ++ const bool stereoVisual = false) ++ : GHOST_Window(title,left,top,width,height,state,type,stereoVisual), ++ fWindow(NULL) ++{ ++#ifdef GHOST_DEBUG ++ printf("GHOST_WindowHaiku::GHOST_WindowHaiku(%s)\n", (const char*)title); ++#endif ++ BRect frame(left, top, left + width, top + height); ++ fWindow = new GHOSTBWindow( ++ system, ++ this, ++ frame, ++ title, ++ B_TITLED_WINDOW_LOOK, ++ B_NORMAL_WINDOW_FEEL, 0); ++ // TODO respect state input param! ++ fWindow->Show(); ++} ++ ++bool ++GHOST_WindowHaiku::getValid() const ++{ ++ GHOST_PRINT("GHOST_WindowHaiku::getValid()\n"); ++ return NULL != fWindow; ++} ++ ++void ++GHOST_WindowHaiku::setTitle(const STR_String& title) ++{ ++ fWindow->SetTitle(title); ++} ++ ++void ++GHOST_WindowHaiku::getTitle(STR_String& title) const ++{ ++ const char* wTitle = fWindow->Title(); ++ if (!wTitle) ++ title = wTitle; ++} ++ ++void ++GHOST_WindowHaiku::getWindowBounds(GHOST_Rect& bounds) const ++{ ++ BRect windowBounds = fWindow->Frame(); ++ bounds.set( ++ windowBounds.left, ++ windowBounds.top, ++ windowBounds.right, ++ windowBounds.bottom); ++} ++ ++void ++GHOST_WindowHaiku::getClientBounds(GHOST_Rect& bounds) const ++{ ++ BRect windowBounds = fWindow->Bounds(); ++ bounds.set( ++ 0, ++ 0, ++ windowBounds.right, ++ windowBounds.bottom); ++} ++ ++GHOST_TSuccess ++GHOST_WindowHaiku::setClientWidth(GHOST_TUns32 width) ++{ ++ BRect bounds = fWindow->Bounds(); ++ fWindow->ResizeTo(width, bounds.bottom); ++ return GHOST_kSuccess; ++} ++ ++GHOST_TSuccess ++GHOST_WindowHaiku::setClientHeight(GHOST_TUns32 height) ++{ ++ BRect bounds = fWindow->Bounds(); ++ fWindow->ResizeTo(bounds.right, height); ++ return GHOST_kSuccess; ++} ++ ++GHOST_TSuccess ++GHOST_WindowHaiku::setClientSize(GHOST_TUns32 width, GHOST_TUns32 height) ++{ ++ fWindow->ResizeTo(width, height); ++ return GHOST_kSuccess; ++} ++ ++void ++GHOST_WindowHaiku::screenToClient(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const ++{ ++ //GHOST_PRINT("GHOST_WindowHaiku::screenToClient()\n"); ++ ++ /* ++ * The mouse coordinates fired in GHOSTBWindow are ++ * already in client coordinates. ++ */ ++ outX = inX; ++ outY = inY; ++} ++ ++void ++GHOST_WindowHaiku::clientToScreen(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const ++{ ++ // TODO ++ GHOST_PRINT("GHOST_WindowHaiku::clientToScreen() : TODO\n"); ++} ++ ++GHOST_TWindowState ++GHOST_WindowHaiku::getState() const ++{ ++ // TODO other states ++ if (fWindow->IsMinimized()) ++ return GHOST_kWindowStateMinimized; ++ else ++ return GHOST_kWindowStateNormal; ++} ++ ++GHOST_TSuccess ++GHOST_WindowHaiku::setState(GHOST_TWindowState state) ++{ ++ // TODO ++ GHOST_PRINT("GHOST_WindowHaiku::setState() : TODO\n"); ++ return GHOST_kFailure; ++} ++ ++GHOST_TSuccess ++GHOST_WindowHaiku::setOrder(GHOST_TWindowOrder order) ++{ ++ // TODO ++ GHOST_PRINT("GHOST_WindowHaiku::setOrder() : TODO\n"); ++ return GHOST_kFailure; ++} ++ ++GHOST_TSuccess ++GHOST_WindowHaiku::swapBuffers() ++{ ++ if (m_drawingContextType == GHOST_kDrawingContextTypeOpenGL) { ++ GHOST_PRINT("GHOST_WindowHaiku::swapBuffers(Success)\n"); ++ fWindow->View()->SwapBuffers(); ++ return GHOST_kSuccess; ++ } ++ GHOST_PRINT("GHOST_WindowHaiku::swapBuffers(No openGL context)\n"); ++ return GHOST_kFailure; ++} ++ ++GHOST_TSuccess ++GHOST_WindowHaiku::activateDrawingContext() ++{ ++ // TODO investigate ++ if (m_drawingContextType == GHOST_kDrawingContextTypeOpenGL) { ++ GHOST_PRINT("GHOST_WindowHaiku::activateDrawingContext(OK) : INVESTIGATE\n"); ++ //fWindow->View()->LockGL(); ++ // FIXME aquire/makecurrent the context here? ++ //fWindow->InstantiateContext(); ++ return GHOST_kSuccess; ++ } ++ GHOST_PRINT("GHOST_WindowHaiku::activateDrawingContext(Failure) : INVESTIGATE\n"); ++ return GHOST_kFailure; ++} ++ ++GHOST_TSuccess ++GHOST_WindowHaiku::invalidate() ++{ ++ // TODO investigate ++ GHOST_PRINT("GHOST_WindowHaiku::invalidate()\n"); ++ fWindow->UpdateIfNeeded(); ++ return GHOST_kSuccess; ++} ++ ++const GHOST_TabletData* ++GHOST_WindowHaiku::GetTabletData() ++{ ++ // TODO ++ return NULL; ++} ++ ++GHOST_TSuccess ++GHOST_WindowHaiku::installDrawingContext(GHOST_TDrawingContextType type) ++{ ++ // TODO ++ GHOST_PRINT("GHOST_WindowHaiku::installDrawingContext() : TODO\n"); ++ return GHOST_kFailure; ++} ++ ++GHOST_TSuccess ++GHOST_WindowHaiku::removeDrawingContext() ++{ ++ // TODO investigate ++ GHOST_PRINT("GHOST_WindowHaiku::removeDrawingContext() : TODO\n"); ++ return GHOST_kSuccess; ++} ++ ++GHOST_TSuccess ++GHOST_WindowHaiku::setWindowCursorVisibility(bool visible) ++{ ++ GHOST_PRINT("GHOST_WindowHaiku::setWindowCursorVisibility()\n"); ++ if (visible) ++ be_app->ShowCursor(); ++ else ++ be_app->HideCursor(); ++ ++ return GHOST_kSuccess; ++} ++ ++GHOST_TSuccess ++GHOST_WindowHaiku::setWindowCursorShape(GHOST_TStandardCursor shape) ++{ ++ // TODO ++ GHOST_PRINT("GHOST_WindowHaiku::setWindowCursorShape() : TODO\n"); ++ return GHOST_kFailure; ++} ++ ++GHOST_TSuccess ++GHOST_WindowHaiku::setWindowCustomCursorShape(GHOST_TUns8 bitmap[16][2], GHOST_TUns8 mask[16][2], ++ int hotX, int hotY) ++{ ++ // TODO ++ GHOST_PRINT("GHOST_WindowHaiku::setWindowCustomCursorShape() : TODO\n"); ++ return GHOST_kFailure; ++} ++ ++GHOST_TSuccess ++GHOST_WindowHaiku::setWindowCustomCursorShape(GHOST_TUns8 *bitmap, GHOST_TUns8 *mask, ++ int szx, int szy, int hotX, int hotY, int fg, int bg) ++{ ++ // TODO ++ GHOST_PRINT("GHOST_WindowHaiku::setWindowCustomCursorShape() : TODO\n"); ++ return GHOST_kFailure; ++} ++ ++/* ++ * GHOSTBWindow ++ */ ++ ++GHOSTBWindow::GHOSTBWindow(GHOST_System* system, GHOST_Window* window, ++ BRect frame, const char* title, ++ window_look look, window_feel feel, uint32 flags, ++ uint32 workspace = B_CURRENT_WORKSPACE) ++ : BWindow(frame, title, look, feel, flags, workspace), ++ fGSystem(system), ++ fGWindow(window), ++ fView(NULL), ++ fLastMouseButton(0) ++{ ++ InstantiateContext(); ++} ++ ++void ++GHOSTBWindow::InstantiateContext() { ++ fView = new BGLView( ++ Bounds(), ++ "GHOST.BGLView", ++ B_FOLLOW_ALL, ++ 0, ++ BGL_RGB | BGL_DOUBLE | BGL_DEPTH | BGL_ALPHA | BGL_STENCIL ++ ); ++ AddChild(fView); ++} ++ ++void ++GHOSTBWindow::DispatchMessage( ++ BMessage* msg, BHandler* target) ++{ ++ GHOST_Event* event = NULL; ++ bool dispatch = true; ++ switch (msg->what) ++ { ++// case B_KEY_DOWN : ++// case B_KEY_UP : ++// { ++// int8 bbyte = 0; ++// int32 bkey = 0; ++// ++// msg->FindInt8( "byte", &bbyte ); ++// msg->FindInt32( "key", &bkey ); ++// ++// GHOST_TKey gkey = GHOST_kKeyUnknown; ++// ++// if( ( bbyte >= 'A' ) && ( bbyte <= 'Z' ) ) ++// { ++// gkey = GHOST_TKey( bbyte - 'A' + int( GHOST_kKeyA ) ); ++// } ++// else if( ( bbyte >= 'a' ) && ( bbyte <= 'z' ) ) ++// { ++// gkey = GHOST_TKey( bbyte - 'a' + int( GHOST_kKeyA ) ); ++// } ++// else if( ( bkey >= B_F1_KEY ) && ( bkey <= B_F12_KEY ) ) ++// { ++// gkey = GHOST_TKey( bkey - B_F1_KEY + int( GHOST_kKeyF1 ) ); ++// } ++// else ++// { ++// /* multibyte character recognition could go in here */ ++// ++// if( gkey == GHOST_kKeyUnknown ) ++// { ++// switch( bkey ) ++// { ++// /* Numpad keys */ ++// case 0x64 : gkey = GHOST_kKeyNumpad0; break; ++// case 0x58 : gkey = GHOST_kKeyNumpad1; break; ++// case 0x59 : gkey = GHOST_kKeyNumpad2; break; ++// case 0x5a : gkey = GHOST_kKeyNumpad3; break; ++// case 0x48 : gkey = GHOST_kKeyNumpad4; break; ++// case 0x49 : gkey = GHOST_kKeyNumpad5; break; ++// case 0x4a : gkey = GHOST_kKeyNumpad6; break; ++// case 0x37 : gkey = GHOST_kKeyNumpad7; break; ++// case 0x38 : gkey = GHOST_kKeyNumpad8; break; ++// case 0x39 : gkey = GHOST_kKeyNumpad9; break; ++// case 0x65 : gkey = GHOST_kKeyNumpadPeriod; break; ++// case 0x5b : gkey = GHOST_kKeyNumpadEnter; break; ++// case 0x3a : gkey = GHOST_kKeyNumpadPlus; break; ++// case 0x25 : gkey = GHOST_kKeyNumpadMinus; break; ++// case 0x24 : gkey = GHOST_kKeyNumpadAsterisk; break; ++// case 0x23 : gkey = GHOST_kKeyNumpadSlash; break; ++// ++// /* Other keys */ ++// case 0x1e : gkey = GHOST_kKeyBackSpace; break; ++// case 0x26 : gkey = GHOST_kKeyTab; break; ++// case 0x47 : gkey = GHOST_kKeyEnter; break; ++// case 0x1 : gkey = GHOST_kKeyEsc; break; ++// case 0x5e : gkey = GHOST_kKeySpace; break; ++// ++// /* Arrow keys */ ++// case 0x61 : gkey = GHOST_kKeyLeftArrow; break; ++// case 0x63 : gkey = GHOST_kKeyRightArrow; break; ++// case 0x57 : gkey = GHOST_kKeyUpArrow; break; ++// case 0x62 : gkey = GHOST_kKeyDownArrow; break; ++// ++// /* Navigation keys */ ++// case 0x1f : gkey = GHOST_kKeyInsert; break; ++// case 0x32 : gkey = GHOST_kKeyDelete; break; ++// case 0x20 : gkey = GHOST_kKeyHome; break; ++// case 0x35 : gkey = GHOST_kKeyEnd; break; ++// case 0x21 : gkey = GHOST_kKeyUpPage; break; ++// case 0x36 : gkey = GHOST_kKeyDownPage; break; ++// } ++// } ++// ++// if( gkey == GHOST_kKeyUnknown ) ++// { ++// switch( bbyte ) ++// { ++// /* normal Number keys */ ++// case 0x30 : gkey = GHOST_kKey0; break; ++// case 0x31 : gkey = GHOST_kKey1; break; ++// case 0x32 : gkey = GHOST_kKey2; break; ++// case 0x33 : gkey = GHOST_kKey3; break; ++// case 0x34 : gkey = GHOST_kKey4; break; ++// case 0x35 : gkey = GHOST_kKey5; break; ++// case 0x36 : gkey = GHOST_kKey6; break; ++// case 0x37 : gkey = GHOST_kKey7; break; ++// case 0x38 : gkey = GHOST_kKey8; break; ++// case 0x39 : gkey = GHOST_kKey9; break; ++// ++// /* additional keys */ ++// case 0x22 : gkey = GHOST_kKeyQuote; break; ++// case 0x2c : gkey = GHOST_kKeyComma; break; ++// case 0x2d : gkey = GHOST_kKeyMinus; break; ++// case 0x2e : gkey = GHOST_kKeyPeriod; break; ++// case 0x2f : gkey = GHOST_kKeySlash; break; ++// case 0x3b : gkey = GHOST_kKeySemicolon; break; ++// case 0x3d : gkey = GHOST_kKeyEqual; break; ++// case 0x5b : gkey = GHOST_kKeyLeftBracket; break; ++// case 0x5c : gkey = GHOST_kKeyBackslash; break; ++// case 0x5d : gkey = GHOST_kKeyRightBracket; break; ++// case 0x60 : gkey = GHOST_kKeyAccentGrave; break; ++// } ++// } ++// ++// /* Unhandled GHOST keys: */ ++// // GHOST_kKeyLineFeed ? ++// // GHOST_kKeyClear ? ++// } ++// ++// GHOST_TEventType type; ++// if( msg->what == B_KEY_DOWN ) ++// type = GHOST_kEventKeyDown; ++// else ++// type = GHOST_kEventKeyUp; ++// ++// fWindowZETA->getSystemZETA()->pushEvent( ++// new GHOST_EventKey( ++// fWindowZETA->getSystemZETA()->getMilliSeconds(), ++// type, ++// fWindowZETA, ++// gkey, ++// bbyte ) ); ++// ++// /* needs to be forwarded */ ++// BWindow::DispatchMessage( msg, target ); ++// ++// break; ++// } ++ case B_MOUSE_DOWN : ++ case B_MOUSE_UP : ++ { ++ GHOST_TButtonMask bmask = GHOST_kButtonMaskLeft; ++ int32 buttons; ++ msg->FindInt32("buttons", &buttons); ++ ++ /* ++ * As the B_MOUSE_UP message doesnt tell which button was released, ++ * we store the last button further below in fLastMouseButton. ++ * When we receive the B_MOUSE_UP, we switch(fLastMouseButton) ++ * instead against buttons. ++ */ ++ ++ switch(msg->what == B_MOUSE_DOWN ? buttons : fLastMouseButton) ++ { ++ case B_PRIMARY_MOUSE_BUTTON : ++ { ++ bmask = GHOST_kButtonMaskLeft; ++ break; ++ } ++ case B_SECONDARY_MOUSE_BUTTON : ++ { ++ bmask = GHOST_kButtonMaskRight; ++ break; ++ } ++ case B_TERTIARY_MOUSE_BUTTON : ++ { ++ bmask = GHOST_kButtonMaskMiddle; ++ break; ++ } ++ } ++ ++ GHOST_TEventType type; ++ if (msg->what == B_MOUSE_DOWN) ++ { ++ fLastMouseButton = buttons; ++ type = GHOST_kEventButtonDown; ++ } ++ else ++ { ++ type = GHOST_kEventButtonUp; ++ } ++ ++ // FIXME use message time???????? ++ event = new GHOST_EventButton( ++ fGSystem->getMilliSeconds(), ++ type, ++ fGWindow, ++ bmask); ++ break; ++ } ++ case B_MOUSE_MOVED : ++ { ++ BPoint point; ++ msg->FindPoint("where", &point); ++ ++ // FIXME use message time???????? ++ event = new GHOST_EventCursor( ++ fGSystem->getMilliSeconds(), ++ GHOST_kEventCursorMove, ++ fGWindow, ++ point.x, ++ point.y); ++ break; ++ } ++ case B_MOUSE_WHEEL_CHANGED : ++ { ++ float value; ++ msg->FindFloat("be:wheel_delta_y", &value); ++ ++ //value *= 3; /* dunno if to unprecise */ ++ ++ // FIXME use message time???????? ++ event = new GHOST_EventWheel( ++ fGSystem->getMilliSeconds(), ++ fGWindow, ++ floor(value)); ++ break; ++ } ++ case B_WINDOW_ACTIVATED : ++ { ++ bool active; ++ msg->FindBool("active", &active); ++ ++ GHOST_TEventType type; ++ if (active) ++ type = GHOST_kEventWindowActivate; ++ else ++ type = GHOST_kEventWindowDeactivate; ++ ++ // FIXME use message time???????? ++ event = new GHOST_Event( ++ fGSystem->getMilliSeconds(), ++ type, ++ fGWindow); ++ dispatch = false; // FIXME WHY? ++ break; ++ } ++ case B_WINDOW_RESIZED : ++ { ++ // FIXME use message time???????? ++ event = new GHOST_Event( ++ fGSystem->getMilliSeconds(), ++ GHOST_kEventWindowSize, ++ fGWindow); ++ break; ++ } ++ case B_QUIT_REQUESTED : ++ { ++ // FIXME use message time???????? ++ event = new GHOST_Event( ++ fGSystem->getMilliSeconds(), ++ GHOST_kEventWindowClose, ++ fGWindow); ++ /* Don't dispatch. */ ++ dispatch = false; ++ break; ++ } ++ case _UPDATE_ : ++ case _UPDATE_IF_NEEDED_ : ++ { ++ // FIXME use message time???????? ++ event = new GHOST_Event( ++ fGSystem->getMilliSeconds(), ++ GHOST_kEventWindowUpdate, ++ fGWindow); ++ break; ++ } ++ default : ++ { ++ BWindow::DispatchMessage(msg, target); ++ } ++ } ++ ++ if (dispatch) { ++ BWindow::DispatchMessage(msg, target); ++ } ++ ++ if (event) { ++ fGSystem->pushEvent(event); ++ } ++} +diff -Naur _res/blender-2.47/intern/ghost/intern/GHOST_WindowHaiku.h ./blender-2.47-haiku-1/intern/ghost/intern/GHOST_WindowHaiku.h +--- _res/blender-2.47/intern/ghost/intern/GHOST_WindowHaiku.h 1970-01-01 01:00:00.000000000 +0100 ++++ ./blender-2.47-haiku-1/intern/ghost/intern/GHOST_WindowHaiku.h 2008-12-01 22:44:59.000000000 +0100 +@@ -0,0 +1,216 @@ ++#ifndef _GHOST_WINDOW_HAIKU_H_ ++#define _GHOST_WINDOW_HAIKU_H_ ++ ++#include "GHOST_System.h" ++#include "GHOST_Window.h" ++ ++#include ++ ++class GHOSTBWindow; ++ ++class GHOST_WindowHaiku : public GHOST_Window ++{ ++public: ++ /** ++ * Constructor. ++ * Creates a new window and opens it. ++ * To check if the window was created properly, use the getValid() method. ++ * @param title The text shown in the title bar of the window. ++ * @param left The coordinate of the left edge of the window. ++ * @param top The coordinate of the top edge of the window. ++ * @param width The width the window. ++ * @param heigh The height the window. ++ * @param state The state the window is initially opened with. ++ * @param type The type of drawing context installed in this window. ++ * @param stereoVisual Stereo visual for quad buffered stereo. ++ */ ++ GHOST_WindowHaiku( ++ GHOST_System* system, ++ const STR_String& title, ++ GHOST_TInt32 left, ++ GHOST_TInt32 top, ++ GHOST_TUns32 width, ++ GHOST_TUns32 height, ++ GHOST_TWindowState state, ++ GHOST_TDrawingContextType type = GHOST_kDrawingContextTypeNone, ++ const bool stereoVisual = false); ++ ++ /** ++ * Returns indication as to whether the window is valid. ++ * @return The validity of the window. ++ */ ++ virtual bool getValid() const; ++ ++ /** ++ * Sets the title displayed in the title bar. ++ * @param title The title to display in the title bar. ++ */ ++ virtual void setTitle(const STR_String& title); ++ ++ /** ++ * Returns the title displayed in the title bar. ++ * @param title The title displayed in the title bar. ++ */ ++ virtual void getTitle(STR_String& title) const; ++ ++ /** ++ * Returns the window rectangle dimensions. ++ * These are screen coordinates. ++ * @param bounds The bounding rectangle of the window. ++ */ ++ virtual void getWindowBounds(GHOST_Rect& bounds) const; ++ ++ /** ++ * Returns the client rectangle dimensions. ++ * The left and top members of the rectangle are always zero. ++ * @param bounds The bounding rectangle of the client area of the window. ++ */ ++ virtual void getClientBounds(GHOST_Rect& bounds) const; ++ ++ /** ++ * Resizes client rectangle width. ++ * @param width The new width of the client area of the window. ++ */ ++ virtual GHOST_TSuccess setClientWidth(GHOST_TUns32 width); ++ ++ /** ++ * Resizes client rectangle height. ++ * @param height The new height of the client area of the window. ++ */ ++ virtual GHOST_TSuccess setClientHeight(GHOST_TUns32 height); ++ ++ /** ++ * Resizes client rectangle. ++ * @param width The new width of the client area of the window. ++ * @param height The new height of the client area of the window. ++ */ ++ virtual GHOST_TSuccess setClientSize(GHOST_TUns32 width, GHOST_TUns32 height); ++ ++ /** ++ * Converts a point in screen coordinates to client rectangle coordinates ++ * @param inX The x-coordinate on the screen. ++ * @param inY The y-coordinate on the screen. ++ * @param outX The x-coordinate in the client rectangle. ++ * @param outY The y-coordinate in the client rectangle. ++ */ ++ virtual void screenToClient(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const; ++ ++ /** ++ * Converts a point in screen coordinates to client rectangle coordinates ++ * @param inX The x-coordinate in the client rectangle. ++ * @param inY The y-coordinate in the client rectangle. ++ * @param outX The x-coordinate on the screen. ++ * @param outY The y-coordinate on the screen. ++ */ ++ virtual void clientToScreen(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const; ++ ++ /** ++ * Returns the state of the window (normal, minimized, maximized). ++ * @return The state of the window. ++ */ ++ virtual GHOST_TWindowState getState() const; ++ ++ /** ++ * Sets the state of the window (normal, minimized, maximized). ++ * @param state The state of the window. ++ * @return Indication of success. ++ */ ++ virtual GHOST_TSuccess setState(GHOST_TWindowState state); ++ ++ /** ++ * Sets the order of the window (bottom, top). ++ * @param order The order of the window. ++ * @return Indication of success. ++ */ ++ virtual GHOST_TSuccess setOrder(GHOST_TWindowOrder order); ++ ++ /** ++ * Swaps front and back buffers of a window. ++ * @return A boolean success indicator. ++ */ ++ virtual GHOST_TSuccess swapBuffers(); ++ ++ /** ++ * Activates the drawing context of this window. ++ * @return A boolean success indicator. ++ */ ++ virtual GHOST_TSuccess activateDrawingContext(); ++ ++ /** ++ * Invalidates the contents of this window. ++ * @return Indication of success. ++ */ ++ virtual GHOST_TSuccess invalidate(); ++ ++ /** ++ * Returns the tablet data (pressure etc). ++ * @return The tablet data (pressure etc). ++ */ ++ virtual const GHOST_TabletData* GetTabletData(); ++ ++ /** ++ * Tries to install a rendering context in this window. ++ * @param type The type of rendering context installed. ++ * @return Indication as to whether installation has succeeded. ++ */ ++ virtual GHOST_TSuccess installDrawingContext(GHOST_TDrawingContextType type); ++ ++ /** ++ * Removes the current drawing context. ++ * @return Indication as to whether removal has succeeded. ++ */ ++ virtual GHOST_TSuccess removeDrawingContext(); ++ ++ /** ++ * Sets the cursor visibility on the window using ++ * native window system calls. ++ */ ++ virtual GHOST_TSuccess setWindowCursorVisibility(bool visible); ++ ++ /** ++ * Sets the cursor shape on the window using ++ * native window system calls. ++ */ ++ virtual GHOST_TSuccess setWindowCursorShape(GHOST_TStandardCursor shape); ++ ++ /** ++ * Sets the cursor shape on the window using ++ * native window system calls. ++ */ ++ virtual GHOST_TSuccess setWindowCustomCursorShape(GHOST_TUns8 bitmap[16][2], GHOST_TUns8 mask[16][2], ++ int hotX, int hotY); ++ ++ virtual GHOST_TSuccess setWindowCustomCursorShape(GHOST_TUns8 *bitmap, GHOST_TUns8 *mask, ++ int szx, int szy, int hotX, int hotY, int fg, int bg); ++ ++private: ++ GHOSTBWindow* fWindow; ++}; ++ ++#include ++ ++class GHOSTBWindow : public BWindow ++{ ++public: ++ GHOSTBWindow(GHOST_System* system, GHOST_Window* window, ++ BRect frame, const char* title, ++ window_look look, window_feel feel, uint32 flags, ++ uint32 workspace = B_CURRENT_WORKSPACE); ++ ++ virtual void DispatchMessage(BMessage* msg, BHandler* target); ++ ++ void InstantiateContext(); ++ ++ BGLView* View() { return fView; }; ++ ++private: ++ GHOST_System* fGSystem; ++ ++ GHOST_Window* fGWindow; ++ ++ BGLView* fView; ++ ++ int32 fLastMouseButton; ++}; ++ ++#endif // _GHOST_WINDOW_HAIKU_H_ +diff -Naur _res/blender-2.47/source/blender/blenlib/intern/storage.c ./blender-2.47-haiku-1/source/blender/blenlib/intern/storage.c +--- _res/blender-2.47/source/blender/blenlib/intern/storage.c 2008-12-29 19:15:44.000000000 +0100 ++++ ./blender-2.47-haiku-1/source/blender/blenlib/intern/storage.c 2008-12-01 22:45:00.000000000 +0100 +@@ -47,7 +47,7 @@ + #include + #include + +-#if defined (__sun__) || defined (__sun) ++#if defined (__sun__) || defined (__sun) || defined(__HAIKU__) + #include /* Other modern unix os's should probably use this also */ + #elif !defined(__FreeBSD__) && !defined(linux) && (defined(__sgi) || defined(__sparc) || defined(__sparc__)) + #include +@@ -77,7 +77,7 @@ + + + #include +-#if !defined(__BeOS) && !defined(WIN32) ++#if !defined(__BeOS) && !defined(WIN32) && !defined(__HAIKU__) + #include /* tape comando's */ + #endif + #include /* strcpy etc.. */ +@@ -179,7 +179,7 @@ + return (double) (freec*bytesps*sectorspc); + #else + +-#if defined (__sun__) || defined (__sun) ++#if defined (__sun__) || defined (__sun) || defined(__HAIKU__) + struct statvfs disk; + #else + struct statfs disk; +@@ -204,7 +204,7 @@ + return -1; + #endif + +-#if defined (__sun__) || defined (__sun) ++#if defined (__sun__) || defined (__sun) || defined(__HAIKU__) + if (statvfs(name, &disk)) return(-1); + #elif !defined(__FreeBSD__) && !defined(linux) && (defined (__sgi) || defined(__sparc) || defined(__sparc__)) + /* WARNING - This may not be supported by geeneric unix os's - Campbell */ +diff -Naur _res/blender-2.47/tools/Blender.pyc ./blender-2.47-haiku-1/tools/Blender.pyc +--- _res/blender-2.47/tools/Blender.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ ./blender-2.47-haiku-1/tools/Blender.pyc 2008-12-29 18:18:05.000000000 +0100 +@@ -0,0 +1,120 @@ ++ ++Z4Ic@sdZddkZddkZddkZddkZddkZddklZddk Z ++ddk Z ++ddk Z ++ddk Z ++ddkZeiZe ++iiZe ++iiZe ++iiZeiZdZdZgZgZdZdZgZgZdgZhadZ dZ!ddddd Z"ddddd ++Z#ddd Z$d Z%d Z&dZ'dZ(dZ)dZ*dZ+dZ,dZ-dZ.dZ/ddddZ0dZ1defdYZ2dS(s ++tools.BlenderEnvironment ++ ++This environment builds on SCons.Script.SConscript.SConsEnvironment ++ ++* library repository ++* custom printout ++* wrapper functions ++ ++TODO: clean up and sanitise code - crosscheck with btools and SConstruct ++to kill any code duplication ++ ++iN(tSConsEnvironmentttcorecCstS(N(t resources(((sA/storage/data/devel/blender/blender-2.47-haiku-1/tools/Blender.pyt getresources5scCsxtD]}ht|(R#tsyslibs((sA/storage/data/devel/blender/blender-2.47-haiku-1/tools/Blender.pyt setup_syslibss4 "      cCstidtiGHxtD]}tid|tiGHd}g}x+t|iD]\}}|i|qTW|it|}x/|D]'}||}dG|G|GH|d7}qWqWdS(Ns Priorities:s is i( tbctOKBLUEtENDCRtOKGREENRRR R!(ttt new_priorityR%R&R'R(R)((sA/storage/data/devel/blender/blender-2.47-haiku-1/tools/Blender.pytpropose_prioritiess   ++ ++ ++ c ++Cs?tid}tid}tidid }g}|ddjotidjotdd }|id ++||id ||id ||id |id|i |i ++dddgn6|i ++dd|d|dd|ddtig|i t d|t dgg}n|S(s% ++ Generate a buildinfo object ++ s%Y-%m-%ds%H:%M:%St ++svnversionit BF_BUILDINFOitwin32ssource/creator/winbuildinfo.htwschar *build_date="%s"; ++schar *build_time="%s"; ++schar *build_rev="%s"; ++schar *build_platform="win32"; ++schar *build_type="dynamic"; ++t ++CPPDEFINESt NAN_BUILDINFOt ++BUILD_DATEsBUILD_TIME='"%s"'sBUILD_DATE='"%s"'sBUILD_TYPE='"dynamic"'sBUILD_REV='"%s"'sBUILD_PLATFORM='"%s"'ssource/creator/%s_buildinfossource/creator/buildinfo.c( ttimetstrftimetostpopentreadtsystplatformtopentwritetclosetAppendtObjectR"(R#t ++build_typet ++build_datet ++build_timet build_revtobjtbuild_info_file((sA/storage/data/devel/blender/blender-2.47-haiku-1/tools/Blender.pyt buildinfos.   ++cCsVd|d}tii|\}}tidtidtid|dtiS(Ns%sit Compilings ==> 't'(RktpathtsplitR[R\R]R^(ttargettsourcetenvtatdtf((sA/storage/data/devel/blender/blender-2.47-haiku-1/tools/Blender.pytmy_compile_printscCsVd|d}tii|\}}tidtidtid|dtiS(Ns%sis Creating MOCs ==> 'R}(RkR~RR[R\R]R^(RRRRRR((sA/storage/data/devel/blender/blender-2.47-haiku-1/tools/Blender.pyt my_moc_printscCsVd|d}tii|\}}tidtidtid|dtiS(Ns%sisLinking librarys ==> 'R}(RkR~RR[R\R]R^(RRRR_RR((sA/storage/data/devel/blender/blender-2.47-haiku-1/tools/Blender.pytmy_linking_printscCsVd|d}tii|\}}tidtidtid|dtiS(Ns%sisLinking programs ==> 'R}(RkR~RR[R\R]R^(RRRR_RR((sA/storage/data/devel/blender/blender-2.47-haiku-1/tools/Blender.pytmy_program_printscCsRtii|}tii|}||dd<||dd<||dd %ss$cp %s/%s %s/%s.app/Contents/MacOS/%ss(mkdir %s/%s.app/Contents/MacOS/.blender/s/%s.app/Contents/MacOS/.blenders/bin/.blender/.bfont.ttfs/bin/.blender/.Blanguagess:cp -R %s/bin/.blender/locale %s/%s.app/Contents/Resources/s?cp -R %s/bin/.blender/locale %s/%s.app/Contents/MacOS/.blender/s<cp %s/bin/.blender/.Blanguages %s/%s.app/Contents/Resources/s;cp -R %s/release/scripts %s/%s.app/Contents/MacOS/.blender/s%chmod +x %s/%s.app/Contents/MacOS/%ss3find %s/%s.app -name .svn -prune -exec rm -rf {} \;s1find %s/%s.app -name .DS_Store -exec rm -rf {} \;(tshutiltcommandstos.pathR~RtDirtabspathR[R\R]tisdirtrmtreetcopytreet getoutputtcopy(RRRRRRkRtbuilddirtbtbldroottbinaryt sourcedirt ++sourceinfot ++targetinfotcmd((sA/storage/data/devel/blender/blender-2.47-haiku-1/tools/Blender.pytAppIt$sR    ++          c Cstii|di}d|did}d|tid}d|tid}tid|d|t|dd!d }|i}|it|dd!d ++} x'|D]} ++| i d| ++d d qW| itid |d |tid|dS(Nis"s*.sbr"s bscmake.tmp"s dir /b/s s >iitrRes" ++sbscmake /nologo /n /os @sdel ( ++RkR~tdirnameRtseptsystemRpt readlinesRrRq( RRRtbdtbscfiletbscpathcollectt ++bscpathtmptmyfiletlinestnewfiletl((sA/storage/data/devel/blender/blender-2.47-haiku-1/tools/Blender.pytbscXs  ++ ++tBlenderEnvironmentc BsqeZddddgdgdZdddggddddZdddddddddZdZRS( RidcCs| p| p| o"tid|tiGHtn|dd ++jo!tidtiGH|intidtiti|tiGH|i}|idt d ||}t ++i ||t i |dS( Ns2Cannot continue. Missing argument for BlenderRes R;swin32-vcs win32-mingwR<sBlenderRes is for windows only!sConfiguring resource Rslib/(swin32-vcs win32-mingws ++linuxcross(R[tFAILR]RtENDtHEADERR^tCopytRESR"RtDefaultRR (tselfRRR RR#tres((sA/storage/data/devel/blender/blender-2.47-haiku-1/tools/Blender.pyt ++BlenderResos % tcommonc ++Cs| p| p| o"tid|tiGHtn|tjpttdjo9|tjo;tidtiti|titi dtiGHn&tidtiti|tiGH|i ++}|i d||i d||do|i ddgn|d o|i dd ++gn|i d |d |d p |tjo8|i d t |d|i d t |dn)|i d |d|i d |d|do.|i d t |dd t |dn|o$|i d ||i d |n|i d t |d|i d t |d|iddtd|d|} ti|| n<tidtiti|tidti dtiGHtt|||dS(Ns6Cannot continue. Missing argument for BuildBlenderLib isConfiguring library s (debug mode)tCPPPATHRftWITH_BF_GAMEENGINEs GAMEBLENDER=1tWITH_BF_BULLETs WITH_BULLET=1tCXXFLAGStCCFLAGSREtBF_DEBUG_FLAGSt ++REL_CFLAGSt REL_CCFLAGSt ++BF_PROFILEtBF_PROFILE_FLAGStC_WARNtCC_WARNRRslib/Rs Not building s for tBF_QUICK(R[RR]RtquickieRt ++quickdebugRR^R\RRstReplaceR>RR"RRtWARNINGRR( ++RRtsourcestincludestdefinesR Rt compileflagsR#tlib((sA/storage/data/devel/blender/blender-2.47-haiku-1/tools/Blender.pyt ++BlenderLibs@   ;%    $;Rc Cstidtiti|tiGH|i}|dd#joK|idt|d|do"|iddd |d ++gqn|dd jo,|id|d|id|d n|dd joT|id|d|id|d |dido|i ddq/n|ddjo@|id|d|id|d |id|dn|do|id|dn|id||id||id||do,|id|d|id|dn|i ++d|d|d|} |do^|ddjoM|doB|i |d |} ++|i | ++| t g} ti|| nti|| ti| |ddjo*||d!<|i| ttd"tn| S($NsConfiguring program R;swin32-vctcygwint LINKFLAGStPLATFORM_LINKFLAGSREs/DEBUGs/PDB:s.pdbtlinux2tBF_PYTHON_LINKFLAGStsunos5tCXXRLtLINKs$CXXtdarwintBF_OPENGL_LINKFLAGSRRRtLIBPATHtLIBStWITH_BF_QUICKTIMEtBF_QUICKTIME_LIBtBF_QUICKTIME_LIBPATHRsbin/RtBF_BSCs.bscRR(swin32-vcscygwin(R[RR]R^RRsR>tPrependtendswithRRtFiletCommandRRRt program_listR t AddPostActionRRR( RRtprognameRRRtlibpatht ++binarykindR#tprogRtbrs((sA/storage/data/devel/blender/blender-2.47-haiku-1/tools/Blender.pyt BlenderProgsJ%  &   '  ++ cCsbtit|ddd}g}x7ti||D]"}|iti||dq8W|S(Nt ++SConscriptR(tstringtreplacet GetBuildPathtglobR (R#tpatternR~tfilesti((sA/storage/data/devel/blender/blender-2.47-haiku-1/tools/Blender.pytGlobs  N(t__name__t ++__module__R RRRR(((sA/storage/data/devel/blender/blender-2.47-haiku-1/tools/Blender.pyRms!)!'(3t__doc__RRkRRRiRntSCons.Script.SConscriptRt SCons.ActionRt ++SCons.Utilt SCons.Buildert ++SCons.TooltbcolorsR[tUtilR>RRRR"R Rt quicklistR t argumentsttargetsRt blenderdepsRRRRRRR*RARZRaR{RRRRRRRRRR(((sA/storage/data/devel/blender/blender-2.47-haiku-1/tools/Blender.pyssZ                     "  "      # 4  +\ No newline at end of file +diff -Naur _res/blender-2.47/tools/__init__.pyc ./blender-2.47-haiku-1/tools/__init__.pyc +--- _res/blender-2.47/tools/__init__.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ ./blender-2.47-haiku-1/tools/__init__.pyc 2008-12-29 18:18:05.000000000 +0100 +@@ -0,0 +1,2 @@ ++ ++Z4Ic@sdS(N((((sB/storage/data/devel/blender/blender-2.47-haiku-1/tools/__init__.pyss +\ No newline at end of file +diff -Naur _res/blender-2.47/tools/bcolors.pyc ./blender-2.47-haiku-1/tools/bcolors.pyc +--- _res/blender-2.47/tools/bcolors.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ ./blender-2.47-haiku-1/tools/bcolors.pyc 2008-12-29 18:18:05.000000000 +0100 +@@ -0,0 +1,3 @@ ++ ++Z4Ic@sdddYZdS(tbcolorscBs5eZdZdZdZdZdZdZdZRS(sssssscCs:d|_d|_d|_d|_d|_d|_dS(Nt(tHEADERtOKBLUEtOKGREENtWARNINGtFAILtENDC(tself((sA/storage/data/devel/blender/blender-2.47-haiku-1/tools/bcolors.pytdisable s      ( t__name__t ++__module__RRRRRRR (((sA/storage/data/devel/blender/blender-2.47-haiku-1/tools/bcolors.pyRsN((R(((sA/storage/data/devel/blender/blender-2.47-haiku-1/tools/bcolors.pyss +\ No newline at end of file +diff -Naur _res/blender-2.47/tools/btools.pyc ./blender-2.47-haiku-1/tools/btools.pyc +--- _res/blender-2.47/tools/btools.pyc 1970-01-01 01:00:00.000000000 +0100 ++++ ./blender-2.47-haiku-1/tools/btools.pyc 2008-12-29 18:18:05.000000000 +0100 +@@ -0,0 +1,103 @@ ++ ++Z4Ic@sddkZddkZddkZyddkZWnej ++onXyddkZWnej ++onXddkZddkZddk Z ddk ++Z ++ei Z ei i Z dZ dZdZdZdd dYZdZd Zd ++Zdddd ZdS( iNcCsvt|oNxb|iD]9\}}d|i||id|i||iGHqWnd|id|iGHdS(Ns s = s No command-line arguments given(tlent iteritemstOKBLUEtENDCtOKGREENtWARNING(targstbctktv((s@/storage/data/devel/blender/blender-2.47-haiku-1/tools/btools.pytprint_argumentss ++  5czCs.ddddddddd d ++d d d ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudtdvdwdxdygz}dzdwd{d|d}d~dddvddddddddddddldxdyg}||}h}xX|iD]J\}}||jo|||d?d@tdudvd'dAdBdCdDtddd'dEdFdGdHtddd'dIdJdKdLtddd'tddd'dMdNdOtddd'dPdQdRdSdTdUdVdWdXdYdZtddd tddd d[d\d]d^tddd'd_d`dadbdcddtddd'dedfdgtddd'tddd dhdidjdkdldmdndodptddd dqtddd drtddd'dsdtdudvtddd'tddd tddd tddd tdd d'td ++d d'td d d dwdx|S(yNRys Build a release or debug binary.RRzs(Target directory for intermediate files.s${BF_BUILDDIR}/extern/verseR{s(Whether to regenerate the protocol filestyesRwsUse VERSE if truetfalseRxsverse include dirs /usr/includeRvslocation of cvs lib dirt BF_DEBUG_LIBSs-list of libraries to build with debug symbolsR sbase path for pythontR sPython version to useR sinclude path for Python headersRsPath to the Python interpreterRsPython libraryRs Library pathRsPython link flagst BF_NO_ELBEEMsDisable Fluid SimRTs Enable YafrayttrueRsUse OpenAL if trueRsbase path for OpenALRsinclude path for python headersRsPath to OpenAL libraryRRsUse SDL if trueRs SDL base pathRsSDL include pathRs SDL libraryRsSDL library pathRsPthreads base pathRsPthreads include pathRsPthreads libraryRsPthreads library pathR sUse FMOD if trueR!sUse OPENEXR if trueR"sOPENEXR base pathR#sOPENEXR include pathR$sOPENEXR libraryR%sOPENEXR library pathR&sUse DDS if trueR'sUse FFMPEG if trueR*sFFMPEG base pathR(sFFMPEG libraryR)s#FFMPEG flags that must be preservedR+sFFMPEG includestBF_FFMPEG_LIBPATHsFFMPEG library pathR,sUse JPEG if trueR-sJPEG base pathR.sJPEG include pathR/s JPEG libraryR0sJPEG library pathR1sUse PNG if trueR2s PNG base pathR3sPNG include pathR4s PNG libraryR5sPNG library pathR6sTIFF base pathR7sTIFF include pathR8sUse ZLib if trueR9sZLib base pathR:sZLib include pathR;s ZLib libraryR<sZLib library pathR=s Use Gettext and Freetype if trueR>sgettext base pathR?sgettext include pathR@sgettext libraryRAsgettext library pathRBsUse iconv if trueRCsiconv base pathRDsiconv include pathREs iconv libraryRFsiconv library pathRKsBuild with gameengineRGsUse ODE if trueRHs ODE base pathRIsODE include pathRJs ODE libraryRLsUse Bullet if trueRMsBullet base dirRNsBullet include pathROsBullet libraryRPsSolid base dirs#/extern/solidRQsSolid include pathRRsWinTab base dirRSsWinTab include dirRUsFreetype base pathRVsFreetype include pathRWsFreetype libraryRXsFreetype library pathRsUse OpenMP if trueRYsUse QuickTime if trueRZsQuickTime base pathR[sQuickTime include pathR\sQuickTime libraryR]sQuickTime library pathR^sUse MESA if trueR_sOpenGL base pathR`sOpenGL include pathRasOpenGL librariesRbsOpenGL library pathRcsOpenGL static librariesRdsOpenGL link flagsResUse FTGL if trueRfsFTGL base pathRgsFTGL include pathRhsFTGL librariesRjsEnable GL ExtensionsRisBuild blenderplayer if trueRlsC-compiler flagsRmsC++-compiler flagsRntDefinesRosC release flagsRpsC++ release flagsRqsC warning flagsRrsC++ warning flagsRss Platform libsRtsPlatform linkflagsRs!Add profiling information if trueRusProfiling flagsRsAdd debug flags if trueRs Debug flagsRsCreate .bsc files (msvc only)Rs Build dirRsInstallation dirRsC compiler to useRsC++ compiler to useRsBuildtime in splash if trueR|sEnable tweak mode if trueR}s)Split src lib into several chunks if trueR~sdont install if trueRsEnable fancy output if trueRsEnable silent output if trueRks&Enable relocatable binary (linux only)Rsconfiguration flags for x264Rs configuration flags for xvidcore(sVERSE_BUILD_BINARYs Build a release or debug binary.srelease(sVERSE_BUILD_DIRs(Target directory for intermediate files.s${BF_BUILDDIR}/extern/verse(sVERSE_REGEN_PROTOs(Whether to regenerate the protocol filessyes(sBF_VERSE_INCLUDEsverse include dirs /usr/include(sLCGDIRslocation of cvs lib dir(sVERSE_BUILD_BINARYs Build a release or debug binary.srelease(sVERSE_BUILD_DIRs(Target directory for intermediate files.s${BF_BUILDDIR}/extern/verse(sVERSE_REGEN_PROTOs(Whether to regenerate the protocol filessyes(s BF_DEBUG_LIBSs-list of libraries to build with debug symbols(s BF_PYTHONsbase path for pythonR(sBF_PYTHON_VERSIONsPython version to useR(s BF_PYTHON_INCsinclude path for Python headersR(sBF_PYTHON_BINARYsPath to the Python interpreterR(s BF_PYTHON_LIBsPython libraryR(sBF_PYTHON_LIBPATHs Library pathR(sBF_PYTHON_LINKFLAGSsPython link flagsR(s BF_OPENALsbase path for OpenALR(s BF_OPENAL_INCsinclude path for python headersR(s BF_OPENAL_LIBsPath to OpenAL libraryR(sBF_OPENAL_LIBPATHsPath to OpenAL libraryR(sBF_SDLs SDL base pathR(s ++BF_SDL_INCsSDL include pathR(s ++BF_SDL_LIBs SDL libraryR(sBF_SDL_LIBPATHsSDL library pathR(s BF_PTHREADSsPthreads base pathR(sBF_PTHREADS_INCsPthreads include pathR(sBF_PTHREADS_LIBsPthreads libraryR(sBF_PTHREADS_LIBPATHsPthreads library pathR(s ++BF_OPENEXRsOPENEXR base pathR(sBF_OPENEXR_INCsOPENEXR include pathR(sBF_OPENEXR_LIBsOPENEXR libraryR(sBF_OPENEXR_LIBPATHsOPENEXR library pathR(s BF_FFMPEGsFFMPEG base pathR(s BF_FFMPEG_LIBsFFMPEG libraryR(sBF_FFMPEG_EXTRAs#FFMPEG flags that must be preservedR(s BF_FFMPEG_INCsFFMPEG includesR(sBF_FFMPEG_LIBPATHsFFMPEG library pathR(sBF_JPEGsJPEG base pathR(s BF_JPEG_INCsJPEG include pathR(s BF_JPEG_LIBs JPEG libraryR(sBF_JPEG_LIBPATHsJPEG library pathR(sBF_PNGs PNG base pathR(s ++BF_PNG_INCsPNG include pathR(s ++BF_PNG_LIBs PNG libraryR(sBF_PNG_LIBPATHsPNG library pathR(sBF_TIFFsTIFF base pathR(s BF_TIFF_INCsTIFF include pathR(sBF_ZLIBsZLib base pathR(s BF_ZLIB_INCsZLib include pathR(s BF_ZLIB_LIBs ZLib libraryR(sBF_ZLIB_LIBPATHsZLib library pathR(s ++BF_GETTEXTsgettext base pathR(sBF_GETTEXT_INCsgettext include pathR(sBF_GETTEXT_LIBsgettext libraryR(sBF_GETTEXT_LIBPATHsgettext library pathR(sBF_ICONVsiconv base pathR(s BF_ICONV_INCsiconv include pathR(s BF_ICONV_LIBs iconv libraryR(sBF_ICONV_LIBPATHsiconv library pathR(sBF_ODEs ODE base pathR(s ++BF_ODE_INCsODE include pathR(s ++BF_ODE_LIBs ODE libraryR(s BF_BULLETsBullet base dirR(s BF_BULLET_INCsBullet include pathR(s BF_BULLET_LIBsBullet libraryR(sBF_SOLIDsSolid base dirs#/extern/solid(s BF_SOLID_INCsSolid include pathR(s BF_WINTABsWinTab base dirR(s BF_WINTAB_INCsWinTab include dirR(s BF_FREETYPEsFreetype base pathR(sBF_FREETYPE_INCsFreetype include pathR(sBF_FREETYPE_LIBsFreetype libraryR(sBF_FREETYPE_LIBPATHsFreetype library pathR(s BF_QUICKTIMEsQuickTime base pathR(sBF_QUICKTIME_INCsQuickTime include pathR(sBF_QUICKTIME_LIBsQuickTime libraryR(sBF_QUICKTIME_LIBPATHsQuickTime library pathR(s BF_OPENGLsOpenGL base pathR(s BF_OPENGL_INCsOpenGL include pathR(s BF_OPENGL_LIBsOpenGL librariesR(sBF_OPENGL_LIBPATHsOpenGL library pathR(sBF_OPENGL_LIB_STATICsOpenGL static librariesR(sBF_OPENGL_LINKFLAGSsOpenGL link flagsR(sBF_FTGLsFTGL base pathR(s BF_FTGL_INCsFTGL include pathR(s BF_FTGL_LIBsFTGL librariesR(sCFLAGSsC-compiler flagsR(sCCFLAGSsC++-compiler flagsR(sCPPFLAGSRR(s ++REL_CFLAGSsC release flagsR(s REL_CCFLAGSsC++ release flagsR(sC_WARNsC warning flagsR(sCC_WARNsC++ warning flagsR(sLLIBSs Platform libsR(sPLATFORM_LINKFLAGSsPlatform linkflagsR(sBF_PROFILE_FLAGSsProfiling flagsR(sBF_DEBUG_FLAGSs Debug flagsR(s BF_BUILDDIRs Build dirR(s BF_INSTALLDIRsInstallation dirR(sCCsC compiler to useR(sCXXsC++ compiler to useR(sBF_X264_CONFIGsconfiguration flags for x264R(sBF_XVIDCORE_CONFIGs configuration flags for xvidcoreR(tOptionst ++AddOptionst ++BoolOption(tcfgRt localopts((s@/storage/data/devel/blender/blender-2.47-haiku-1/tools/btools.pyt read_optsscCsdS(Ns&Creating NSIS installer for Blender 3D((ttargettsourceR((s@/storage/data/devel/blender/blender-2.47-haiku-1/tools/btools.pyt ++NSIS_printHscC#Cs |ddjo!|ddjodGHtnti}|d}|d}tii||ddpti||ddnx3tid D]"}ti|||ddqWtid ++||dd ti d t ++d }|i d }|i dd|i dd} |i ||d} ++ti dt ++dd} t| i } | i g} ti| ++d}x\|D]T}tii| ++d|djo-| idtii| ++d|dqqWti| d}|d7}ti| d|} g}x@|D]8}tii| ++|djo|id|q3q3Wti|d}|d7}ti| d|} g}d| ++df}ti|}x^|D]V}d ||f}tii|djo'tii|}|id!|qqWti|d}|d7}ti| d"|} g}d| ++d#f}ti|}x^|D]V}d ||f}tii|djo'tii|}|id!|qqWti|d}|d7}ti| d$|} g}d| ++d%f}ti|}x^|D]V}d ||f}tii|djo'tii|}|id!|q:q:Wti|d}|d7}ti| d&|} g} d| ++d'f}!ti|!}"xL|"D]D}#d |!|#f}$tii|$djo| id!|$qqWti| d}%|%d7}%ti| d(|%} g}&d| ++d)f}'ti|'}(x|(D]z})d |'|)f}*tii|*djoK|*id*p|*id+o'tii|*}*|&id!|*qqqWti|&d}+|+d7}+ti| d,|+} g},d| ++d-f}-ti|-}.xL|.D]D}/d |-|/f}0tii|0djo|,id!|0qqqqWti|,d}1|1d7}1ti| d.|1} g}2ti| ++d/}3x\|3D]T}4tii| ++d0|4djo-|2idtii| ++d0|4dq ++q ++Wti|2d}5|5d7}5ti| d1|5} g}6g}7ti| ++d2}8xq|8D]i}9tii| ++d3|9djoB|7id4|9d5|7idtii| ++d3|9d6qqWti|7d}:|:d7}:ti| d7|:} ti| d8tii| ++d} ti| d9| } ti| d |} ti| d:tii|} tii|ti|d;tid<};t ++|;d=}<|<i| |<i ti |dD|;d}=ti}>|>itiO_ti|=d?tid@tidAtidB|>dCt}?|?i \}@}A|?i!}BdS(ENt OURPLATFORMswin32-vcs win32-mingws,NSIS installer is only available on Windows.s\release\windows\installer\s\Rs/plugins/includes source/blender/blenpluginapi/*.hs'source/blender/blenpluginapi/plugin.defs/plugins/include/RtVERSIONiRiiswindows/installers00.sconsblender.nsitrsFile "s"s ++ s ++ ++s[ROOTDIRCONTS]sDelete $INSTDIR\s ++ s ++s[DELROOTDIRCONTS]s%s%ss\.blender\scriptss%s\%ss File "%s"s [SCRIPTCONTS]s\.blender\scripts\bpymoduless[SCRIPTMODCONTS]s(\.blender\scripts\bpymodules\ColladaImExs[SCRIPTMODCOLLADACONT]s\.blender\scripts\bpydatas[SCRIPTDATACONTS]s\plugins\includes.hs.DEFs [PLUGINCONTS]s \.blender\scripts\bpydata\configs[SCRIPTDATACFGCONTS]s \.blenders ++\.blender\s[DOTBLENDERCONTS]s\.blender\locales\.blender\locale\s(SetOutPath $BLENDERHOME\.blender\locale\s \LC_MESSAGESs\LC_MESSAGES\blender.mo"s[LANGUAGECONTS]tDISTDIRtSHORTVERtRELDIRRs00.blender_tmp.nsitws makensis RRRRRs ++makensis "("tExittostgetcwdtpathtexiststmkdirtglobtshutiltcopytchdirtopentreadtsplittclosetstrtlistdirtisdirRtnormpathRRtreplacetfindtseptwriteRRRRRRtTrueRR(CRRRt start_dirtrel_dirtinstall_base_dirtfR tversiontshortvertinst_dirtnstns_cnttrootlisttrootdirtrootitemt ++rootstringt delrootlistt delrootstringt ++scriptlistt ++scriptpatht scriptdirt ++scriptitemt ++scriptfilet scriptstringt ++bpymodlistt ++bpymodpatht bpymoddirt ++bpymoditemt ++bpymodfilet bpymodstringt colladalistt bpydatalistt bpydatapatht ++bpydatadirt bpydataitemt bpydatafilet bpydatastringtplugincludelisttplugincludepathtplugincludedirtplugincludeitemtplugincludefiletplugincludestringtcfglisttcfgpathtcfgdirtcfgitemtcfgfilet cfgstringt dotblendlistt dotblenddirt dotblenditemtdotblendstringtlanglistt langfilestlangdirtlangitemt ++langstringttmpnsitnew_nsisRRRRRR((s@/storage/data/devel/blender/blender-2.47-haiku-1/tools/btools.pytNSIS_InstallerKs*"   ++ ++   $ ++  ++!1 ++ ++ ++ ++ ++ ++  ++ ++!+ ++!+ ++%!,  ++   ((Rtos.patht SCons.OptionstSConstSCons.Options.BoolOptiont ImportErrorRRRRtsysRRR ++RRRRRRRtNoneR<(((s@/storage/data/devel/blender/blender-2.47-haiku-1/tools/btools.pyss2           =     +\ No newline at end of file