- Shader sketches still refuse to run.
- We would lose export.
- We would lose ability to install to system without requiring an installed jruby.
For me 1. is the biggest problem, any exported sketches will probably still be unable to use gems, also installing without jruby also means no access to gems.
See this gist for work in progress https://gist.github.com/monkstone/6172815. I propose to work on this independently on my monkstone branch will need updating from master.
Motivation we could potentially use rubygems with P2D and P3D modes (even PImage sketches could not be run with rubygems). If we radically exclude jruby-complete until export gem would be much smaller.
Well it seem possible solution is to put jruby-complete.jar in its own directory, and possibly use:-
RUBY_PLATFORM == 'java'
So the solution is:-
Move ruby-complete.jar to its own folder (so we no-longer 'require jruby-complete.jar' in app.rb)
Dir["#{RP5_ROOT}/lib/core/\*.jar"].each { |jar| require jar }
Consequently we need to adjust the path jruby-complete.jar. And in the first place make sure we extract it to its new location easy. Seems to work, we retain the --jruby flag, which should be default unless we haven't installed jruby or we want to run shader sketches.
However it occurs to me this is the ideal opportunity to set using an external jruby as the default. Now all we need is a flag "--nojruby" for when we need/prefer to use the included jruby-complete (which will remain handy to support export of applications). The shader sketches are the only ones now requiring such a flag. However it will also be required if ruby-processing gets installed without using system jruby (in this case you won't be able to use gems with ruby-processing).
Well I've done it now since version 2.1.2 the default is to run ruby-processing from an external jruby, to revert to using installed jruby-complete now use the --nojruby flag (replaces the --jruby flag which had the opposite effect).
Well it seem possible solution is to put jruby-complete.jar in its own directory, and possibly use:-
RUBY_PLATFORM == 'java'
So the solution is:-
Move ruby-complete.jar to its own folder (so we no-longer 'require jruby-complete.jar' in app.rb)
Dir["#{RP5_ROOT}/lib/core/\*.jar"].each { |jar| require jar }
Consequently we need to adjust the path jruby-complete.jar. And in the first place make sure we extract it to its new location easy. Seems to work, we retain the --jruby flag, which should be default unless we haven't installed jruby or we want to run shader sketches.
However it occurs to me this is the ideal opportunity to set using an external jruby as the default. Now all we need is a flag "--nojruby" for when we need/prefer to use the included jruby-complete (which will remain handy to support export of applications). The shader sketches are the only ones now requiring such a flag. However it will also be required if ruby-processing gets installed without using system jruby (in this case you won't be able to use gems with ruby-processing).
Well I've done it now since version 2.1.2 the default is to run ruby-processing from an external jruby, to revert to using installed jruby-complete now use the --nojruby flag (replaces the --jruby flag which had the opposite effect).
No comments:
Post a Comment