Skip to content

Commit

Permalink
Merge pull request #1285 from sptramer/timob-7436-18X
Browse files Browse the repository at this point in the history
[TIMOB-7436][1_8_X] Safely copy custom fonts when building.
  • Loading branch information
Max Stepanov committed Jan 27, 2012
2 parents 009750b + 117f2c8 commit 56f7e9d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions support/iphone/builder.py
Expand Up @@ -1119,8 +1119,15 @@ def log(msg):
# since we need to make them live in the bundle in simulator
if len(custom_fonts)>0:
for f in custom_fonts:
print "[INFO] Detected custom font: %s" % os.path.basename(f)
shutil.copy(f,app_dir)
font = os.path.basename(f)
app_font_path = os.path.join(app_dir, font)
print "[INFO] Detected custom font: %s" % font
if os.path.exists(app_font_path):
os.remove(app_font_path)
try:
shutil.copy(f,app_dir)
except shutil.Error, e:
print "[WARN] Not copying %s: %s" % (font, e)

# dump out project file info
if command not in ['simulator', 'build']:
Expand Down

0 comments on commit 56f7e9d

Please sign in to comment.