update for compiling cross compiling win32 on linux, had a lot of trouble with makesd...
authorCampbell Barton <ideasman42@gmail.com>
Thu, 13 Nov 2008 23:12:38 +0000 (23:12 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 13 Nov 2008 23:12:38 +0000 (23:12 +0000)
win32 binary.
Still unable to link blender.exe
and run with wine.

config/linuxcross-config.py
source/blender/blenlib/SConscript
source/blender/blenlib/intern/threads.c
source/blender/makesdna/intern/SConscript
source/blender/src/SConscript
tools/crossmingw.py

index 4c5f4859a6c6fe8c106acef2940f8abe08f67a26..f3ac6d905f7b2c0b3a85baccb789e6fe7f39d59b 100644 (file)
@@ -1,4 +1,4 @@
-LCGDIR = '../lib/windows'
+LCGDIR = '#../lib/windows'
 LIBDIR = '${LCGDIR}'
 
 WITH_BF_VERSE = False
@@ -101,6 +101,9 @@ BF_SOLID = '#extern/solid'
 BF_SOLID_INC = '${BF_SOLID}'
 BF_SOLID_LIB = 'extern_solid'
 
+BF_WINTAB = LIBDIR + '/wintab'
+BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
+
 # enable freetype2 support for text objects
 BF_FREETYPE = LIBDIR + '/gcc/freetype'
 BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
index 0dc28960492b55ba6423b678120ed64e0cb0c0be..829b39f4a61cd534c066164b8eeb37876c1b2ca7 100644 (file)
@@ -23,7 +23,7 @@ if env['OURPLATFORM'] == 'linux2':
     cflags='-pthread'
     incs += ' ../../../extern/binreloc/include'
 
-if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw'):
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross'):
     incs += ' ' + env['BF_PTHREADS_INC']
 
 env.BlenderLib ( 'bf_blenlib', sources, Split(incs), Split(defs), libtype=['core', 'intern', 'player'], priority = [85,150,195], compileflags =cflags )
index 9df8bbc81e3628de740c200463a093e76e8e46f3..07c02b8024f5621a83073e7f62979f30d8fc09c8 100644 (file)
@@ -42,7 +42,7 @@
 
 /* for checking system threads - BLI_system_thread_count */
 #ifdef WIN32
-#include "Windows.h"
+#include "windows.h"
 #elif defined(__APPLE__)
 #include <sys/types.h>
 #include <sys/sysctl.h>
index 0a2afd66dae6510c69304abfc059df51ef251c89..7d4f6d2d76b375358321ff684cde58f933593b79 100644 (file)
@@ -18,9 +18,15 @@ makesdna_tool.Append (CPPPATH = ['#/intern/guardedalloc',
                                                                 '../../makesdna'])
 
 if env['OURPLATFORM'] == 'linuxcross':
-       makesdna_tool.Replace(CC='gcc')
-       makesdna_tool.Replace(AR='ar')
-       makesdna_tool.Replace(LINK='gcc')
+       USE_WINE = True # when cross compiling on linux 64bit this is useful
+else:
+       USE_WINE = False
+
+if not USE_WINE:
+       if env['OURPLATFORM'] == 'linuxcross':
+               makesdna_tool.Replace(CC='gcc')
+               makesdna_tool.Replace(AR='ar')
+               makesdna_tool.Replace(LINK='gcc')
 
 if sys.platform != 'cygwin':
        makesdna_tool.Append (CCFLAGS = cflags)
@@ -43,7 +49,10 @@ dna_dict = dna.Dictionary()
 dna.Depends ('dna.c', makesdna)
 dna.Depends ('dna.c', header_files)
 if env['OURPLATFORM'] != 'linuxcross':
-       dna.Command ('dna.c', '', root_build_dir+os.sep+"makesdna $TARGET")
+       if USE_WINE:
+               dna.Command ('dna.c', '', 'wine ' + root_build_dir+os.sep+"makesdna $TARGET")
+       else:
+               dna.Command ('dna.c', '', root_build_dir+os.sep+"makesdna $TARGET")
 else:
        dna.Command ('dna.c', '', root_build_dir+os.sep+"makesdna.exe $TARGET")
 obj = 'intern/dna.c'
index 2759e8ca7ffc28b01d084e01073e1273c561b068..c5edd711d0a927cbceb443e096d963df78fd4c68 100644 (file)
@@ -75,7 +75,7 @@ if env['WITH_BF_FFMPEG']:
 if env['WITH_BF_OGG']:
     defs.append('WITH_OGG')
 
-if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw'):
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross'):
     incs += ' ' + env['BF_PTHREADS_INC']
 
 if env['WITH_BF_VERSE']:
index 1c8924ca7f653e7c07c908c45c9f41aaca0e795d..299bfca929d23910f8385a23023a5b2c8f685a49 100755 (executable)
@@ -109,7 +109,7 @@ def shlib_emitter(target, source, env):
 #JB  """ I'm blindly susbstuting lines from the mingw.py
 #JB      file becase these lines cause python errors here. """
 #JB shlib_action = SCons.Action.Action(shlib_generator,generator=1)
-shlib_action = SCons.Action.CommandGenerator(shlib_generator)
+shlib_action = SCons.Action.CommandGeneratorAction(shlib_generator)
 
 res_action = SCons.Action.Action('$RCCOM', '$RCCOMSTR')