[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [19064] branches/blender2.5/blender: 2.5 / Scons | Building on 64bit Windows
Nathan Letwory
jesterking at letwory.net
Fri Feb 20 23:08:02 CET 2009
Revision: 19064
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=19064
Author: jesterking
Date: 2009-02-20 23:08:02 +0100 (Fri, 20 Feb 2009)
Log Message:
-----------
2.5 / Scons | Building on 64bit Windows
* add preliminary support for building Blender on 64bit Windows with _msvc_. The SConstruct should automatically detect if you are on a 64bit Windows and if you have that 64bit build is assumed. If you're not, 32bit build is assumed.
NOTE: this is still very much wip, so your mileage may vary. Do please report on b25 taskforce ML in case of trouble.
NOTE2: many of the libs are being linked in statically
NOTE3: hopefully I didn't break anything for other build platforms (mingw, linux, osx).
NOTE4: comes after NOTE3
Modified Paths:
--------------
branches/blender2.5/blender/SConstruct
branches/blender2.5/blender/extern/bullet2/src/SConscript
branches/blender2.5/blender/extern/solid/SConscript
branches/blender2.5/blender/intern/ghost/SConscript
branches/blender2.5/blender/source/blender/blenkernel/SConscript
branches/blender2.5/blender/source/blender/blenlib/SConscript
branches/blender2.5/blender/tools/Blender.py
Modified: branches/blender2.5/blender/SConstruct
===================================================================
--- branches/blender2.5/blender/SConstruct 2009-02-20 20:43:22 UTC (rev 19063)
+++ branches/blender2.5/blender/SConstruct 2009-02-20 22:08:02 UTC (rev 19064)
@@ -29,6 +29,13 @@
# Set up some custom actions and target/argument handling
# Then read all SConscripts and build
+import platform as pltfrm
+
+if pltfrm.architecture()[0] == '64bit':
+ bitness = 64
+else:
+ bitness = 32
+
import sys
import os
import os.path
@@ -132,14 +139,17 @@
env['CXX'] = cxx
if env['CC'] in ['cl', 'cl.exe'] and sys.platform=='win32':
- platform = 'win32-vc'
+ if bitness == 64:
+ platform = 'win64-vc'
+ else:
+ platform = 'win32-vc'
elif env['CC'] in ['gcc'] and sys.platform=='win32':
platform = 'win32-mingw'
env.SConscriptChdir(0)
crossbuild = B.arguments.get('BF_CROSS', None)
-if crossbuild and platform!='win32':
+if crossbuild and platform not in ('win32-vc', 'win64-vc'):
platform = 'linuxcross'
env['OURPLATFORM'] = platform
@@ -183,7 +193,7 @@
env['CCFLAGS'].append('-DDISABLE_ELBEEM')
if env['WITH_BF_OPENMP'] == 1:
- if env['OURPLATFORM']=='win32-vc':
+ if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
env['CCFLAGS'].append('/openmp')
env['CPPFLAGS'].append('/openmp')
env['CXXFLAGS'].append('/openmp')
@@ -283,7 +293,7 @@
env['BF_NO_ELBEEM'] = True
env['WITH_BF_PYTHON'] = False
-if env['WITH_BF_SDL'] == False and env['OURPLATFORM'] in ('win32-vc', 'win32-ming'):
+if env['WITH_BF_SDL'] == False and env['OURPLATFORM'] in ('win32-vc', 'win32-ming', 'win64-vc'):
env['PLATFORM_LINKFLAGS'].remove('/ENTRY:mainCRTStartup')
env['PLATFORM_LINKFLAGS'].append('/ENTRY:main')
@@ -390,7 +400,7 @@
thesyslibs = B.setup_syslibs(env)
if 'blender' in B.targets or not env['WITH_BF_NOBLENDER']:
- env.BlenderProg(B.root_build_dir, "blender", dobj + mainlist, [], thestatlibs + thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
+ env.BlenderProg(B.root_build_dir, "blender", dobj , [], mainlist + thestatlibs + thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
if env['WITH_BF_PLAYER']:
playerlist = B.create_blender_liblist(env, 'player')
env.BlenderProg(B.root_build_dir, "blenderplayer", dobj + playerlist, [], thestatlibs + thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blenderplayer')
@@ -471,7 +481,6 @@
if '.svn' in tn:
tn.remove('.svn')
for f in tf:
- print ">>>", env['BF_INSTALLDIR'], tp, f
iconlist.append(tp+os.sep+f)
icontargetlist.append(env['BF_INSTALLDIR']+tp[19:]+os.sep+f)
@@ -496,7 +505,6 @@
if '.svn' in tn:
tn.remove('.svn')
for f in tf:
- print ">>>", env['BF_INSTALLDIR'], tp, f
pluglist.append(tp+os.sep+f)
plugtargetlist.append(env['BF_INSTALLDIR']+tp[7:]+os.sep+f)
@@ -540,14 +548,20 @@
else:
allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall]
-if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw'):
- dllsources = ['${LCGDIR}/gettext/lib/gnu_gettext.dll',
- '${BF_PNG_LIBPATH}/libpng.dll',
- '${BF_ZLIB_LIBPATH}/zlib.dll',
- '${BF_TIFF_LIBPATH}/${BF_TIFF_LIB}.dll']
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc'):
+ if env['OURPLATFORM'] == 'win64-vc':
+ dllsources = []
+ else:
+ dllsources = ['${LCGDIR}/gettext/lib/gettext.dll',
+ '${BF_PNG_LIBPATH}/libpng.dll',
+ '${BF_ZLIB_LIBPATH}/zlib.dll',
+ '${BF_TIFF_LIBPATH}/${BF_TIFF_LIB}.dll']
dllsources += ['${BF_PTHREADS_LIBPATH}/${BF_PTHREADS_LIB}.dll']
if env['WITH_BF_SDL']:
- dllsources.append('${BF_SDL_LIBPATH}/SDL.dll')
+ if env['OURPLATFORM'] == 'win64-vc':
+ pass # we link statically already to SDL on win64
+ else:
+ dllsources.append('${BF_SDL_LIBPATH}/SDL.dll')
if env['WITH_BF_PYTHON']:
dllsources.append('#release/windows/extra/python25.zip')
dllsources.append('#release/windows/extra/zlib.pyd')
@@ -556,7 +570,10 @@
else:
dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_LIB}.dll')
if env['WITH_BF_ICONV']:
- dllsources += ['${BF_ICONV_LIBPATH}/iconv.dll']
+ if env['OURPLATFORM'] == 'win64-vc':
+ pass # we link statically to iconv on win64
+ else:
+ dllsources += ['${BF_ICONV_LIBPATH}/iconv.dll']
if env['WITH_BF_FFMPEG']:
dllsources += ['${LCGDIR}/ffmpeg/lib/avcodec-51.dll',
'${LCGDIR}/ffmpeg/lib/avformat-52.dll',
@@ -601,12 +618,6 @@
if not env['WITHOUT_BF_INSTALL']:
Default(installtarget)
-#------------ RELEASE
-# TODO: zipup the installation
-
-#------------ BLENDERPLAYER
-# TODO: build stubs and link into blenderplayer
-
#------------ EPYDOC
if env['WITH_BF_DOCS']:
SConscript('source/blender/python/api2_2x/doc/SConscript')
Modified: branches/blender2.5/blender/extern/bullet2/src/SConscript
===================================================================
--- branches/blender2.5/blender/extern/bullet2/src/SConscript 2009-02-20 20:43:22 UTC (rev 19063)
+++ branches/blender2.5/blender/extern/bullet2/src/SConscript 2009-02-20 22:08:02 UTC (rev 19064)
@@ -7,7 +7,7 @@
defs = 'USE_DOUBLES QHULL _LIB'
cflags = []
-if env['OURPLATFORM']=='win32-vc':
+if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
defs += ' WIN32 NDEBUG _WINDOWS _LIB'
#cflags += ['/MT', '/W3', '/GX', '/O2', '/Op']
cflags += ['/MT', '/W3', '/GX', '/Og', '/Ot', '/Ob1', '/Op', '/G6']
Modified: branches/blender2.5/blender/extern/solid/SConscript
===================================================================
--- branches/blender2.5/blender/extern/solid/SConscript 2009-02-20 20:43:22 UTC (rev 19063)
+++ branches/blender2.5/blender/extern/solid/SConscript 2009-02-20 22:08:02 UTC (rev 19064)
@@ -6,7 +6,7 @@
defs = 'USE_DOUBLES QHULL _LIB'
cflags = []
-if env['OURPLATFORM']=='win32-vc':
+if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
defs += ' WIN32 NDEBUG _WINDOWS _LIB'
cflags += ['/MT', '/W3', '/GX', '/Og', '/Ot', '/Ob1', '/Op', '/G6']
elif env['OURPLATFORM']=='win32-mingw':
Modified: branches/blender2.5/blender/intern/ghost/SConscript
===================================================================
--- branches/blender2.5/blender/intern/ghost/SConscript 2009-02-20 20:43:22 UTC (rev 19063)
+++ branches/blender2.5/blender/intern/ghost/SConscript 2009-02-20 22:08:02 UTC (rev 19064)
@@ -14,7 +14,7 @@
for f in pf:
sources.remove('intern' + os.sep + f + 'Win32.cpp')
sources.remove('intern' + os.sep + f + 'Carbon.cpp')
-elif window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross'):
+elif window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-vc'):
for f in pf:
sources.remove('intern' + os.sep + f + 'X11.cpp')
sources.remove('intern' + os.sep + f + 'Carbon.cpp')
@@ -27,6 +27,6 @@
Exit()
incs = '. ../string ' + env['BF_OPENGL_INC']
-if window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross'):
+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'], priority = [40] )
Modified: branches/blender2.5/blender/source/blender/blenkernel/SConscript
===================================================================
--- branches/blender2.5/blender/source/blender/blenkernel/SConscript 2009-02-20 20:43:22 UTC (rev 19063)
+++ branches/blender2.5/blender/source/blender/blenkernel/SConscript 2009-02-20 22:08:02 UTC (rev 19064)
@@ -55,7 +55,7 @@
if env['BF_NO_ELBEEM']:
defs += ' DISABLE_ELBEEM'
-if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross'):
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
incs += ' ' + env['BF_PTHREADS_INC']
env.BlenderLib ( libname = 'bf_blenkernel', sources = sources, includes = Split(incs), defines = Split(defs), libtype=['core'], priority = [165] )
Modified: branches/blender2.5/blender/source/blender/blenlib/SConscript
===================================================================
--- branches/blender2.5/blender/source/blender/blenlib/SConscript 2009-02-20 20:43:22 UTC (rev 19063)
+++ branches/blender2.5/blender/source/blender/blenlib/SConscript 2009-02-20 22:08:02 UTC (rev 19064)
@@ -19,7 +19,7 @@
cflags='-pthread'
incs += ' ../../../extern/binreloc/include'
-if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross'):
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
incs += ' ' + env['BF_PTHREADS_INC']
env.BlenderLib ( 'bf_blenlib', sources, Split(incs), Split(defs), libtype=['core'], priority = [180], compileflags =cflags )
Modified: branches/blender2.5/blender/tools/Blender.py
===================================================================
--- branches/blender2.5/blender/tools/Blender.py 2009-02-20 20:43:22 UTC (rev 19063)
+++ branches/blender2.5/blender/tools/Blender.py 2009-02-20 22:08:02 UTC (rev 19064)
@@ -14,6 +14,7 @@
"""
+import os
import os.path
import string
import glob
@@ -99,9 +100,7 @@
sortlist.sort()
for sk in sortlist:
v = curlib[sk]
- target = root_build_dir + 'lib/'+lenv['LIBPREFIX'] + v + lenv['LIBSUFFIX']
- if not (root_build_dir[0]==os.sep or root_build_dir[1]==':'):
- target = '#'+target
+ target = os.path.abspath(os.getcwd() + os.sep + root_build_dir + 'lib' + os.sep +lenv['LIBPREFIX'] + v + lenv['LIBSUFFIX'])
lst.append(target)
return lst
@@ -145,7 +144,7 @@
if lenv['WITH_BF_PYTHON'] and lenv['WITH_BF_STATICPYTHON']:
statlibs += Split(lenv['BF_PYTHON_LIB_STATIC'])
- if lenv['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross'):
+ if lenv['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
libincs += Split(lenv['BF_PTHREADS_LIBPATH'])
return statlibs, libincs
@@ -159,7 +158,7 @@
]
if lenv['WITH_BF_PYTHON'] and not lenv['WITH_BF_STATICPYTHON']:
- if lenv['BF_DEBUG'] and lenv['OURPLATFORM'] in ('win32-vc'):
+ if lenv['BF_DEBUG'] and lenv['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
syslibs.append(lenv['BF_PYTHON_LIB']+'_d')
else:
syslibs.append(lenv['BF_PYTHON_LIB'])
@@ -187,7 +186,7 @@
syslibs += Split(lenv['BF_SDL_LIB'])
if not lenv['WITH_BF_STATICOPENGL']:
syslibs += Split(lenv['BF_OPENGL_LIB'])
- if lenv['OURPLATFORM'] in ('win32-vc', 'win32-mingw','linuxcross'):
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list