DrQueueRubyBindings 0.2 → 0.3

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.
Files changed (3) hide show
  1. data/ext/extconf.rb +29 -20
  2. data/ext/libdrqueue_ruby.i +4 -35
  3. metadata +7 -5
data/ext/extconf.rb CHANGED
@@ -1,9 +1,9 @@
1
1
  require 'mkmf'
2
2
  require 'ftools'
3
3
 
4
- # check if Subversion, SWIG and SCons are installed
5
- if xsystem('which svn') == false
6
- puts 'Subversion is not installed'
4
+ # check if Git, SWIG and SCons are installed
5
+ if xsystem('which git') == false
6
+ puts 'Git is not installed'
7
7
  exit 1
8
8
  end
9
9
  if xsystem('which swig') == false
@@ -17,45 +17,54 @@ end
17
17
 
18
18
  # determine os name
19
19
  if RUBY_PLATFORM =~ /darwin/i
20
- rb_os = '__OSX'
20
+ rb_os = '__OSX'
21
21
  elsif RUBY_PLATFORM =~ /cygwin/i
22
- rb_os = '__CYGWIN'
22
+ rb_os = '__CYGWIN'
23
23
  elsif RUBY_PLATFORM =~ /win32/i
24
- rb_os = '__CYGWIN'
24
+ rb_os = '__CYGWIN'
25
25
  elsif RUBY_PLATFORM =~ /linux/i
26
- rb_os = '__LINUX'
26
+ rb_os = '__LINUX'
27
27
  elsif RUBY_PLATFORM =~ /irix6/i
28
- rb_os = '__IRIX'
28
+ rb_os = '__IRIX'
29
29
  end
30
30
 
31
- # try to do a SVN checkout
32
- if xsystem('svn co --non-interactive https://ssl.drqueue.org/svn/branches/0.64.x') == false
33
- puts 'SVN checkout failed'
34
- exit 1
31
+ if File.directory? "drqueue"
32
+ Dir::chdir 'drqueue'
33
+ # try to do a Git pull
34
+ if xsystem('git pull') == false
35
+ puts 'Git pull failed'
36
+ exit 1
37
+ end
38
+ else
39
+ # try to do a Git clone
40
+ if xsystem('git clone https://ssl.drqueue.org/git/drqueue.git') == false
41
+ puts 'Git clone failed'
42
+ exit 1
43
+ end
44
+ Dir::chdir 'drqueue'
35
45
  end
36
46
 
37
- # try to build drqueue
38
- Dir::chdir '0.64.x'
39
- if xsystem('scons build_drqman=false') == false
40
- puts 'DrQueue build failed'
47
+ # try to build libdrqueue
48
+ if xsystem('scons universal_binary=true libdrqueue') == false
49
+ puts 'libdrqueue build failed'
41
50
  exit 1
42
51
  end
43
52
  Dir::chdir '..'
44
53
 
45
54
  # create swig wrapper
46
55
  puts 'generating swig interface file'
47
- puts 'swig -ruby -I0.64.x/ -I0.64.x/libdrqueue -D'+rb_os+' -Wall -autorename libdrqueue_ruby.i'
48
- xsystem('swig -ruby -I0.64.x/ -I0.64.x/libdrqueue -D'+rb_os+' -Wall -autorename libdrqueue_ruby.i')
56
+ puts 'swig -ruby -Idrqueue/ -Idrqueue/libdrqueue -D'+rb_os+' -Wall -autorename libdrqueue_ruby.i'
57
+ xsystem('swig -ruby -Idrqueue/ -Idrqueue/libdrqueue -D'+rb_os+' -Wall -autorename libdrqueue_ruby.i')
49
58
  puts 'look for output in mkmf.log'
50
59
 
51
60
  # build for os
52
61
  $CFLAGS += ' -D'+rb_os
53
62
 
54
63
  # include the headers
55
- $CFLAGS += ' -I0.64.x/ -I0.64.x/libdrqueue'
64
+ $CFLAGS += ' -Idrqueue/ -Idrqueue/libdrqueue'
56
65
 
57
66
  # path to the drqueue lib
58
- $LOCAL_LIBS += '0.64.x/libdrqueue/libdrqueue.a'
67
+ $LOCAL_LIBS += 'drqueue/libdrqueue/libdrqueue.a'
59
68
 
60
69
  # create the makefile
61
70
  create_makefile('drqueue')
@@ -24,7 +24,7 @@
24
24
 
25
25
  %define DOCSTRING
26
26
  "The drqueue module allows the access to the libdrqueue library responsible
27
- of all major operations that can be applied remotely to drqueue master and
27
+ of all major operations that can be applied remotely to DrQueue master and
28
28
  slaves. Also provides access to all data structures of DrQueue."
29
29
  %enddef
30
30
  %module (docstring=DOCSTRING) drqueue
@@ -302,39 +302,9 @@ typedef unsigned char uint8_t;
302
302
 
303
303
  return outfile;
304
304
  }
305
-
306
- /* blenderlux script file generation */
307
- char *blenderluxsg (char *scene, char *scriptdir)
308
- {
309
- struct blenderluxsgi *luxren = (struct blenderluxsgi *)malloc (sizeof(struct blenderluxsgi));
310
- if (!luxren) {
311
- rb_raise(rb_eNoMemError,"out of memory");
312
- return NULL;
313
- }
314
-
315
- char *outfile = (char *)malloc(sizeof(char *));
316
- if (!outfile) {
317
- rb_raise(rb_eNoMemError,"out of memory");
318
- return NULL;
319
- }
320
-
321
- memset (luxren,0,sizeof(struct blenderluxsgi));
322
305
 
323
- strncpy(luxren->scene, scene, BUFFERLEN-1);
324
- strncpy(luxren->scriptdir, scriptdir, BUFFERLEN-1);
325
-
326
- outfile = blenderluxsg_create(luxren);
327
-
328
- if (!outfile) {
329
- rb_raise(rb_eException,"Problem creating script file");
330
- return NULL;
331
- }
332
-
333
- return outfile;
334
- }
335
-
336
306
  /* MentalRay script file generation */
337
- char *mentalraysg (char *scene, char *scriptdir, char *renderdir, char *image, char *file_owner, char *camera, int res_x, int res_y, char *format, uint8_t kind)
307
+ char *mentalraysg (char *scene, char *scriptdir, char *renderdir, char *image, char *file_owner, char *camera, int res_x, int res_y, char *format, uint8_t render_type)
338
308
  {
339
309
  struct mentalraysgi *ment = (struct mentalraysgi *)malloc (sizeof(struct mentalraysgi));
340
310
  if (!ment) {
@@ -359,7 +329,7 @@ typedef unsigned char uint8_t;
359
329
  ment->res_x = res_x;
360
330
  ment->res_y = res_y;
361
331
  strncpy(ment->format, format, BUFFERLEN-1);
362
- ment->kind = kind;
332
+ ment->render_type = render_type;
363
333
 
364
334
  outfile = mentalraysg_create(ment);
365
335
 
@@ -372,7 +342,7 @@ typedef unsigned char uint8_t;
372
342
  }
373
343
 
374
344
  /* Cinema4D script file generation */
375
- char *cinema4dsg (char *scene, char *scriptdir, char *file_owner, uint8_t kind)
345
+ char *cinema4dsg (char *scene, char *scriptdir, char *file_owner)
376
346
  {
377
347
  struct cinema4dsgi *cine = (struct cinema4dsgi *)malloc (sizeof(struct cinema4dsgi));
378
348
  if (!cine) {
@@ -391,7 +361,6 @@ typedef unsigned char uint8_t;
391
361
  strncpy(cine->scene, scene, BUFFERLEN-1);
392
362
  strncpy(cine->scriptdir, scriptdir, BUFFERLEN-1);
393
363
  strncpy(cine->file_owner, file_owner, BUFFERLEN-1);
394
- cine->kind = kind;
395
364
 
396
365
  outfile = cinema4dsg_create(cine);
397
366
 
metadata CHANGED
@@ -1,18 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: DrQueueRubyBindings
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.2"
4
+ version: "0.3"
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andreas Schroeder
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain:
11
- date: 2009-12-31 00:00:00 +01:00
11
+ date: 2010-05-12 00:00:00 +02:00
12
12
  default_executable:
13
13
  dependencies: []
14
14
 
15
- description:
15
+ description: This gem is a Ruby extension library providing an API to DrQueue, the open source render queue. Git, SWIG and SCons are required for building. See https://ssl.drqueue.org/redmine/projects/drqueue/wiki/RubyBindingsHowto for more information.
16
16
  email: andreas@drqueue.org
17
17
  executables: []
18
18
 
@@ -23,8 +23,10 @@ extra_rdoc_files: []
23
23
  files:
24
24
  - COPYING
25
25
  - ext/libdrqueue_ruby.i
26
- has_rdoc: false
26
+ has_rdoc: true
27
27
  homepage: http://www.drqueue.org
28
+ licenses: []
29
+
28
30
  post_install_message:
29
31
  rdoc_options: []
30
32
 
@@ -45,7 +47,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
45
47
  requirements:
46
48
  - Ruby bindings for DrQueue
47
49
  rubyforge_project: drqueue
48
- rubygems_version: 1.3.1
50
+ rubygems_version: 1.3.5
49
51
  signing_key:
50
52
  specification_version: 1
51
53
  summary: Ruby extension library providing an API to DrQueue