[macruby-changes] [5285] MacRuby/trunk/bin/ruby_deploy
source_changes at macosforge.org
source_changes at macosforge.org
Tue Mar 22 19:17:33 PDT 2011
Revision: 5285
http://trac.macosforge.org/projects/ruby/changeset/5285
Author: lsansonetti at apple.com
Date: 2011-03-22 19:17:30 -0700 (Tue, 22 Mar 2011)
Log Message:
-----------
retrieve the app bundle path from the xcode environment because xcode4 is too buggy to actually pass it properly
Modified Paths:
--------------
MacRuby/trunk/bin/ruby_deploy
Modified: MacRuby/trunk/bin/ruby_deploy
===================================================================
--- MacRuby/trunk/bin/ruby_deploy 2011-03-21 07:06:45 UTC (rev 5284)
+++ MacRuby/trunk/bin/ruby_deploy 2011-03-23 02:17:30 UTC (rev 5285)
@@ -33,8 +33,18 @@
rescue OptionParser::InvalidOption => e
die e, opts
end
- die opts if argv.size != 1
- @app_bundle = argv[0]
+ if argv.empty?
+ # If we are ran from Xcode, determine the application bundle from the environment.
+ build_dir = ENV['TARGET_BUILD_DIR']
+ project_name = ENV['PROJECT_NAME']
+ if build_dir and project_name
+ @app_bundle = File.join(build_dir, project_name + '.app')
+ end
+ end
+ unless @app_bundle
+ die opts if argv.size != 1
+ @app_bundle = argv[0]
+ end
end
ensure_path @app_bundle
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20110322/e30a3314/attachment.html>
More information about the macruby-changes
mailing list