From 0c24537edf4c5316d09ac59ccd114c5777c42c7d Mon Sep 17 00:00:00 2001 From: Michael Curran Date: Mon, 15 Nov 2010 10:15:58 +1000 Subject: [PATCH] Generate all archives and the pot etc in a directory called output to stop cluttering NVDA's root directory, and also to make it easier for an automatic snapshot builder to collect up all created files. Also add a 'changes' target which copies user_docs/en/changes.html to the putput directory as nvda_version_changes.html. --- sconstruct | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sconstruct b/sconstruct index 0543e10e1..a755232af 100755 --- a/sconstruct +++ b/sconstruct @@ -100,6 +100,7 @@ sourceLibDir64=sourceDir.Dir('lib64') Export('sourceLibDir64') buildDir = Dir("build") outFilePrefix = "nvda{type}_{version}".format(type="" if release else "_snapshot", version=version) +outputDir=Dir('output') #Process nvdaHelper scons files env.SConscript('nvdaHelper/sconscript',exports=['env']) @@ -171,12 +172,12 @@ env.Clean(installerDist, installerDist) # Clean the intermediate build directory. env.Clean([portableDist, installerDist], buildDir) -portableArchive = env.SzSfx("%s_portable.exe" % outFilePrefix, portableDist, relativeToSourceDir=True) +portableArchive = env.SzSfx(outputDir.File("%s_portable.exe" % outFilePrefix), portableDist, relativeToSourceDir=True) if certFile: env.AddPostAction(portableArchive, [signExec]) env.Alias("portable", portableArchive) -installer = env.Command("%s_installer.exe" % outFilePrefix, ["installer/nvda.nsi", installerDist], +installer = env.Command(outputDir.File("%s_installer.exe" % outFilePrefix), ["installer/nvda.nsi", installerDist], [[makensis, "/V2", "/DVERSION=$version", "/DPUBLISHER=$publisher", "/DNVDASourceDir=${SOURCES[1].abspath}", "/XOutFile ${TARGET.abspath}", @@ -185,9 +186,12 @@ if certFile: env.AddPostAction(installer, [signExec]) env.Alias("installer", installer) -clientArchive = env.SzSfx("%s_controllerClient.exe" % outFilePrefix,clientDir) +clientArchive = env.SzSfx(outputDir.File("%s_controllerClient.exe" % outFilePrefix),clientDir) env.Alias("client", clientArchive) +changesFile=env.Command(outputDir.File("%s_changes.html" % outFilePrefix),userDocsDir.File('en/changes.html'),Copy('$TARGET','$SOURCE')) +env.Alias('changes',changesFile) + def makePot(target, source, env): # Generate the pot. if env.Execute([["cd", source[0], "&&", @@ -214,7 +218,8 @@ def makePot(target, source, env): os.remove(potFn) os.rename(tmpFn, potFn) -pot = env.Command("%s.pot" % outFilePrefix, sourceDir, makePot) +pot = env.Command(outputDir.File("%s.pot" % outFilePrefix), sourceDir, makePot) + env.Alias("pot", pot) env.Default(portableDist) -- 2.11.0