Skip to content

Commit 586af74

Browse files
committed
dodgy local root replaced with K9_ROOT
1 parent 75ae2c4 commit 586af74

4 files changed

Lines changed: 9 additions & 7 deletions

File tree

lib/jruby_art/command.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ def initialize(runner:, args:, filename:)
2020
def cmd(root)
2121
cmda = jruby_command(Processing::RP_CONFIG.fetch('JRUBY', true), root)
2222
begin
23+
puts *cmda
2324
exec(*cmda)
2425
# exec replaces the Ruby process with the JRuby one.
2526
rescue Java::JavaLang::ClassNotFoundException
@@ -30,9 +31,10 @@ def cmd(root)
3031

3132
# avoiding multiline ternary etc
3233
def jruby_command(installed, root)
33-
opts = JRubyOpts.new(root).opts
34-
return ['jruby', opts, runner, filename, args].flatten if installed
35-
['java', opts, '-cp', JRubyComplete.complete, 'org.jruby.Main', runner, filename, args].flatten
34+
return ['jruby', JRubyOpts.new(root).opts, runner, filename, args].flatten if installed
35+
opts = JavaOpts.new(root).opts
36+
complete = JRubyComplete.complete
37+
['java', opts, '-cp', complete, 'org.jruby.Main', runner, filename, args].flatten
3638
end
3739
end
3840
end

lib/jruby_art/installer.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def set_processing_root
2323
path = File.join(folder, 'config.yml')
2424
proot = "#{home}/processing-#{VERSION}"
2525
proot = "/Java/Processing-#{VERSION}" if os == :windows
26-
proot = '/Applications/Processing.app/Contents/Java' if os == :mac
26+
proot = "/Applications/Processing.app/Contents/Java" if os == :mac
2727
settings = %w(PROCESSING_ROOT JRUBY sketchbook_path template MAX_WATCH)
2828
values = [proot, true, sketch, 'bare', 32]
2929
data = settings.zip(values).to_h
@@ -84,7 +84,7 @@ def install
8484
end
8585

8686
# JRuby-Complete installer
87-
class JRubyComplete < Installer
87+
class JRubyCompleteInstall < Installer
8888
def install
8989
system "cd #{gem_root}/vendors && rake"
9090
return if root_exist?

lib/jruby_art/jruby_complete.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22
class JRubyComplete
33
def self.complete
4-
rcomplete = File.join('/home/tux/JRubyArt', 'lib/ruby/jruby-complete.jar')
4+
rcomplete = File.join(K9_ROOT, 'lib/ruby/jruby-complete.jar')
55
return [rcomplete] if FileTest.exist?(rcomplete)
66
warn "#{rcomplete} does not exist\nTry running `k9 --install`"
77
exit

lib/jruby_art/runner.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def watch_sketch
136136

137137
def install
138138
require_relative '../jruby_art/installer'
139-
JRubyComplete.new(K9_ROOT, host_os).install
139+
JRubyCompleteInstall.new(K9_ROOT, host_os).install
140140
UnpackSamples.new(K9_ROOT, host_os).install
141141
end
142142

0 commit comments

Comments
 (0)