jashkenas / ruby-processing

Code as Art, Art as Code. Processing and Ruby are meant for each other.
http://github.com/jashkenas/ruby-processing/wikis
Other
1.28k stars 94 forks source link

"rp5 app myapp.rb" exporting issue on windows xp #57

Closed illtellyoulater closed 11 years ago

illtellyoulater commented 11 years ago

Ruby-Processing can export Mac/Windows/Linux applications:

rp5 app path/to/my_sketch.rb

But here is what I get on windows xp:

rp5 app bird.rb

C:/ruby193/lib/ruby/1.9.1/fileutils.rb:351:in symlink': symlink() function is unimplemented on this machine (NotImp lementedError) from C:/ruby193/lib/ruby/1.9.1/fileutils.rb:351:inblock in ln_s' from C:/ruby193/lib/ruby/1.9.1/fileutils.rb:1531:in fu_each_src_dest0' from C:/ruby193/lib/ruby/1.9.1/fileutils.rb:349:inln_s' from C:/ruby193/lib/ruby/gems/1.9.1/gems/ruby-processing-1.0.11/lib/ruby-processing/exporters/application_ex porter.rb:81:in symlink_library_into_place' from C:/ruby193/lib/ruby/gems/1.9.1/gems/ruby-processing-1.0.11/lib/ruby-processing/exporters/application_ex porter.rb:32:inexport!' from C:/ruby193/lib/ruby/gems/1.9.1/gems/ruby-processing-1.0.11/lib/ruby-processing/runner.rb:116:in app' from C:/ruby193/lib/ruby/gems/1.9.1/gems/ruby-processing-1.0.11/lib/ruby-processing/runner.rb:69:inexecute !' from C:/ruby193/lib/ruby/gems/1.9.1/gems/ruby-processing-1.0.11/lib/ruby-processing/runner.rb:59:in execute ' from C:/ruby193/lib/ruby/gems/1.9.1/gems/ruby-processing-1.0.11/bin/rp5:10:in<top (required)>' from C:/ruby193/bin/rp5:23:in load' from C:/ruby193/bin/rp5:23:in

'

Any advice ? ruby -v ruby 1.9.3p28 (2012-01-28) jruby -v jruby 1.7.2 (1.9.3p327) 2013-01-04 302c706 on Java HotSpot(TM) Client VM 1.6.0_31-b05 [Windows XP-x86]

Thanks

monkstone commented 11 years ago

I can't really help as a linux user, however recently I've been working on updating ruby processing for jruby-1.7.2 and processing-2.0, and I hope to get a version out when processing-2.0b8 gets released. I found I needed to change the run.erb script/template as follows to get it to work on linux

!/bin/sh

APPDIR=$(dirname "$0") cd "$APPDIR/lib" java -cp "<%= @linux_class_path %>" org.jruby.Main ../lib/ruby-processing/runners/run.rb <%= @main_file %>

The change is in the java -cp line, replaced ruby-processing/runners/run.rb with ../lib/ruby-processing/runners/run.rb .......

illtellyoulater commented 11 years ago

I see, thanks for taking the time to answer, well I think I'll wait for next version to use this feature then :) Thanks for working on this!

monkstone commented 11 years ago

@jjgh might be a bit of problem with that strategy until I can get someone to test/help work on Windows I don't even now whether the development version https://github.com/monkstone/ruby-processing works on windows.

monkstone commented 11 years ago

@jjgh I think the classpath separator may have been wrong was

:
should have been
;
for Windows. Anyway I can't test on Windows, but I've just updated exported classpath for both linux and Windows. Linux ruby-processing now can run exported sketches using P2D, and P3D (previously broken since ruby-processing-2.0).

PS: I just found out gem is too big to be hosted at rubygems, so foreseeable future cloning this repository (or downloading a release) followed by autoubuild will be the only way of installing ruby-processing.

monkstone commented 11 years ago

No-one seems interested, either no windows users or has been fixed?

illtellyoulater commented 11 years ago

Sorry for leaving you alone with this... thing is, if it works people will not loose their interest in it... :) This unfortunately happened to me as I am not an experienced developer so my debugging abilities are very limited (sometimes to the extent of only being able to report a bug...). Also I really hope you can find a way around rubygems size limit, because lack of gem installation in next versions could further increase disinterest around this project, and it would really not deserve this! Thanks again for time spent on this, hope things will be rolling better with time and new ruby's :)

monkstone commented 11 years ago

The new build is reported as working on Windows. Otherwise I would not have bothered catering for paths with spaces. No-one is supporting version 1.0.11.

illtellyoulater commented 11 years ago

right, thanks.