Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Make it work on OSX.

Post Great Merge, needed some stuff to make OSX work.

Rakefile has a few changes relating to getting things to build,
builddeps had a silly bug where the last few lines wouldn't work, and
due to the commit by s3v3n's new feature, cocoa.m needed updating so
that fucntions have the right signature.
  • Loading branch information...
commit d0a954038172bdd95494a5c0857e11e64697cc08 1 parent e62d527
Steve Klabnik authored July 03, 2010
11  Rakefile
... ...
@@ -1,7 +1,7 @@
1 1
 require 'rubygems'
2 2
 require 'rake'
3 3
 require 'rake/clean'
4  
-require 'platform/skel'
  4
+require_relative 'platform/skel'
5 5
 require 'fileutils'
6 6
 require 'find'
7 7
 require 'yaml'
@@ -282,6 +282,7 @@ task :build => [:build_os, "dist/VERSION.txt"] do
282 282
     cp "platform/mac/command-manual.rb", "#{APPNAME}.app/Contents/MacOS/"
283 283
     rewrite "platform/mac/shoes-launch", "#{APPNAME}.app/Contents/MacOS/#{NAME}-launch"
284 284
     chmod 0755, "#{APPNAME}.app/Contents/MacOS/#{NAME}-launch"
  285
+    chmod 0755, "#{APPNAME}.app/Contents/MacOS/#{NAME}-bin"
285 286
     rewrite "platform/mac/shoes", "#{APPNAME}.app/Contents/MacOS/#{NAME}"
286 287
     chmod 0755, "#{APPNAME}.app/Contents/MacOS/#{NAME}"
287 288
     # cp InfoPlist.strings YourApp.app/Contents/Resources/English.lproj/
@@ -439,7 +440,11 @@ else
439 440
   if Config::CONFIG['rubyhdrdir']
440 441
     LINUX_CFLAGS << " -I#{Config::CONFIG['rubyhdrdir']} -I#{Config::CONFIG['rubyhdrdir']}/#{RUBY_PLATFORM}"
441 442
   end
442  
-  LINUX_LIB_NAMES = %W[#{ruby_so} cairo pangocairo-1.0 ungif]
  443
+  if RUBY_PLATFORM =~ /darwin/
  444
+    LINUX_LIB_NAMES = %W[#{ruby_so} cairo pangocairo-1.0 gif]
  445
+  else
  446
+    LINUX_LIB_NAMES = %W[#{ruby_so} cairo pangocairo-1.0 ungif]
  447
+  end
443 448
   FLAGS.each do |flag|
444 449
     LINUX_CFLAGS << " -D#{flag}" if ENV[flag]
445 450
   end
@@ -528,7 +533,7 @@ else
528 533
       rm_f t.name
529 534
       rm_f bin
530 535
       if RUBY_PLATFORM =~ /darwin/
531  
-        sh "#{CC} -Ldist -o #{bin} bin/main.o #{LINUX_LIBS} -lshoes -arch i386 -m32"
  536
+        sh "#{CC} -Ldist -o #{bin} bin/main.o #{LINUX_LIBS} -lshoes -arch x86_64"
532 537
       else  
533 538
         sh "#{CC} -Ldist -o #{bin} bin/main.o #{LINUX_LIBS} -lshoes #{Config::CONFIG['LDFLAGS']}"
534 539
         rewrite "platform/nix/shoes.launch", t.name, %r!/shoes-bin!, "/#{NAME}-bin"
1  builddeps.sh
@@ -95,6 +95,7 @@ cd ../ruby-1.9.1-p378
95 95
 make && make install
96 96
 
97 97
 #install RubyGems.
  98
+cd ../rubygems-1.3.6
98 99
 /tmp/dep/bin/ruby setup.rb
99 100
 
100 101
 #install rake.
22  shoes/native/cocoa.m
@@ -1499,7 +1499,7 @@ void shoes_cairo_destroy(shoes_canvas *canvas)
1499 1499
 }
1500 1500
 
1501 1501
 static VALUE
1502  
-shoes_dialog_chooser(VALUE self, NSString *title, BOOL directories)
  1502
+shoes_dialog_chooser(VALUE self, NSString *title, BOOL directories, VALUE attr)
1503 1503
 {
1504 1504
   VALUE path = Qnil;
1505 1505
   COCOA_DO({
@@ -1518,13 +1518,15 @@ void shoes_cairo_destroy(shoes_canvas *canvas)
1518 1518
 }
1519 1519
 
1520 1520
 VALUE
1521  
-shoes_dialog_open(VALUE self)
  1521
+shoes_dialog_open(int argc, VALUE *argv, VALUE self)
1522 1522
 {
1523  
-  return shoes_dialog_chooser(self, @"Open file...", NO);
  1523
+  rb_arg_list args;
  1524
+  rb_parse_args(argc, argv, "|h", &args);
  1525
+  return shoes_dialog_chooser(self, @"Open file...", NO, args.a[0]);
1524 1526
 }
1525 1527
 
1526 1528
 VALUE
1527  
-shoes_dialog_save(VALUE self)
  1529
+shoes_dialog_save(int argc, VALUE *argv, VALUE self)
1528 1530
 {
1529 1531
   VALUE path = Qnil;
1530 1532
   COCOA_DO({
@@ -1539,13 +1541,17 @@ void shoes_cairo_destroy(shoes_canvas *canvas)
1539 1541
 }
1540 1542
 
1541 1543
 VALUE
1542  
-shoes_dialog_open_folder(VALUE self)
  1544
+shoes_dialog_open_folder(int argc, VALUE *argv, VALUE self)
1543 1545
 {
1544  
-  return shoes_dialog_chooser(self, @"Open folder...", YES);
  1546
+  rb_arg_list args;
  1547
+  rb_parse_args(argc, argv, "|h", &args);
  1548
+  return shoes_dialog_chooser(self, @"Open folder...", YES, args.a[0]);
1545 1549
 }
1546 1550
 
1547 1551
 VALUE
1548  
-shoes_dialog_save_folder(VALUE self)
  1552
+shoes_dialog_save_folder(int argc, VALUE *argv, VALUE self)
1549 1553
 {
1550  
-  return shoes_dialog_chooser(self, @"Save folder...", YES);
  1554
+  rb_arg_list args;
  1555
+  rb_parse_args(argc, argv, "|h", &args);
  1556
+  return shoes_dialog_chooser(self, @"Save folder...", YES, args.a[0]);
1551 1557
 }

0 notes on commit d0a9540

Please sign in to comment.
Something went wrong with that request. Please try again.