SYMBIAN: Fix codestyle from #3170.
This commit is contained in:
parent
4406d6c598
commit
09645004ec
2 changed files with 27 additions and 15 deletions
|
@ -195,7 +195,12 @@ gnumakefile ..\\help\\build_help.mk
|
||||||
def data_dump(macros):
|
def data_dump(macros):
|
||||||
with open(macros) as ff:
|
with open(macros) as ff:
|
||||||
f = ff.readlines()
|
f = ff.readlines()
|
||||||
n = [x.strip() for x in f if x.startswith(('STATICLIBRARY', 'MACRO'))]
|
n = []
|
||||||
|
for x in f:
|
||||||
|
if x.startswith("// MACRO"):
|
||||||
|
x = x.strip("// ")
|
||||||
|
if x.startswith(('STATICLIBRARY', 'MACRO')):
|
||||||
|
n.append(x.strip())
|
||||||
n.sort()
|
n.sort()
|
||||||
return n
|
return n
|
||||||
|
|
||||||
|
@ -213,25 +218,32 @@ def check_cashed(path):
|
||||||
engines_cached = os.path.join(path, "engines.mmh")
|
engines_cached = os.path.join(path, "engines.mmh")
|
||||||
engines = os.path.join(mmps, "engines.mmh")
|
engines = os.path.join(mmps, "engines.mmh")
|
||||||
|
|
||||||
engines_diff = data_diff(engines_cached, engines)
|
try:
|
||||||
macros_diff = data_diff(macros_cached, macros)
|
macros_diff = data_diff(macros_cached, macros)
|
||||||
if not macros_diff:
|
engines_diff = data_diff(engines_cached, engines)
|
||||||
|
except IOError:
|
||||||
return
|
return
|
||||||
|
|
||||||
print "new macro found: %s" %macros_diff
|
if macros_diff:
|
||||||
SafeWriteFile(build_log, "new macro found: ", 'a')
|
os.chmod(macros_cached, stat.S_IWRITE)
|
||||||
SafeWriteFile(build_log, list(macros_diff), 'a')
|
print "new macro(s) found: %s" %macros_diff
|
||||||
SafeWriteFile(build_log, '\n', 'a')
|
AppendToFile(macros_cached, list(macros_diff))
|
||||||
|
AppendToFile(build_log, "new macro found: ")
|
||||||
|
AppendToFile(build_log, list(macros_diff))
|
||||||
|
|
||||||
|
if engines_diff:
|
||||||
|
os.chmod(engines_cached, stat.S_IWRITE)
|
||||||
|
print "new engine(s) found: %s" %engines_diff
|
||||||
|
AppendToFile(engines_cached, list(engines_diff))
|
||||||
|
AppendToFile(build_log, "new macro found: ")
|
||||||
|
AppendToFile(build_log, list(engines_diff))
|
||||||
|
|
||||||
os.chmod(macros_cached, stat.S_IWRITE)
|
|
||||||
os.chmod(engines_cached, stat.S_IWRITE)
|
|
||||||
SafeWriteFile(macros_cached, list(macros_diff), 'a')
|
|
||||||
SafeWriteFile(engines_cached, list(engines_diff), 'a')
|
|
||||||
os.chmod(macros_cached, stat.S_IREAD)
|
os.chmod(macros_cached, stat.S_IREAD)
|
||||||
os.chmod(engines_cached, stat.S_IREAD)
|
os.chmod(engines_cached, stat.S_IREAD)
|
||||||
|
AppendToFile(build_log, '\n')
|
||||||
|
|
||||||
|
|
||||||
def create_mmps(build, path = ''):
|
def create_mmps(build, path):
|
||||||
uids = get_UIDs(build)
|
uids = get_UIDs(build)
|
||||||
bld_inf = os.path.join(path, "bld.inf")
|
bld_inf = os.path.join(path, "bld.inf")
|
||||||
SafeWriteFile(bld_inf, bld_inf_template)
|
SafeWriteFile(bld_inf, bld_inf_template)
|
||||||
|
@ -253,7 +265,7 @@ def create_mmps(build, path = ''):
|
||||||
data = mmp_template %(idx, UID3, idx, idx, idx, idx2, idx2)
|
data = mmp_template %(idx, UID3, idx, idx, idx, idx2, idx2)
|
||||||
mmp_name = "ScummVM%s.mmp" %idx2
|
mmp_name = "ScummVM%s.mmp" %idx2
|
||||||
SafeWriteFile(os.path.join(path, mmp_name), data)
|
SafeWriteFile(os.path.join(path, mmp_name), data)
|
||||||
SafeWriteFile(bld_inf, mmp_name + "\n", mode = 'a')
|
AppendToFile(bld_inf, mmp_name + "\n")
|
||||||
check_cashed(path)
|
check_cashed(path)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
|
@ -12,7 +12,7 @@ va_macro_src = [("engines\\sci", "resource_patcher.cpp"), ("engines\\ags", "mana
|
||||||
oneline_patch_src = [
|
oneline_patch_src = [
|
||||||
("ptr.h", ["common", r'#include <cstddef>', r'//#include <cstddef>']),
|
("ptr.h", ["common", r'#include <cstddef>', r'//#include <cstddef>']),
|
||||||
|
|
||||||
("object.cpp", ["gui", r'error("Unable to load widget position for \'%s\'. Please check your theme files", _name.c_str());', r'warning("Unable to load widget position for \'%s\'. Please check your theme files", _name.c_str());']),
|
("object.cpp", ["gui", '''error("Unable to load widget position for \'%s\'. Please check your theme files", _name.c_str());''', '''warning("Unable to load widget position for \'%s\'. Please check your theme files", _name.c_str());''']),
|
||||||
# ("", ["", "", ""]),
|
# ("", ["", "", ""]),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue