Skip to content

Commit ed4ebd7

Browse files
committed
final stretch release
1 parent 6899e66 commit ed4ebd7

19 files changed

+47
-44
lines changed

.mvn/extensions.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<extension>
44
<groupId>io.takari.polyglot</groupId>
55
<artifactId>polyglot-ruby</artifactId>
6-
<version>0.4.0
6+
<version>0.4.3
77
</version>
88
</extension>
99
</extensions>

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
v1.0.0 Final release for Raspbian Stretch and Oracle java
2+
13
v0.9.0 Remove unnecessary MacOS variations, bump examples version
24

35
v0.8.1 Refactor processing.core.PFont to remove need to load Fonts, that was a hack to support MacOS. List available fonts instead.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ jgem install picrate
1313

1414
Clone this repo:-
1515

16-
Requires maven, openjdk11+ (to build, uses `release` flag), and a jdk8 and jruby to install.
16+
Requires java to build, but uses a maven wrapper so you don't need to install maven. Suggest build/test on regular linux box, but is designed for use on RaspberryPI 3B+. Needs installed jruby to test/run.
1717

1818
```bash
1919
cd PiCrate
2020
rake # assumes an installed version of vanilla processing
21-
jgem install picrate-0.9.0-java.gem
21+
jgem install picrate-1.0.0-java.gem
2222
```
2323
To create a template sketch:-
2424
```bash

Rakefile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ task default: %i[init compile install test gem]
88
desc 'Copy Jars'
99
task :init do
1010
# for Archlinux etc
11-
processing_root = File.dirname(`readlink -f $(which processing)`)
11+
# processing_root = File.dirname(`readlink -f $(which processing)`)
1212
# alternative for debian linux etc
13-
# processing_root = File.join(HOME_DIR, 'processing-3.5.3')
13+
processing_root = File.join(HOME_DIR, 'processing-3.5.3')
1414
jar_dir = File.join(processing_root, 'core', 'library')
1515
opengl = Dir.entries(jar_dir).grep(/amd64|armv6hf/).select { |jar| jar =~ /linux/ }
1616
opengl.concat %w[jogl-all.jar gluegen-rt.jar]
@@ -31,21 +31,21 @@ end
3131

3232
desc 'Document'
3333
task :javadoc do
34-
system 'mvn javadoc:javadoc'
34+
system './mvnw javadoc:javadoc'
3535
end
3636

3737
desc 'Compile'
3838
task :compile do
39-
system 'mvn package'
39+
system './mvnw package'
4040
end
4141

4242
desc 'Test'
4343
task :test do
44-
system 'jruby test/helper_methods_test.rb'
45-
system 'jruby test/respond_to_test.rb' # Skip this test on Travis etc
46-
system 'jruby test/math_tool_test.rb'
47-
system 'jruby test/deglut_spec_test.rb'
48-
system 'jruby test/vecmath_spec_test.rb'
44+
system 'jruby --dev test/helper_methods_test.rb'
45+
system 'jruby --dev test/respond_to_test.rb' # Skip this test on Travis etc
46+
system 'jruby --dev test/math_tool_test.rb'
47+
system 'jruby --dev test/deglut_spec_test.rb'
48+
system 'jruby --dev test/vecmath_spec_test.rb'
4949
end
5050

5151
desc 'clean'

lib/picrate.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# frozen_string_literal: true
2+
23
require 'java'
34
unless defined? PICRATE_ROOT
45
$LOAD_PATH << File.dirname(__dir__)

lib/picrate/app.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# frozen_string_literal: false
22
require_relative 'helper_methods'
33
require_relative 'library_loader'
4-
require 'jruby'
54
# A wrapper module for the processing App
65
module Processing
76
include_package 'processing.core' # imports the processing jar.

lib/picrate/runner.rb

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ def initialize
1515
def self.execute
1616
runner = new
1717
runner.parse_options(ARGV)
18-
runner.execute!
18+
runner.execute
1919
end
2020

2121
# Dispatch central.
22-
def execute!
23-
show_help if options.empty?
22+
def execute
23+
parse_options('-h') if options.empty?
2424
show_version if options[:version]
2525
create if options[:create]
2626
install(filename) if options[:install]
@@ -52,7 +52,7 @@ def parse_options(args)
5252

5353
# This displays the help screen, all programs are
5454
# assumed to have this option.
55-
opts.on('-h', '--help', 'Display this screen') do
55+
opts.on_tail('-h', '--help', 'Display this screen') do
5656
puts opts
5757
exit
5858
end
@@ -76,11 +76,18 @@ def show_version
7676
puts template.result(binding)
7777
end
7878

79-
def install(library)
79+
def install(library = nil)
80+
library ||= 'new'
8081
choice = library.downcase
81-
valid = Regexp.union('samples', 'sound', 'video', 'glvideo')
82-
return warn format('No installer for %s', choice) unless valid =~ choice
83-
system "cd #{PICRATE_ROOT}/vendors && rake download_and_copy_#{choice}"
82+
case choice
83+
when /samples|sound|video/
84+
system "cd #{PICRATE_ROOT}/vendors && rake download_and_copy_#{choice}"
85+
when /new/
86+
# install samples and config geany
87+
system "cd #{PICRATE_ROOT}/vendors && rake"
88+
else
89+
warn format('No installer for %s', library)
90+
end
8491
end
8592
end # class Runner
8693
end # module Processing

lib/picrate/version.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# frozen_string_literal: true
2+
23
module PiCrate
3-
VERSION = '0.9.0'
4+
VERSION = '1.0.0'
45
end

library/color_group/color_group.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def shuffle!
1717
@colors = ColorUtil.shuffle(colors)
1818
end
1919

20-
def ruby_code
20+
def ruby_string
2121
ColorUtil.rubyString(colors)
2222
end
2323

pom.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
project 'picrate', 'http://maven.apache.org' do
22

33
model_version '4.0.0'
4-
id 'ruby-processing:picrate:0.9.0'
4+
id 'ruby-processing:picrate:1.0.0'
55
packaging 'jar'
66

77
description 'An integrated processing-core (somewhat hacked), with additional java code for a jruby version of processing.'
@@ -31,7 +31,7 @@
3131
'polyglot.dump.pom' => 'pom.xml'
3232
)
3333

34-
pom 'org.jruby:jruby:9.2.7.0'
34+
pom 'org.jruby:jruby:9.2.8.0'
3535
jar 'org.jogamp.jogl:jogl-all:${jogl.version}'
3636
jar 'org.jogamp.gluegen:gluegen-rt-main:${jogl.version}'
3737
jar 'org.processing:video:3.0.2'
@@ -40,7 +40,7 @@
4040
overrides do
4141
plugin :resources, '2.7'
4242
plugin :dependency, '2.8'
43-
plugin( :compiler, '3.8.0', 'release' => '8' )
43+
plugin( :compiler, '3.8.1', 'release' => '8' )
4444
plugin(
4545
:javadoc,
4646
'2.10.4',

0 commit comments

Comments
 (0)