Files
cappuccino/AppKit/rakefile
T
2009-03-16 14:50:45 -07:00

73 lines
2.6 KiB
Ruby

#!/usr/bin/env ruby
require 'rake'
require '../common'
require 'objective-j'
require 'objective-j/bundle'
$PRODUCT = 'AppKit' + $CONFIGURATION
$ENVIRONMENT_PRODUCT = File.join($ENVIRONMENT_FRAMEWORKS_DIR, 'AppKit')
subprojects = %w{Tools}
subrake(subprojects)
Specs = {}
AppKitFiles = FileList['**/*.j'].exclude('CoreGraphics/CGContextCanvas.j', 'CoreGraphics/CGContextVML.j', 'Themes/**', 'Tools/**')
# Debug Framework
Specs[:AppKitDebug] = ObjectiveJ::BundleSpecification.new do |s|
s.name = 'AppKit'
s.identifier = 'com.280n.AppKit'
s.version = '0.6.5'
s.author = '280 North, Inc.'
s.email = 'feedback @nospam@ 280north.com'
s.summary = 'AppKit classes for Cappuccino'
s.sources = AppKitFiles
s.resources = FileList['Resources/*']
s.license = ObjectiveJ::License::LGPL_v2_1
s.build_path = File.join($BUILD_DIR, 'Debug', 'AppKit')
s.intermediates_path = File.join($BUILD_DIR, 'AppKit.build', 'Debug')
s.flags = ['DEBUG']
s.platforms = [ObjectiveJ::Platform::Browser, ObjectiveJ::Platform::Rhino]
end
bundle Specs[:AppKitDebug], :AppKitDebug
# Release Framework
Specs[:AppKitRelease] = ObjectiveJ::BundleSpecification.new do |s|
s.name = 'AppKit'
s.identifier = 'com.280n.AppKit'
s.version = '0.6.5'
s.author = '280 North, Inc.'
s.email = 'feedback @nospam@ 280north.com'
s.summary = 'AppKit classes for Cappuccino'
s.sources = AppKitFiles
s.resources = FileList['Resources/*']
s.license = ObjectiveJ::License::LGPL_v2_1
s.build_path = File.join($BUILD_DIR, 'Release', 'AppKit')
s.intermediates_path = File.join($BUILD_DIR, 'AppKit.build', 'Release')
s.platforms = [ObjectiveJ::Platform::Browser, ObjectiveJ::Platform::Rhino]
end
bundle Specs[:AppKitRelease], :AppKitRelease
#Framework in environment directory
file_d $ENVIRONMENT_PRODUCT => [$PRODUCT] do
cp_r(Specs[$PRODUCT.to_sym].build_path, $ENVIRONMENT_PRODUCT)
end
ThemeFiles = FileList['Themes/Aristo/*']
$THEME_PRODUCT = File.join(Specs[$PRODUCT.to_sym].build_path, 'Resources', 'Aristo.blend')
file_d $THEME_PRODUCT => ThemeFiles do
File.popen("blend -d Themes/Aristo/ThemeDescriptors.j -o #{$THEME_PRODUCT} -R Themes/Aristo/Resources") do |blend|
puts blend.read
end
end
task :build => [$PRODUCT, $ENVIRONMENT_PRODUCT, $THEME_PRODUCT]