Removed an unused library.
Added some comments.
This commit is contained in:
parent
6e45d58cd3
commit
32620562c8
1 changed files with 4 additions and 5 deletions
|
|
@ -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()
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue