From 6d34f53e435212ed01725803baa3372ae43fd2d3 Mon Sep 17 00:00:00 2001 From: Francisco Tolmasky Date: Mon, 16 Mar 2009 14:50:45 -0700 Subject: [PATCH] Fix for platform stuff. Reviewed by me. --- AppKit/rakefile | 14 ++++++++++++-- Objective-J/file.js | 8 ++++---- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/AppKit/rakefile b/AppKit/rakefile index bc6a5da6d..e50ece46c 100644 --- a/AppKit/rakefile +++ b/AppKit/rakefile @@ -13,8 +13,6 @@ subprojects = %w{Tools} subrake(subprojects) -task :build => [$PRODUCT, $ENVIRONMENT_PRODUCT] - Specs = {} AppKitFiles = FileList['**/*.j'].exclude('CoreGraphics/CGContextCanvas.j', 'CoreGraphics/CGContextVML.j', 'Themes/**', 'Tools/**') @@ -60,3 +58,15 @@ bundle Specs[:AppKitRelease], :AppKitRelease 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] diff --git a/Objective-J/file.js b/Objective-J/file.js index 716b5e5af..78f58af4d 100644 --- a/Objective-J/file.js +++ b/Objective-J/file.js @@ -369,7 +369,7 @@ objj_search.prototype.didReceiveBundleResponse = function(aResponse) platforms = dictionary_getValue(bundle.info, "CPBundlePlatforms"), index = 0, count = OBJJ_PLATFORMS.length, - inner_count = platforms.length; + innerCount = platforms.length; // Ugh, no indexOf, no objects-in-common. for(; index < count; ++index) @@ -377,8 +377,8 @@ objj_search.prototype.didReceiveBundleResponse = function(aResponse) var innerIndex = 0, currentPlatform = OBJJ_PLATFORMS[index]; - for (; innerIndex < inner_count; ++innerIndex) - if(OBJJ_PLATFORMS[index] === platforms[innerIndex]) + for (; innerIndex < innerCount; ++innerIndex) + if(currentPlatform === platforms[innerIndex]) { platform = currentPlatform; break; @@ -386,7 +386,7 @@ objj_search.prototype.didReceiveBundleResponse = function(aResponse) } executablePath = platform + ".platform/" + executablePath; - + this.request(DIRECTORY(aResponse.filePath) + executablePath, this.didReceiveExecutableResponse); // FIXME: Is this the right approach?