From 32620562c82b5fe18404b37759b26e5f3ebd769b Mon Sep 17 00:00:00 2001 From: John Popplewell Date: Tue, 28 Sep 2004 02:31:49 +0000 Subject: [PATCH] Removed an unused library. Added some comments. --- visualc/prebuild.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/visualc/prebuild.py b/visualc/prebuild.py index 6cc16b063..39df4ea79 100644 --- a/visualc/prebuild.py +++ b/visualc/prebuild.py @@ -1,4 +1,4 @@ -import sys, re, os, shutil, fnmatch +import sys, re, os, fnmatch def lfcr(file): if os.path.isdir(file): @@ -15,12 +15,10 @@ def lfcr(file): f.write(newdata) f.close() - def makeFolders(path): if not os.path.exists(path): os.makedirs(path) - def po2mo(pfx, input, output): output_path = os.path.join(output,pfx,"LC_MESSAGES") makeFolders(output_path) @@ -39,21 +37,23 @@ def add2filelist(fp, destination, source): if 'CVS' in dirs: dirs.remove('CVS') # don't visit CVS directories if 'cvs' in dirs: dirs.remove('cvs') +# makes sure the text docs are in CRLF format for notepad users(!) docs = "../docs/" for doc in os.listdir(docs): fullpath = docs+doc if os.path.isdir(fullpath): continue lfcr(fullpath) +# generates the '.mo' files used by gettext pos = "../src/po/" mos = "locale" - makeFolders(mos) for po in fnmatch.filter(os.listdir(pos), "*.po"): fullpath = pos+po if os.path.isdir(fullpath): continue po2mo(os.path.splitext(po)[0], pos, mos) +# builds 'filelist.inc'. Prevents cvs clutter from being packaged by NSIS fp = open("filelist.inc", "w") add2filelist(fp, "data", "..\\data") add2filelist(fp, "data\\fonts", "..\\fonts") @@ -63,4 +63,3 @@ add2filelist(fp, "docs", "..\\docs") fp.write("\n") fp.close() -