Skip to content

Commit

Permalink
Merge branch 'patch-1' of https://github.com/eddiemonge/titanium_mobile
Browse files Browse the repository at this point in the history
… into pull-129
  • Loading branch information
sptramer committed Jun 24, 2011
2 parents 655ef46 + fb47340 commit ed0b573
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion support/iphone/builder.py 100755 → 100644
Expand Up @@ -42,6 +42,17 @@ def version_sort(a,b):
return 1
return 0

# Find the SDK file path
def find_sdk_path(version):
sdk_path = os.path.join(os.path.expanduser("~/Library/Application Support/Titanium"),"mobilesdk","osx",version)
if os.path.exists(sdk_path):
return sdk_path
sdk_path = os.path.join("/Library","Application Support","Titanium","mobilesdk","osx",version)
if os.path.exists(sdk_path):
return sdk_path
print "Is Titanium installed? I can't find it"
sys.exit(1)

# this will return the version of the iOS SDK that we have installed
def check_iphone_sdk(s):
found = []
Expand Down Expand Up @@ -1008,6 +1019,7 @@ def write_info_plist(infoplist_tmpl):

# copy Default.png and appicon each time so if they're
# changed they'll stick get picked up
# If Default.png is not found in the project, copy it from the SDK's default path
app_icon_path = os.path.join(project_dir,'Resources','iphone',applogo)
if not os.path.exists(app_icon_path):
app_icon_path = os.path.join(project_dir,'Resources',applogo)
Expand All @@ -1016,8 +1028,10 @@ def write_info_plist(infoplist_tmpl):
defaultpng_path = os.path.join(project_dir,'Resources','iphone','Default.png')
if not os.path.exists(defaultpng_path):
defaultpng_path = os.path.join(project_dir,'Resources','Default.png')
if not os.path.exists(defaultpng_path):
defaultpng_path = os.path.join(find_sdk_path(sdk_version),'iphone','resources','Default.png')
if os.path.exists(defaultpng_path):
shutil.copy(defaultpng_path,app_dir)
shutil.copy(defaultpng_path,iphone_resources_dir)

extra_args = None

Expand Down

0 comments on commit ed0b573

Please sign in to comment.