OSDN Git Service

Generate all archives and the pot etc in a directory called output to stop cluttering...
authorMichael Curran <mick@kulgan.net>
Mon, 15 Nov 2010 00:15:58 +0000 (10:15 +1000)
committerMichael Curran <mick@kulgan.net>
Mon, 15 Nov 2010 00:15:58 +0000 (10:15 +1000)
sconstruct

index 0543e10..a755232 100755 (executable)
@@ -100,6 +100,7 @@ sourceLibDir64=sourceDir.Dir('lib64')
 Export('sourceLibDir64')\r
 buildDir = Dir("build")\r
 outFilePrefix = "nvda{type}_{version}".format(type="" if release else "_snapshot", version=version)\r
+outputDir=Dir('output')\r
 \r
 #Process nvdaHelper scons files\r
 env.SConscript('nvdaHelper/sconscript',exports=['env'])\r
@@ -171,12 +172,12 @@ env.Clean(installerDist, installerDist)
 # Clean the intermediate build directory.\r
 env.Clean([portableDist, installerDist], buildDir)\r
 \r
-portableArchive = env.SzSfx("%s_portable.exe" % outFilePrefix, portableDist, relativeToSourceDir=True)\r
+portableArchive = env.SzSfx(outputDir.File("%s_portable.exe" % outFilePrefix), portableDist, relativeToSourceDir=True)\r
 if certFile:\r
        env.AddPostAction(portableArchive, [signExec])\r
 env.Alias("portable", portableArchive)\r
 \r
-installer = env.Command("%s_installer.exe" % outFilePrefix, ["installer/nvda.nsi", installerDist],\r
+installer = env.Command(outputDir.File("%s_installer.exe" % outFilePrefix), ["installer/nvda.nsi", installerDist],\r
        [[makensis, "/V2",\r
        "/DVERSION=$version", "/DPUBLISHER=$publisher",\r
        "/DNVDASourceDir=${SOURCES[1].abspath}", "/XOutFile ${TARGET.abspath}",\r
@@ -185,9 +186,12 @@ if certFile:
        env.AddPostAction(installer, [signExec])\r
 env.Alias("installer", installer)\r
 \r
-clientArchive = env.SzSfx("%s_controllerClient.exe" % outFilePrefix,clientDir)\r
+clientArchive = env.SzSfx(outputDir.File("%s_controllerClient.exe" % outFilePrefix),clientDir)\r
 env.Alias("client", clientArchive)\r
 \r
+changesFile=env.Command(outputDir.File("%s_changes.html" % outFilePrefix),userDocsDir.File('en/changes.html'),Copy('$TARGET','$SOURCE'))\r
+env.Alias('changes',changesFile)\r
+\r
 def makePot(target, source, env):\r
        # Generate the pot.\r
        if env.Execute([["cd", source[0], "&&",\r
@@ -214,7 +218,8 @@ def makePot(target, source, env):
        os.remove(potFn)\r
        os.rename(tmpFn, potFn)\r
 \r
-pot = env.Command("%s.pot" % outFilePrefix, sourceDir, makePot)\r
+pot = env.Command(outputDir.File("%s.pot" % outFilePrefix), sourceDir, makePot)\r
+\r
 env.Alias("pot", pot)\r
 \r
 env.Default(portableDist)\r