diff options
author | Remko Tronçon <git@el-tramo.be> | 2012-04-23 18:49:59 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2012-04-23 18:54:15 (GMT) |
commit | 2d436118c2a3907080fa850a3dcab2e99120a7bc (patch) | |
tree | db58ae8755e8f2961b412052037d719b06e24b42 /Swift/QtUI/SConscript | |
parent | 5af9a5c5cd4d74b29ce5bf4882b5b8391f09b468 (diff) | |
download | swift-contrib-2d436118c2a3907080fa850a3dcab2e99120a7bc.zip swift-contrib-2d436118c2a3907080fa850a3dcab2e99120a7bc.tar.bz2 |
Use command to generate RTF file.
This avoids the COPYING file being read on each compile.
Diffstat (limited to 'Swift/QtUI/SConscript')
-rw-r--r-- | Swift/QtUI/SConscript | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/Swift/QtUI/SConscript b/Swift/QtUI/SConscript index 06c5bc4..b6f6229 100644 --- a/Swift/QtUI/SConscript +++ b/Swift/QtUI/SConscript @@ -282,14 +282,17 @@ if env["PLATFORM"] == "win32" : #myenv.Nsis("../Packaging/nsis/swift.nsi") #myenv.WiX("../Packaging/wix/swift.msi", ["../Packaging/WiX/Swift.wxs"]) if env["SCONS_STAGE"] == "build" and env.get("wix_bindir", None): - licensefile = open('../../COPYING', 'r') - rtf = '{\\rtf1\\ansi{\\fonttbl\\f0\\fswiss Helvetica;}\\f0\\pard' - for line in licensefile: - rtf += line - rtf += '\\par' - rtf += '}' - licensefile.close() - myenv.WriteVal("Swift/COPYING.rtf", env.Value(rtf)) + def convertToRTF(env, target, source) : + infile = open(source[0].abspath, 'r') + outfile = open(target[0].abspath, 'w') + outfile.write('{\\rtf1\\ansi{\\fonttbl\\f0\\fswiss Helvetica;}\\f0\\pard\n') + for line in infile: + outfile.write(line) + outfile.write('\\par') + outfile.write('}') + outfile.close() + infile.close() + env.Command(["Swift/COPYING.rtf"], ["../../COPYING"], convertToRTF) wixvariables = {'VCCRTFile': env.get("vcredist", "c:\\Program Files\\Common Files\\Merge Modules") + "\\Microsoft_VC90_CRT_x86.msm"} wixincludecontent = "<Include>" |