remogatto-ffi-swig-generator 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +0 -5
- data/lib/ffi-generator.rb +48 -0
- data/lib/ffi-swig-generator.rb +2 -1
- data/lib/generator/application.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +6 -1
data/History.txt
CHANGED
@@ -0,0 +1,48 @@
|
|
1
|
+
module FFI
|
2
|
+
module Generator
|
3
|
+
# :stopdoc:
|
4
|
+
VERSION = '0.2.0'
|
5
|
+
LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
|
6
|
+
PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
|
7
|
+
# :startdoc:
|
8
|
+
|
9
|
+
# Returns the version string for the library.
|
10
|
+
#
|
11
|
+
def self.version
|
12
|
+
VERSION
|
13
|
+
end
|
14
|
+
|
15
|
+
# Returns the library path for the module. If any arguments are given,
|
16
|
+
# they will be joined to the end of the libray path using
|
17
|
+
# <tt>File.join</tt>.
|
18
|
+
#
|
19
|
+
def self.libpath( *args )
|
20
|
+
args.empty? ? LIBPATH : ::File.join(LIBPATH, args.flatten)
|
21
|
+
end
|
22
|
+
|
23
|
+
# Returns the lpath for the module. If any arguments are given,
|
24
|
+
# they will be joined to the end of the path using
|
25
|
+
# <tt>File.join</tt>.
|
26
|
+
#
|
27
|
+
def self.path( *args )
|
28
|
+
args.empty? ? PATH : ::File.join(PATH, args.flatten)
|
29
|
+
end
|
30
|
+
|
31
|
+
# Utility method used to require all files ending in .rb that lie in the
|
32
|
+
# directory below this file that has the same name as the filename passed
|
33
|
+
# in. Optionally, a specific _directory_ name can be passed in such that
|
34
|
+
# the _filename_ does not have to be equivalent to the directory.
|
35
|
+
#
|
36
|
+
def self.require_all_libs_relative_to( fname, dir = nil )
|
37
|
+
dir ||= ::File.basename(fname, '.*')
|
38
|
+
search_me = ::File.expand_path(
|
39
|
+
::File.join(::File.dirname(fname), dir, '**', '*.rb'))
|
40
|
+
|
41
|
+
Dir.glob(search_me).sort.each {|rb| require rb}
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
FFI::Generator.require_all_libs_relative_to(__FILE__, 'generator')
|
47
|
+
|
48
|
+
# EOF
|
data/lib/ffi-swig-generator.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: remogatto-ffi-swig-generator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrea Fazzi
|
@@ -49,8 +49,13 @@ files:
|
|
49
49
|
- Rakefile
|
50
50
|
- bin/ffi-gen
|
51
51
|
- examples/Rakefile
|
52
|
+
- examples/generated/libc_wrap.rb
|
53
|
+
- examples/generated/libc_wrap.xml
|
54
|
+
- examples/generated/wiiuse_wrap.rb
|
55
|
+
- examples/generated/wiiuse_wrap.xml
|
52
56
|
- examples/interfaces/libc.i
|
53
57
|
- examples/interfaces/wiiuse.i
|
58
|
+
- lib/ffi-generator.rb
|
54
59
|
- lib/ffi-swig-generator.rb
|
55
60
|
- lib/generator/application.rb
|
56
61
|
- lib/generator/generator.rb
|