rubyosa19 0.5.4 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/{extconf.rb → ext/rubyosa/extconf.rb} +5 -18
- data/ext/rubyosa/osx_intern.h +912 -0
- data/ext/rubyosa/osx_ruby.h +34 -0
- data/{src → ext/rubyosa}/rbosa.c +4 -31
- data/{src → ext/rubyosa}/rbosa.h +1 -1
- data/{src → ext/rubyosa}/rbosa_conv.c +5 -24
- data/{src → ext/rubyosa}/rbosa_err.c +0 -0
- data/{src → ext/rubyosa}/rbosa_sdef.c +0 -8
- data/{src/lib → lib/rubyosa}/rbosa.rb +55 -22
- data/{src/lib → lib/rubyosa}/rbosa_properties.rb +0 -0
- data/lib/rubyosa.rb +18 -0
- metadata +45 -78
- data/AUTHORS +0 -16
- data/COPYRIGHT +0 -25
- data/README.markdown +0 -61
- data/bin/rdoc-osa +0 -232
- data/data/rubyosa/rdoc_html.rb +0 -696
- data/sample/AddressBook/inspect.rb +0 -31
- data/sample/BBEdit/unix_script.rb +0 -19
- data/sample/Finder/show_desktop.rb +0 -10
- data/sample/Mail/get_selected_mail.rb +0 -14
- data/sample/Photoshop/new_doc.rb +0 -13
- data/sample/Photoshop/new_doc_with_text.rb +0 -34
- data/sample/QuickTime/play_all.rb +0 -30
- data/sample/TextEdit/hello_world.rb +0 -19
- data/sample/iChat/image.rb +0 -18
- data/sample/iChat/uptime.rb +0 -15
- data/sample/iTunes/artwork.rb +0 -14
- data/sample/iTunes/control.rb +0 -66
- data/sample/iTunes/fade_volume.rb +0 -23
- data/sample/iTunes/inspect.rb +0 -16
- data/sample/iTunes/name_that_tune.rb +0 -97
- data/sample/iTunes/tag_genre_lastfm.rb +0 -32
- data/sample/misc/sdef.rb +0 -37
@@ -29,26 +29,18 @@ require 'mkmf'
|
|
29
29
|
$CFLAGS << ' -Wall '
|
30
30
|
$LDFLAGS = '-framework Carbon -framework ApplicationServices'
|
31
31
|
|
32
|
-
if RUBY_VERSION =~ /^1.9/ then
|
33
|
-
$CPPFLAGS += " -DRUBY_19"
|
34
|
-
end
|
35
|
-
|
36
32
|
exit 1 unless have_func('OSACopyScriptingDefinition')
|
37
33
|
exit 1 unless have_func('LSFindApplicationForInfo')
|
38
34
|
|
39
35
|
# Avoid `ID' and `T_DATA' symbol collisions between Ruby and Carbon.
|
40
36
|
# (adapted code from RubyAEOSA - FUJIMOTO Hisakuni <hisa@fobj.com>)
|
41
|
-
|
42
|
-
|
43
|
-
intern_h = "#{Config::CONFIG['rubyhdrdir']}/ruby/intern.h"
|
44
|
-
else
|
45
|
-
ruby_h = "#{Config::CONFIG['archdir']}/ruby.h"
|
46
|
-
intern_h = "#{Config::CONFIG['archdir']}/intern.h"
|
47
|
-
end
|
37
|
+
ruby_h = "#{RbConfig::CONFIG['rubyhdrdir']}/ruby.h"
|
38
|
+
intern_h = "#{RbConfig::CONFIG['rubyhdrdir']}/ruby/intern.h"
|
48
39
|
new_filename_prefix = 'osx_'
|
49
40
|
[ ruby_h, intern_h ].each do |src_path|
|
50
|
-
dst_fname = File.join('./
|
41
|
+
dst_fname = File.join('./', new_filename_prefix + File.basename(src_path))
|
51
42
|
$stderr.puts "create #{File.expand_path(dst_fname)} ..."
|
43
|
+
$stderr.puts "path: #{`pwd`}"
|
52
44
|
File.open(dst_fname, 'w') do |dstfile|
|
53
45
|
IO.foreach(src_path) do |line|
|
54
46
|
line = line.gsub(/\bID\b/, 'RB_ID')
|
@@ -60,9 +52,4 @@ new_filename_prefix = 'osx_'
|
|
60
52
|
end
|
61
53
|
|
62
54
|
# Generate the Makefile
|
63
|
-
create_makefile('osa'
|
64
|
-
|
65
|
-
# Tweak the Makefile to add an extra install task.
|
66
|
-
text = File.read('Makefile')
|
67
|
-
text << "\n\ninstall-extras: post-install.rb\n\t@$(RUBY) post-install.rb\n\n"
|
68
|
-
File.open('Makefile', 'w') { |io| io.write(text) }
|
55
|
+
create_makefile('rubyosa/osa')
|