54 lines
1.1 KiB
Python
54 lines
1.1 KiB
Python
## MarsXPLR top level
|
|
|
|
import os
|
|
import shutil
|
|
|
|
APPNAME = 'MarsXPLR'
|
|
VERSION = '4.0.1'
|
|
|
|
top = '.'
|
|
out = 'wafbuild'
|
|
|
|
def options(opt):
|
|
opt.add_option('--mono_home',
|
|
action='store',
|
|
default='',
|
|
help='path where a mono install contains bin, lib, and include directories')
|
|
|
|
opt.recurse('MarsRuntime')
|
|
|
|
def configure(conf):
|
|
conf.env.MONO_HOME = conf.options.mono_home
|
|
if conf.env.MONO_HOME != '':
|
|
conf.find_program('mcs',
|
|
var='MCS',
|
|
path_list=[os.path.join(conf.env.MONO_HOME, 'bin')])
|
|
else:
|
|
conf.find_program('mcs', var='MCS')
|
|
conf.env.MONO_HOME = os.path.split(
|
|
os.path.split(
|
|
conf.env.MCS[0]
|
|
)[0]
|
|
)[0]
|
|
|
|
conf.recurse('MarsRuntime')
|
|
|
|
def build(bld):
|
|
if bld.cmd == 'distclean':
|
|
mbuild = os.path.join(bld.top_dir, 'marsxplr_build')
|
|
if os.path.exists(mbuild):
|
|
shutil.rmtree(mbuild)
|
|
return
|
|
|
|
bld.env.MONOOPTS = '-sdk:2 -langversion:3'
|
|
|
|
bld.recurse('MarsRuntime')
|
|
|
|
bld.recurse('UnityDomainLoad')
|
|
bld.recurse('UnityEngine')
|
|
bld.add_group()
|
|
bld.recurse('Assembly_-_CSharp_-_first_pass')
|
|
bld.add_group()
|
|
bld.recurse('Assembly_-_CSharp')
|
|
bld.recurse('Assembly_-_UnityScript')
|