- Slightly better error message in case of syntax errors in the script.
- The applet .rsrc file should be called python.rsrc, it is not based on the applet name.
This commit is contained in:
parent
90b8e4d40c
commit
2eb4b18f94
|
@ -83,8 +83,10 @@ def process(template, filename, destname, copy_codefragment,
|
||||||
fp.close()
|
fp.close()
|
||||||
try:
|
try:
|
||||||
code = compile(text, filename, "exec")
|
code = compile(text, filename, "exec")
|
||||||
except (SyntaxError, EOFError):
|
except SyntaxError, arg:
|
||||||
raise BuildError, "Syntax error in script %s" % `filename`
|
raise BuildError, "Syntax error in script %s: %s" % (filename, arg)
|
||||||
|
except EOFError:
|
||||||
|
raise BuildError, "End-of-file in script %s" % (filename,)
|
||||||
|
|
||||||
# Set the destination file name. Note that basename
|
# Set the destination file name. Note that basename
|
||||||
# does contain the whole filepath, only a .py is stripped.
|
# does contain the whole filepath, only a .py is stripped.
|
||||||
|
@ -341,7 +343,7 @@ def process_common_macho(template, progress, code, rsrcname, destname, is_update
|
||||||
if progress:
|
if progress:
|
||||||
progress.label("Copy resources...")
|
progress.label("Copy resources...")
|
||||||
progress.set(20)
|
progress.set(20)
|
||||||
resfilename = '%s.rsrc' % shortname
|
resfilename = 'python.rsrc' # XXXX later: '%s.rsrc' % shortname
|
||||||
try:
|
try:
|
||||||
output = Res.FSOpenResourceFile(
|
output = Res.FSOpenResourceFile(
|
||||||
os.path.join(destname, 'Contents', 'Resources', resfilename),
|
os.path.join(destname, 'Contents', 'Resources', resfilename),
|
||||||
|
|
Loading…
Reference in New Issue