forked from bartvdbraak/blender
=== SCons ===
* make the nsis installer script automatically use the Python version we build against * bump Python version used
This commit is contained in:
parent
1c2ce9535c
commit
dee188df16
@ -476,7 +476,6 @@ if env['OURPLATFORM']=='linux2':
|
||||
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)
|
||||
|
||||
@ -501,7 +500,6 @@ for tp, tn, tf in os.walk('release/plugins'):
|
||||
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)
|
||||
|
||||
|
@ -12,10 +12,10 @@ BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
|
||||
BF_FFMPEG_LIB = 'avformat-52.lib avcodec-52.lib avdevice-52.lib avutil-50.lib swscale-0.lib'
|
||||
|
||||
BF_PYTHON = LIBDIR + '/python'
|
||||
BF_PYTHON_VERSION = '2.5'
|
||||
BF_PYTHON_VERSION = '2.6'
|
||||
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_BINARY = 'python'
|
||||
BF_PYTHON_LIB = 'python25'
|
||||
BF_PYTHON_LIB = 'python26'
|
||||
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
|
||||
|
||||
WITH_BF_OPENAL = True
|
||||
|
@ -212,7 +212,7 @@ Function DownloadDLL
|
||||
FunctionEnd
|
||||
|
||||
Function PythonInstall
|
||||
MessageBox MB_OK "You will need to install python 2.5.2 in order to run blender. Pressing OK will take you to the python.org website."
|
||||
MessageBox MB_OK "You will need to install python [PYTHON_VERSION] in order to run blender. Pressing OK will take you to the python.org website."
|
||||
StrCpy $0 "http://www.python.org"
|
||||
Call openLinkNewWindow
|
||||
FunctionEnd
|
||||
@ -346,7 +346,7 @@ Section "Blender-VERSION (required)" SecCopyUI
|
||||
${Locate} "$1" "/L=F /M=MSVCR90.DLL /S=0B" "LocateCallback_90"
|
||||
StrCmp $DLL_found "false" 0 +2
|
||||
Call DownloadDLL
|
||||
ReadRegStr $0 HKLM SOFTWARE\Python\PythonCore\2.5\InstallPath ""
|
||||
ReadRegStr $0 HKLM SOFTWARE\Python\PythonCore\[PYTHON_VERSION]\InstallPath ""
|
||||
StrCmp $0 "" 0 +2
|
||||
Call PythonInstall
|
||||
silentdone:
|
||||
|
@ -50,6 +50,7 @@ blenderdeps = [] # don't manipulate this one outside this module!
|
||||
|
||||
possible_types = ['core'] # can be set in ie. SConstruct
|
||||
libs = {}
|
||||
vcp = []
|
||||
|
||||
def getresources():
|
||||
return resources
|
||||
@ -402,7 +403,8 @@ class BlenderEnvironment(SConsEnvironment):
|
||||
SConsEnvironment.Default(self, res)
|
||||
resources.append(res)
|
||||
|
||||
def BlenderLib(self=None, libname=None, sources=None, includes=[], defines=[], libtype='common', priority = 100, compileflags=None, cc_compileflags=None, cxx_compileflags=None):
|
||||
def BlenderLib(self=None, libname=None, sources=None, includes=[], defines=[], libtype='common', priority = 100, compileflags=None, cc_compileflags=None, cxx_compileflags=None):
|
||||
global vcp
|
||||
if not self or not libname or not sources:
|
||||
print bc.FAIL+'Cannot continue. Missing argument for BuildBlenderLib '+libname+bc.ENDC
|
||||
self.Exit()
|
||||
@ -448,12 +450,24 @@ class BlenderEnvironment(SConsEnvironment):
|
||||
targetdir = '#'+targetdir
|
||||
lib = lenv.Library(target= targetdir, source=sources)
|
||||
SConsEnvironment.Default(self, lib) # we add to default target, because this way we get some kind of progress info during build
|
||||
if self['BF_MSVS'] and self['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
|
||||
#if targetdir[0] == '#':
|
||||
# targetdir = targetdir[1:-1]
|
||||
print "! ",targetdir+ '.vcproj' # + self['MSVSPROJECTSUFFIX']
|
||||
vcproject = self.MSVSProject(target = targetdir + '.vcproj', # + self['MSVSPROJECTSUFFIX'],
|
||||
srcs = sources,
|
||||
buildtarget = lib,
|
||||
variant = 'Release',
|
||||
auto_build_solution=0)
|
||||
vcp.append(vcproject)
|
||||
SConsEnvironment.Default(self, vcproject)
|
||||
else:
|
||||
print bc.WARNING+'Not building '+bc.ENDC+bc.OKGREEN+libname+bc.ENDC+' for '+bc.OKBLUE+'BF_QUICK'+bc.ENDC
|
||||
# note: libs is a global
|
||||
add_lib_to_dict(self, libs, libtype, libname, priority)
|
||||
|
||||
def BlenderProg(self=None, builddir=None, progname=None, sources=None, includes=None, libs=None, libpath=None, binarykind=''):
|
||||
global vcp
|
||||
print bc.HEADER+'Configuring program '+bc.ENDC+bc.OKGREEN+progname+bc.ENDC
|
||||
lenv = self.Clone()
|
||||
if lenv['OURPLATFORM'] in ['win32-vc', 'cygwin']:
|
||||
@ -491,6 +505,12 @@ class BlenderEnvironment(SConsEnvironment):
|
||||
brs = lenv.Command(f, prog, [bsc])
|
||||
SConsEnvironment.Default(self, brs)
|
||||
SConsEnvironment.Default(self, prog)
|
||||
if self['BF_MSVS'] and self['OURPLATFORM'] in ('win32-vc', 'win64-vc') and progname == 'blender':
|
||||
print "! ",builddir + "/" + progname + '.sln'
|
||||
sln = self.MSVSProject(target = builddir + "/" + progname + '.sln',
|
||||
projects= vcp,
|
||||
variant = 'Release')
|
||||
SConsEnvironment.Default(self, sln)
|
||||
program_list.append(prog)
|
||||
if lenv['OURPLATFORM']=='darwin':
|
||||
lenv['BINARYKIND'] = binarykind
|
||||
|
@ -68,6 +68,7 @@ def validate_arguments(args, bc):
|
||||
'BF_XVIDCORE_CONFIG',
|
||||
'WITH_BF_DOCS',
|
||||
'BF_NUMJOBS',
|
||||
'BF_MSVS',
|
||||
]
|
||||
|
||||
# Have options here that scons expects to be lists
|
||||
@ -379,7 +380,8 @@ def read_opts(cfg, args):
|
||||
(BoolVariable('WITH_BF_DOCS', 'Generate API documentation', False)),
|
||||
|
||||
('BF_CONFIG', 'SCons python config file used to set default options', 'user_config.py'),
|
||||
('BF_NUMJOBS', 'Number of build processes to spawn', '1')
|
||||
('BF_NUMJOBS', 'Number of build processes to spawn', '1'),
|
||||
('BF_MSVS', 'Generate MSVS project files and solution', False)
|
||||
|
||||
) # end of opts.AddOptions()
|
||||
|
||||
@ -419,9 +421,13 @@ def NSIS_Installer(target=None, source=None, env=None):
|
||||
|
||||
ns = open("00.sconsblender.nsi","r")
|
||||
|
||||
|
||||
ns_cnt = str(ns.read())
|
||||
ns.close()
|
||||
|
||||
# set Python version we compile against
|
||||
ns_cnt = string.replace(ns_cnt, "[PYTHON_VERSION]", env['BF_PYTHON_VERSION'])
|
||||
|
||||
# do root
|
||||
rootlist = []
|
||||
rootdir = os.listdir(inst_dir+"\\")
|
||||
|
Loading…
Reference in New Issue
Block a user