[macruby-changes] [733] MacRuby/trunk/lib/hotcocoa
source_changes at macosforge.org
source_changes at macosforge.org
Mon Nov 10 21:18:49 PST 2008
Revision: 733
http://trac.macosforge.org/projects/ruby/changeset/733
Author: rich at infoether.com
Date: 2008-11-10 21:18:49 -0800 (Mon, 10 Nov 2008)
Log Message:
-----------
add additional check to ensure they are using standard_rake_tasks and execute binary rather than opening the app
Modified Paths:
--------------
MacRuby/trunk/lib/hotcocoa/application_builder.rb
MacRuby/trunk/lib/hotcocoa/standard_rake_tasks.rb
Modified: MacRuby/trunk/lib/hotcocoa/application_builder.rb
===================================================================
--- MacRuby/trunk/lib/hotcocoa/application_builder.rb 2008-11-11 05:15:50 UTC (rev 732)
+++ MacRuby/trunk/lib/hotcocoa/application_builder.rb 2008-11-11 05:18:49 UTC (rev 733)
@@ -5,6 +5,7 @@
class ApplicationBuilder
class Configuration
+
attr_reader :name, :version, :icon, :resources, :sources, :info_string, :load
def initialize(file)
@@ -40,7 +41,7 @@
attr_accessor :name, :load_file, :sources, :overwrite, :icon, :version, :info_string, :secure, :resources, :deploy
def self.build(config, options={:deploy => false})
- unless config.kind_of?(Configuration)
+ if !config.kind_of?(Configuration) || !$LOADED_FEATURES.detect {|f| f.include?("standard_rake_tasks")}
require 'rbconfig'
puts "Your Rakefile needs to be updated. Please copy the Rakefile from:"
puts File.expand_path(File.join(Config::CONFIG['datadir'], "hotcocoa_template", "Rakefile"))
Modified: MacRuby/trunk/lib/hotcocoa/standard_rake_tasks.rb
===================================================================
--- MacRuby/trunk/lib/hotcocoa/standard_rake_tasks.rb 2008-11-11 05:15:50 UTC (rev 732)
+++ MacRuby/trunk/lib/hotcocoa/standard_rake_tasks.rb 2008-11-11 05:18:49 UTC (rev 733)
@@ -9,7 +9,7 @@
end
task :run => [:build] do
- `/usr/bin/open "#{AppConfig.name}.app"`
+ `"./#{AppConfig.name}.app/Contents/MacOS/#{AppConfig.name.gsub(/ /, '')}"`
end
task :clean do
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20081110/ecb1b2a3/attachment.html>
More information about the macruby-changes
mailing list