-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
31 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1 @@ | ||
Certain sketches in this folder need to be run with the `--nojruby` flag, prior to JRubyArt-1.1:- | ||
|
||
`physics_type.rb` | ||
|
||
`gray_scott_image.rb` | ||
|
||
However since JRubyArt-1.1 the use of the `data_path` wrapper (provides absolute path to data folder) this should not be required. | ||
Since JRubyArt-1.1 the use of the `data_path` wrapper (provides absolute path to data folder) this should be used, or image/shader sketches will need to be run with jruby-complete (by setting `JRUBY: false` in `~/jruby_art/config.yml`). This a java permission thing... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Simple demo Rakefile to autorun samples in current directory | ||
# adjust path to rp5 executable, and or opts as required | ||
|
||
SAMPLES_DIR = './' | ||
|
||
desc 'run demo' | ||
task default: [:demo] | ||
|
||
desc 'demo' | ||
task :demo do | ||
samples_list.shuffle.each { |sample| run_sample sample } | ||
end | ||
|
||
def samples_list | ||
files = [] | ||
Dir.chdir(SAMPLES_DIR) | ||
Dir.glob('*.rb').each do |file| | ||
files << File.join(SAMPLES_DIR, file) | ||
end | ||
files | ||
end | ||
|
||
def run_sample(sample_name) | ||
puts "Running #{sample_name}...quit to run next sample" | ||
open("|k9 --run #{sample_name}", 'r') do |io| | ||
while l = io.gets | ||
puts(l.chop) | ||
end | ||
end | ||
end |