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):
|
def lfcr(file):
|
||||||
if os.path.isdir(file):
|
if os.path.isdir(file):
|
||||||
|
|
@ -15,12 +15,10 @@ def lfcr(file):
|
||||||
f.write(newdata)
|
f.write(newdata)
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
|
|
||||||
def makeFolders(path):
|
def makeFolders(path):
|
||||||
if not os.path.exists(path):
|
if not os.path.exists(path):
|
||||||
os.makedirs(path)
|
os.makedirs(path)
|
||||||
|
|
||||||
|
|
||||||
def po2mo(pfx, input, output):
|
def po2mo(pfx, input, output):
|
||||||
output_path = os.path.join(output,pfx,"LC_MESSAGES")
|
output_path = os.path.join(output,pfx,"LC_MESSAGES")
|
||||||
makeFolders(output_path)
|
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') # don't visit CVS directories
|
||||||
if 'cvs' in dirs: dirs.remove('cvs')
|
if 'cvs' in dirs: dirs.remove('cvs')
|
||||||
|
|
||||||
|
# makes sure the text docs are in CRLF format for notepad users(!)
|
||||||
docs = "../docs/"
|
docs = "../docs/"
|
||||||
for doc in os.listdir(docs):
|
for doc in os.listdir(docs):
|
||||||
fullpath = docs+doc
|
fullpath = docs+doc
|
||||||
if os.path.isdir(fullpath): continue
|
if os.path.isdir(fullpath): continue
|
||||||
lfcr(fullpath)
|
lfcr(fullpath)
|
||||||
|
|
||||||
|
# generates the '.mo' files used by gettext
|
||||||
pos = "../src/po/"
|
pos = "../src/po/"
|
||||||
mos = "locale"
|
mos = "locale"
|
||||||
|
|
||||||
makeFolders(mos)
|
makeFolders(mos)
|
||||||
for po in fnmatch.filter(os.listdir(pos), "*.po"):
|
for po in fnmatch.filter(os.listdir(pos), "*.po"):
|
||||||
fullpath = pos+po
|
fullpath = pos+po
|
||||||
if os.path.isdir(fullpath): continue
|
if os.path.isdir(fullpath): continue
|
||||||
po2mo(os.path.splitext(po)[0], pos, mos)
|
po2mo(os.path.splitext(po)[0], pos, mos)
|
||||||
|
|
||||||
|
# builds 'filelist.inc'. Prevents cvs clutter from being packaged by NSIS
|
||||||
fp = open("filelist.inc", "w")
|
fp = open("filelist.inc", "w")
|
||||||
add2filelist(fp, "data", "..\\data")
|
add2filelist(fp, "data", "..\\data")
|
||||||
add2filelist(fp, "data\\fonts", "..\\fonts")
|
add2filelist(fp, "data\\fonts", "..\\fonts")
|
||||||
|
|
@ -63,4 +63,3 @@ add2filelist(fp, "docs", "..\\docs")
|
||||||
fp.write("\n")
|
fp.write("\n")
|
||||||
fp.close()
|
fp.close()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue