From 00456fe62c464eff91cd844111e1b1e8454f30c1 Mon Sep 17 00:00:00 2001 From: Tom Robinson Date: Sat, 16 May 2009 19:42:31 -0700 Subject: [PATCH 1/5] Fixed press. Added --platforms option. --- Tools/press/main.j | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/Tools/press/main.j b/Tools/press/main.j index 9085906d0..d54ec4c88 100644 --- a/Tools/press/main.j +++ b/Tools/press/main.j @@ -9,6 +9,7 @@ var usageMessage = "Usage: press root_directory output_directory [options]\n\ --main path The relative path (from root_directory) to the main file (default: 'main.j')\n\ --frameworks path The relative path (from root_directory) to the frameworks directory (default: 'Frameworks')\n\ + --platforms Platform names, colon separated (default: 'browser:objj')\n\ --png Run pngcrush on all PNGs (pngcrush must be installed!)\n\ --flatten Flatten all code into a single Application.js file and attempt add script tag to index.html (useful for Adobe AIR and CDN deployment)\n\ --nostrip Don't strip any files\n\ @@ -20,6 +21,7 @@ function main() outputDirectory = null, mainFilename = null, frameworksDirectory = null, + platforms = ['browser', 'objj'], optimizePNG = false, flatten = false, noStrip = false, @@ -43,6 +45,12 @@ function main() else usageError = true; break; + case "--platforms": + if (system.args.length) + platforms = system.args.shift().split(":"); + else + usageError = true; + break; case "--png": optimizePNG = true; break; @@ -70,7 +78,7 @@ function main() else CPLogRegisterRange(CPLogPrint, "fatal", "info"); - if (usageError || rootDirectory == null || outputDirectory == null) + if (usageError || rootDirectory == null || outputDirectory == null || !platforms.length) { print(usageMessage); return; @@ -93,6 +101,7 @@ function main() // set OBJJ_INCLUDE_PATHS to include the frameworks path scope.OBJJ_INCLUDE_PATHS = [frameworksPath]; + scope.OBJJ_PLATFORMS = platforms; // flattening bookkeeping. keep track of the bundles and evaled code (in the correct order!) var bundleArchives = [], @@ -298,7 +307,18 @@ function main() replacedFiles = [dict objectForKey:"CPBundleReplacedFiles"]; if (replacedFiles && [replacedFiles containsObject:filename]) { - var staticPath = bundleDirectory + "/" + [dict objectForKey:"CPBundleExecutable"]; + // compute the platform used for this bundle + var platform = "", + bundlePlatforms = [dict objectForKey:"CPBundlePlatforms"]; + + if (bundlePlatforms) + { + platform = [bundlePlatforms firstObjectCommonWithArray:scope.OBJJ_PLATFORMS]; + if (platform) + platform = platform + ".platform/"; + } + + var staticPath = bundleDirectory + "/" + platform + [dict objectForKey:"CPBundleExecutable"]; if (!outputFiles[staticPath]) { outputFiles[staticPath] = []; From 71200ca5f3bfae7e2685b0636d69a9ed00dce7dc Mon Sep 17 00:00:00 2001 From: Ross Boucher Date: Sat, 16 May 2009 22:34:33 -0700 Subject: [PATCH 2/5] Update to the ciruclar slider images --- AppKit/CPSlider.j | 2 +- .../Aristo/Resources/CircularSliderBezel.png | Bin 1374 -> 1174 bytes AppKit/Themes/Aristo/ThemeDescriptors.j | 4 ++-- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/AppKit/CPSlider.j b/AppKit/CPSlider.j index d74122c7a..63104618b 100644 --- a/AppKit/CPSlider.j +++ b/AppKit/CPSlider.j @@ -178,7 +178,7 @@ CPCircularSlider = 1; if ([self hasThemeState:CPThemeStateCircular]) { var angle = 3*PI_2 - (1.0 - [self doubleValue] - _minValue) / (_maxValue - _minValue) * PI2, - radius = CGRectGetWidth(trackRect) / 2.0 - 6.0; + radius = CGRectGetWidth(trackRect) / 2.0 - 8.0; knobRect.origin.x = radius * COS(angle) + CGRectGetMidX(trackRect) - 3.0; knobRect.origin.y = radius * SIN(angle) + CGRectGetMidY(trackRect) - 2.0; diff --git a/AppKit/Themes/Aristo/Resources/CircularSliderBezel.png b/AppKit/Themes/Aristo/Resources/CircularSliderBezel.png index fca36e39e512bcbfea5255745ba4a708f860a2df..56e8d061d2b8c5cec381ca98b0476cdc20b1806f 100644 GIT binary patch delta 1152 zcmV-`1b_S93YG~WiBL{Q4GJ0x0000DNk~Le0000Y0000Y2nGNE06Iqt!jT~-e*`#5 zL_t(|+U!`}OH*MSe$PId`LU)MUMPwpA_QG@VMY|9C<>y8|3P>aZgms=10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LcbGac@qGmG7i8dBPR{diR#q0L)oL@9N@Xp%oPJEfbsMl+ ztt=`kiX|o{R<^aZm4S=*@SY0D&CONB#lPxnT&x$i8@g!#viT;Cz0(Bw|^8G8hY(Wzv&7K3uEAV zke!`fUr9{_Z(S;tq3eEEPPMQSSqF1mjYC}TMN4X0##CY zy8zsN0{+O6uWxy*fA__b%jJYOP6bG%vUtF!0%S6I0(~R_0!p}o<0L*4Aoc(W6Eqr4 zFbUwXFJd}U`SjHyK6pY(0+`iiJ4UlnaAHh)e^DUX>~`1O+}sffaG8w8t)ru(Xbc%X z5kURHY%=Xo-y#8y{r&wF3=pZ9c6=g$hL?kbgH_@tpW6%uf5Wf1;PoQp0SsoFo11## zCIJ>qK0jlEIi#-T?IJ{hjv>W9I5^lx+@c3CLjC#d`SYK)Fh+UX`i;#^_QGHoT3A?k zAqr?|ZKd2h`2OL;ZO=+3M=5wX3tU8JvHKF>q3R%($^MF){Hq4U;yT z%_{=_zsEqJ*{tT zX=x=cz%F)2n#&p+8)-5<0#@<4Zgys77MXEtV;Q{5=AS$olHGr@RR%0(m6hMHZ)h6+R*OZ2DCTKf&K^KK=KzXuoPtD) zmzI{Ce={>POO^uB@u8 zl+e5Y1OcHyIL(!Sf~Fb3)4k~BbbKZiB05}B4xj&7hQ~&?~ M07*qoM6N<$f_~nDd;kCd diff --git a/AppKit/Themes/Aristo/ThemeDescriptors.j b/AppKit/Themes/Aristo/ThemeDescriptors.j index 4e00f026b..4e896255d 100644 --- a/AppKit/Themes/Aristo/ThemeDescriptors.j +++ b/AppKit/Themes/Aristo/ThemeDescriptors.j @@ -467,8 +467,8 @@ + (CPSlider)themedCircularSlider { - var slider = [[CPSlider alloc] initWithFrame:CGRectMake(0.0, 0.0, 32.0, 32.0)], - trackColor = PatternColor([_CPCibCustomResource imageResourceWithName:"circularSliderBezel.png" size:CGSizeMake(32.0, 32.0)]); + var slider = [[CPSlider alloc] initWithFrame:CGRectMake(0.0, 0.0, 34.0, 34.0)], + trackColor = PatternColor([_CPCibCustomResource imageResourceWithName:"circularSliderBezel.png" size:CGSizeMake(34.0, 34.0)]); [slider setSliderType:CPCircularSlider]; [slider setValue:trackColor forThemeAttribute:@"track-color" inState:CPThemeStateCircular]; From bd3895e6c1c863d20b357a5370d12a3558caddde Mon Sep 17 00:00:00 2001 From: Ross Boucher Date: Sun, 17 May 2009 13:00:06 -0700 Subject: [PATCH 3/5] make windows not white by default --- AppKit/CPWindow/_CPStandardWindowView.j | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AppKit/CPWindow/_CPStandardWindowView.j b/AppKit/CPWindow/_CPStandardWindowView.j index bea97d8a8..38c44f353 100644 --- a/AppKit/CPWindow/_CPStandardWindowView.j +++ b/AppKit/CPWindow/_CPStandardWindowView.j @@ -117,7 +117,7 @@ var STANDARD_GRADIENT_HEIGHT = 41.0; + (CPColor)bodyBackgroundColor { if (!_CPStandardWindowViewBodyBackgroundColor) - _CPStandardWindowViewBodyBackgroundColor = [CPColor whiteColor];// + _CPStandardWindowViewBodyBackgroundColor = [CPColor colorWithWhite:0.96 alpha:1.0]; return _CPStandardWindowViewBodyBackgroundColor; } From 7ea048f5bde38d2a51d166398624a9262c895a3b Mon Sep 17 00:00:00 2001 From: Tom Robinson Date: Sun, 17 May 2009 15:18:48 -0700 Subject: [PATCH 4/5] Fix root submodules task and for older versions of git --- External/Rakefile | 2 +- Rakefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/External/Rakefile b/External/Rakefile index 206559362..0272cabf9 100644 --- a/External/Rakefile +++ b/External/Rakefile @@ -23,7 +23,7 @@ end task :update_submodules do if executable_exists? "git" - system %{cd .. && git submodule update --init} + system %{cd .. && git submodule init && git submodule update} else puts "Git not installed" rake abort diff --git a/Rakefile b/Rakefile index 2ae19fb41..68724d3ed 100644 --- a/Rakefile +++ b/Rakefile @@ -102,7 +102,7 @@ end task :submodules do if executable_exists? "git" - system %{cd .. && git submodule update --init} + system %{git submodule init && git submodule update} else puts "Git not installed" rake abort From 4a1630b7ba40f3aa340011925f58e69cecbb7fcf Mon Sep 17 00:00:00 2001 From: Ross Boucher Date: Sun, 17 May 2009 16:50:54 -0700 Subject: [PATCH 5/5] Add IE7 compatibility meta tag to new project templates. For now. --- Tools/capp/Templates/Application/index-debug.html | 2 ++ Tools/capp/Templates/Application/index.html | 2 ++ Tools/capp/Templates/NibApplication/index-debug.html | 2 ++ Tools/capp/Templates/NibApplication/index.html | 2 ++ Tools/capp/Templates/ThemeDescriptor/index-debug.html | 2 ++ Tools/capp/Templates/ThemeDescriptor/index.html | 2 ++ 6 files changed, 12 insertions(+) diff --git a/Tools/capp/Templates/Application/index-debug.html b/Tools/capp/Templates/Application/index-debug.html index d941b006a..510d4096f 100644 --- a/Tools/capp/Templates/Application/index-debug.html +++ b/Tools/capp/Templates/Application/index-debug.html @@ -14,6 +14,8 @@ --> + + Hello World