From 661fd3446d1cd99597be10aacbeee8c13254cd23 Mon Sep 17 00:00:00 2001 From: Francisco Tolmasky Date: Thu, 19 Mar 2009 18:25:25 -0700 Subject: [PATCH] Added beginnings of downlaods task. Reviewed by me. --- AppKit/Rakefile | 2 +- Rakefile | 32 +++++++++++++++++++++++++++++++- common.rb | 8 ++++++++ 3 files changed, 40 insertions(+), 2 deletions(-) diff --git a/AppKit/Rakefile b/AppKit/Rakefile index 49831d219..649b67df8 100644 --- a/AppKit/Rakefile +++ b/AppKit/Rakefile @@ -28,7 +28,7 @@ ObjectiveJ::BundleTask.new(:AppKit) do |t| end #Framework in environment directory -file_d $ENVIRONMENT_PRODUCT => [:AppKit] do +file_d $ENVIRONMENT_PRODUCT => [:AppKit, $THEME_PRODUCT] do cp_r(File.join($BUILD_PATH, '.'), $ENVIRONMENT_PRODUCT) end diff --git a/Rakefile b/Rakefile index fb40f44f4..8b69aacb2 100644 --- a/Rakefile +++ b/Rakefile @@ -13,4 +13,34 @@ subprojects = %w{Objective-J Foundation AppKit Tools} end end -#task :deploy => [:build] \ No newline at end of file +$DEBUG_ENV = File.join($BUILD_DIR, 'Release', 'env') +$RELEASE_ENV = File.join($BUILD_DIR, 'Release', 'env') +$TOOLS_ENV = File.join($BUILD_DIR, 'Cappuccino', 'Tools', 'objj') + +$STARTER_DOWNLOAD = File.join($BUILD_DIR, 'Cappuccino', 'Starter') +$STARTER_APPLICATION = File.join($BUILD_DIR, 'Cappuccino', 'Starter', 'NewApplication') + +task :downloads => [:starter_download, :tools_download] + +file_d $TOOLS_ENV => [:debug, :release] do + cp_r(File.join($RELEASE_ENV, '.'), $TOOLS_ENV) + cp_r(File.join($DEBUG_ENV, 'lib', 'Frameworks', '.'), File.join($TOOLS_ENV, 'lib', 'Frameworks', 'Debug')) +end + +task :tools_download => [$TOOLS_ENV] + +task :starter_download => [$STARTER_APPLICATION] + +file_d $STARTER_APPLICATION => [$TOOLS_ENV] do + + ENV['PATH'] = "#{File.join($TOOLS_ENV, 'bin')}:#{ENV['PATH']}" + + rm_rf($STARTER_APPLICATION) + mkdir_p($STARTER_DOWNLOAD) + system %{capp #{$STARTER_APPLICATION} -t Application } + +end + +task :install => [:downloads] do + +end diff --git a/common.rb b/common.rb index 1ab8fdf1b..fa895b29d 100644 --- a/common.rb +++ b/common.rb @@ -113,11 +113,15 @@ task 'clean-debug' do spawn_rake(:clean) end +task :cleandebug => ['clean-debug'] + task 'clean-release' do ENV['CONFIG'] = 'Release' spawn_rake(:clean) end +task :cleanrelease => ['clean-release'] + task 'clean-all' => ['clean-debug', 'clean-release'] task :cleanall => ['clean-all'] @@ -126,11 +130,15 @@ task 'clobber-debug' do spawn_rake(:clobber) end +task :clobberdebug => ['clobber-debug'] + task 'clobber-release' do ENV['CONFIG'] = 'Release' spawn_rake(:clobber) end +task :clobberrelease => ['clobber-release'] + task 'clobber-all' => ['clobber-debug', 'clobber-release'] task :clobberall => ['clobber-all']