forked from ezhangle/Splice3DSMAX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSConscript
57 lines (41 loc) · 1.55 KB
/
SConscript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#
# Copyright (c) 2010-2016, Fabric Software Inc. All rights reserved.
#
import os, platform
Import('parentEnv')
buildOS = platform.system()
buildArch = 'x86_64'
buildType = 'Release'
scenegraph_dir = os.environ['FABRIC_SCENE_GRAPH_DIR']
prebuilt_dir = os.path.join(scenegraph_dir, 'ThirdParty', 'PreBuilt', buildOS, buildArch, 'VS2013', 'Release')
env = parentEnv.Clone()
stageDir = env.Dir(scenegraph_dir).Dir('stage').Dir(buildOS).Dir(buildArch).Dir(buildType)
maxVersions = ['2015', '2016', '2017']
if os.environ.has_key('FABRIC_SPLICE_MAX_VERSION'):
maxVersions = [os.environ['FABRIC_SPLICE_MAX_VERSION']]
env['ENV'] = os.environ
qt_dir = os.path.join(prebuilt_dir, 'qt', '4.8.7')
env['ENV']['QT_DIR'] = qt_dir
qtwinmigrate_dir = os.path.join(prebuilt_dir, 'qt-solutions', 'qtwinmigrate')
env['ENV']['QTWINMIGRATE_DIR'] = qtwinmigrate_dir
# reset the Max SDK so it gets the one in our repo, just in case :)
env['ENV']['MaxSDKPath'] = ''
env['ENV']['FABRIC_DIR'] = os.environ['FABRIC_DIR']
env['ENV']['FABRIC_SCENE_GRAPH_DIR'] = scenegraph_dir
maxFiles = []
srcnodeDir = env.Dir('.').srcnode().abspath
maxBuild = None
for maxVersion in maxVersions:
prevBuild = maxBuild
maxBuild = env.Command(
'build max '+maxVersion,
[],
[
['cmd.exe', '/c', os.path.join(srcnodeDir, 'build.bat'), '16', maxVersion, 'x64', os.path.join(srcnodeDir, 'Fabric3dsmax.sln')],
]
)
Depends(maxBuild,prevBuild)
maxFiles.append(maxBuild)
alias = env.Alias('splicemax', maxFiles)
spliceData = (alias, maxFiles)
Return('spliceData')