diff --git a/ui/wscript_build b/ui/wscript_build deleted file mode 100644 index 212a36e6e98..00000000000 --- a/ui/wscript_build +++ /dev/null @@ -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") diff --git a/wscript b/wscript index c1bc46c63d9..663b9787219 100644 --- a/wscript +++ b/wscript @@ -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): diff --git a/wscript_build b/wscript_build index 85e820873a7..f90b5b2d148 100644 --- a/wscript_build +++ b/wscript_build @@ -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