get rid of ui/wscript_build

This commit is contained in:
Frank Zhang 2010-12-04 19:53:35 -08:00
parent 5c73e46113
commit f0dfbc47b6
3 changed files with 16 additions and 10 deletions

View File

@ -1,7 +0,0 @@
import Utils, os
# binary unsubstitutable files:
bld.install_files("${MSENVIRON}/webapps/client",bld.path.ant_glob("*.ico **/*png **/*jpg **/*gif",src=True,bld=False,dir=False,flat=True),cwd=bld.path,relative_trick=True)
# text substitutable files (substitute with tokens from the environment bld.env):
bld.substitute('*html **/*html **/*js **/*css **/*properties **/*jsp *jsp',install_to="${MSENVIRON}/webapps/client")

View File

@ -346,11 +346,17 @@ def _substitute(self,listoffiles,install_to=None,cwd=None,dict=None,name=None,**
for src in Utils.to_list(listoffiles):
tgt = src + ".subst"
inst = src # Utils.relpath(src,relative_to) <- disabled
# Use cwd path when creating task and shift back later
tmp = self.path
self.path = cwd
tgen = self(features='subst', source=src, target=tgt, **tgenkwargs)
self.path = tmp
if dict is not None: tgen.dict = dict
else: tgen.dict = self.env.get_merged_dict()
self.path.find_or_declare(tgt)
if install_to is not None: self.install_as("%s/%s"%(install_to,inst), tgt, **kwargs)
if install_to is not None: self.install_as("%s/%s"%(install_to,inst), tgt, cwd=cwd, **kwargs)
Build.BuildContext.substitute = _substitute
def set_options(opt):

View File

@ -371,8 +371,15 @@ if buildpremium: bld.recurse(["cloudstack-proprietary/premium"],'build')
# build / install declarations of agent project
bld.recurse(["agent"],'build')
# build / install declarations of client UI project
bld.recurse(["ui"],'build')
# =============== build / install declarations of client UI project =======================
# binary unsubstitutable files:
start_path = bld.path.find_dir ("ui")
bld.install_files ("${MSENVIRON}/webapps/client",start_path.ant_glob("*.ico **/*png **/*jpg **/*gif",src=True,bld=False,dir=False,flat=True),cwd=start_path,relative_trick=True)
# text substitutable files (substitute with tokens from the environment bld.env):
#bld.substitute ("ui/*html ui/**/*html ui/**/*js ui/**/*css ui/**/*properties ui/**/*jsp ui/*jsp",install_to="${MSENVIRON}/webapps/client")
bld.substitute ("*html **/*html **/*js **/*css **/*properties **/*jsp *jsp",install_to="${MSENVIRON}/webapps/client", cwd=start_path)
# =============== end build / install declarations of client UI project =======================
# apply distro-specific config on top of the 'all' generic cloud-management config
globspec = _join("*","distro",bld.env.DISTRO.lower(),"*") # matches premium/distro/centos/SYSCONFDIR