Skip to content

Commit

Permalink
Cleaned up build scripts.
Browse files Browse the repository at this point in the history
Reviewed by me.
  • Loading branch information
Francisco Tolmasky committed Mar 17, 2009
1 parent b4cf1ba commit 319127f
Show file tree
Hide file tree
Showing 4 changed files with 586 additions and 125 deletions.
57 changes: 18 additions & 39 deletions AppKit/Tools/blend/rakefile
Expand Up @@ -3,57 +3,36 @@
require 'rake'
require '../../../common'
require 'objective-j'
require 'objective-j/bundle'
require 'objective-j/bundletask'


$PRODUCT = 'blend' + $CONFIGURATION
$PRODUCT = :blend
$BUILD_PATH = File.join($BUILD_DIR, $CONFIGURATION, 'blend')
$ENVIRONMENT_BIN_PRODUCT = File.join($ENVIRONMENT_BIN_DIR, 'blend')
$ENVIRONMENT_LIB_PRODUCT = File.join($ENVIRONMENT_LIB_DIR, 'blend')

task :build => [$PRODUCT, $ENVIRONMENT_BIN_PRODUCT, $ENVIRONMENT_LIB_PRODUCT]

Specs = {}
task :build => [:blend, $ENVIRONMENT_BIN_PRODUCT, $ENVIRONMENT_LIB_PRODUCT]

# Debug Framework
Specs[:blendDebug] = ObjectiveJ::BundleSpecification.new do |s|
s.name = 'blend'
s.identifier = 'com.280n.blend'
s.version = '0.6.5'
s.author = '280 North, Inc.'
s.email = 'feedback @nospam@ 280north.com'
s.summary = 'blend classes for Cappuccino'
s.sources = FileList['**/*.j']
s.resources = FileList['Resources/*']
s.license = ObjectiveJ::License::LGPL_v2_1
s.build_path = File.join($BUILD_DIR, 'Debug', 'blend')
s.intermediates_path = File.join($BUILD_DIR, 'blend.build', 'Debug')
s.flag = 'DEBUG'
ObjectiveJ::BundleTask.new(:blend) do |t|
t.name = 'blend'
t.identifier = 'com.280n.blend'
t.version = '0.6.5'
t.author = '280 North, Inc.'
t.email = 'feedback @nospam@ 280north.com'
t.summary = 'blend classes for Cappuccino'
t.sources = FileList['**/*.j']
t.resources = FileList['Resources/*']
t.license = ObjectiveJ::License::LGPL_v2_1
t.build_path = $BUILD_PATH
t.flag = 'DEBUG' if $CONFIGURATION == 'Debug'
end

bundle Specs[:blendDebug], :blendDebug

# Release Framework
Specs[:blendRelease] = ObjectiveJ::BundleSpecification.new do |s|
s.name = 'blend'
s.identifier = 'com.280n.blend'
s.version = '0.6.5'
s.author = '280 North, Inc.'
s.email = 'feedback @nospam@ 280north.com'
s.summary = 'blend classes for Cappuccino'
s.sources = FileList['**/*.j']
s.resources = FileList['Resources/*']
s.license = ObjectiveJ::License::LGPL_v2_1
s.build_path = File.join($BUILD_DIR, 'Release', 'blend')
s.intermediates_path = File.join($BUILD_DIR, 'blend.build', 'Release')
end

bundle Specs[:blendRelease], :blendRelease

#executable in environment directory
file_d $ENVIRONMENT_BIN_PRODUCT do
make_objj_executable($ENVIRONMENT_BIN_PRODUCT)
end

file_d $ENVIRONMENT_LIB_PRODUCT => [$PRODUCT] do
cp_r(Specs[$PRODUCT.to_sym].build_path, $ENVIRONMENT_LIB_PRODUCT)
file_d $ENVIRONMENT_LIB_PRODUCT => [:blend] do
cp_r($BUILD_PATH, $ENVIRONMENT_LIB_PRODUCT)
end
63 changes: 19 additions & 44 deletions AppKit/rakefile
Expand Up @@ -3,70 +3,45 @@
require 'rake'
require '../common'
require 'objective-j'
require 'objective-j/bundle'
require 'objective-j/bundletask'


$PRODUCT = 'AppKit' + $CONFIGURATION
$BUILD_PATH = File.join($BUILD_DIR, $CONFIGURATION, 'AppKit')
$ENVIRONMENT_PRODUCT = File.join($ENVIRONMENT_FRAMEWORKS_DIR, 'AppKit')
$THEME_PRODUCT = File.join($BUILD_PATH, 'Resources', 'Aristo.blend')

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]
ObjectiveJ::BundleTask.new(:AppKit) do |t|
t.name = 'AppKit'
t.identifier = 'com.280n.AppKit'
t.version = '0.6.5'
t.author = '280 North, Inc.'
t.email = 'feedback @nospam@ 280north.com'
t.summary = 'AppKit classes for Cappuccino'
t.sources = AppKitFiles
t.resources = FileList['Resources/*']
t.license = ObjectiveJ::License::LGPL_v2_1
t.build_path = $BUILD_PATH
t.flag = 'DEBUG' if $CONFIGURATION == 'Debug'
t.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)
file_d $ENVIRONMENT_PRODUCT => [:AppKit] do
cp_r($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]
task :build => [:AppKit, $ENVIRONMENT_PRODUCT, $THEME_PRODUCT]
61 changes: 19 additions & 42 deletions Foundation/rakefile
Expand Up @@ -3,52 +3,29 @@
require 'rake'
require '../common'
require 'objective-j'
require 'objective-j/bundle'
require 'objective-j/bundletask'


$PRODUCT = 'Foundation' + $CONFIGURATION
$ENVIRONMENT_PRODUCT = File.join($ENVIRONMENT_FRAMEWORKS_DIR, 'Foundation')

task :build => [$PRODUCT, $ENVIRONMENT_PRODUCT]

Specs = {}

# Debug Framework
Specs[:FoundationDebug] = ObjectiveJ::BundleSpecification.new do |s|
s.name = 'Foundation'
s.identifier = 'com.280n.Foundation'
s.version = '0.6.5'
s.author = '280 North, Inc.'
s.email = 'feedback @nospam@ 280north.com'
s.summary = 'Foundation classes for Cappuccino'
s.sources = FileList['*.j']
s.resources = FileList['Resources/*'].to_a
s.license = ObjectiveJ::License::LGPL_v2_1
s.build_path = File.join($BUILD_DIR, 'Debug', 'Foundation')
s.intermediates_path = File.join($BUILD_DIR, 'Foundation.build', 'Debug')
s.flag = 'DEBUG'
$BUILD_PATH = File.join($BUILD_DIR, $CONFIGURATION, 'Foundation')

task :build => [:Foundation, $ENVIRONMENT_PRODUCT]

ObjectiveJ::BundleTask.new(:Foundation) do |t|
t.name = 'Foundation'
t.identifier = 'com.280n.Foundation'
t.version = '0.6.5'
t.author = '280 North, Inc.'
t.email = 'feedback @nospam@ 280north.com'
t.summary = 'Foundation classes for Cappuccino'
t.sources = FileList['*.j']
t.resources = FileList['Resources/*'].to_a
t.license = ObjectiveJ::License::LGPL_v2_1
t.build_path = $BUILD_PATH
t.flag = 'DEBUG' if $CONFIGURATION == 'Debug'
end

bundle Specs[:FoundationDebug], :FoundationDebug

# Release Framework
Specs[:FoundationRelease] = ObjectiveJ::BundleSpecification.new do |s|
s.name = 'Foundation'
s.identifier = 'com.280n.Foundation'
s.version = '0.6.5'
s.author = '280 North, Inc.'
s.email = 'feedback @nospam@ 280north.com'
s.summary = 'Foundation classes for Cappuccino'
s.sources = FileList['*.j']
s.resources = FileList['Resources/*'].to_a
s.license = ObjectiveJ::License::LGPL_v2_1
s.build_path = File.join($BUILD_DIR, 'Release', 'Foundation')
s.intermediates_path = File.join($BUILD_DIR, 'Foundation.build', 'Release')
end

bundle Specs[:FoundationRelease], :FoundationRelease

#Framework in environment directory
file_d $ENVIRONMENT_PRODUCT => [$PRODUCT] do
cp_r(Specs[$PRODUCT.to_sym].build_path, $ENVIRONMENT_PRODUCT)
file_d $ENVIRONMENT_PRODUCT => [:Foundation] do
cp_r($BUILD_PATH, $ENVIRONMENT_PRODUCT)
end

0 comments on commit 319127f

Please sign in to comment.