Skip to content

Commit 6279969

Browse files
authored
Merge pull request #7 from ruby-processing/stretch
Stretch
2 parents ed4ebd7 + 68856df commit 6279969

24 files changed

+21414
-24033
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
v1.0.0 Final release for Raspbian Stretch and Oracle java
1+
v1.1.0 Bring up to date with latest development branch, except still target Stretch and Oracle jdk8, add Gemfile to help version locking.
2+
3+
v1.0.0 Release for Raspbian Stretch and Oracle java
24

35
v0.9.0 Remove unnecessary MacOS variations, bump examples version
46

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source 'https://rubygems.org'
2+
ruby '2.5.3', :engine => 'jruby', :engine_version => '9.2.8.0'
3+
gemspec

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
__C6H3N3O7__ [![Gem Version](https://badge.fury.io/rb/picrate.svg)](https://badge.fury.io/rb/picrate)![Travis CI](https://travis-ci.org/ruby-processing/PiCrate.svg)
22

33
# PiCrate
4+
Version for RaspberryPI `Stretch` and `Oracle JDK8`, will probably also work on `OpenJDK11+` but see `PiCrate-2.0.0` for version targetting `Buster`.
45
Create processing sketches in ruby on raspberry-pi and linux (this project is a parallel development of [propane][propane] targetting the raspberry-pi, but will initially be developed on a regular linux box). The aim is to produce a gem installable app that can be run with jruby, with minimal dependencies. Drop the `C` and you get pirate, or and an `e` and get `PiCreate`, a happy coincidence?
56

67
### To install from rubygems ###
78

89
```bash
9-
jgem install picrate
10+
jgem install picrate -v 1.1.0 # NB: important to specify version
1011
```
1112

1213
### To Build and Test ###
@@ -18,7 +19,8 @@ Requires java to build, but uses a maven wrapper so you don't need to install ma
1819
```bash
1920
cd PiCrate
2021
rake # assumes an installed version of vanilla processing
21-
jgem install picrate-1.0.0-java.gem
22+
jgem install picrate-1.1.0-java.gem
23+
2224
```
2325
To create a template sketch:-
2426
```bash
@@ -50,7 +52,7 @@ MySketch.new
5052
```
5153
### Run Sketch ###
5254
```bash
53-
jruby my_sketch.rb
55+
jruby --dev my_sketch.rb # --dev flag speeds start-up
5456
```
5557

5658

Rakefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
require_relative './lib/picrate/version'
24

35
HOME_DIR = ENV['HOME']
@@ -50,7 +52,7 @@ end
5052

5153
desc 'clean'
5254
task :clean do
53-
Dir["./**/*.{jar,gem}"].each do |path|
55+
Dir['./**/*.{jar,gem}'].each do |path|
5456
puts "Deleting #{path} ..."
5557
File.delete(path)
5658
end

docs/_posts/2018-05-06-getting_started.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,25 @@ date: 2018-05-24 07:34:13
55
categories: PiCrate update
66
permalink: /getting/
77
---
8-
The current version of raspbian installs jdk-1.8.0_65-bi17 (hard float) and that is just fine, if you have more that one version of java installed you could use `update-alternatives` tool to manage their use.
8+
Raspbian stretch installs jdk-1.8.0_65-bi17 (hard float) and that is just fine, if you have more that one version of java installed you could use `update-alternatives` tool to manage their use.
99

10-
Then install JRuby see [jruby][jruby].
10+
__Then install JRuby see__ [jruby][jruby].
1111

1212
```bash
1313
jgem install picrate
1414
```
1515

16-
Install samples, and configure `geany` ide (for `PiCrate`)
16+
__For a first install:-__
1717

1818
```bash
19-
picrate -i Samples # geany configuration files are installed if required
19+
picrate --install # no args, install samples and geany config
20+
# or
21+
picrate -i Samples # to omit geany config
2022
```
2123

22-
Install processing libraries
24+
This installs example sketches in `~/sample_sketches` and ties them into a `geany` project `picrate.geany`. It should also be possible to run sketches from the `geany` ide.
25+
26+
__Install processing libraries__
2327

2428
```bash
2529
picrate -i Sound

docs/_posts/2018-05-06-install_jruby.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ mkdir installer
1414
cd installer
1515
rake
1616
```
17-
Currently installs jruby-9.2.7.0
17+
Currently installs jruby-9.2.8.0
1818

1919
### Manual install ###
2020

@@ -25,7 +25,7 @@ Get the latest version from [http://jruby.org/download][download]
2525

2626
```bash
2727
cd /opt
28-
sudo tar xzvf /pathToDownload/jruby-bin-9.2.7.0.tar.gz
28+
sudo tar xzvf /pathToDownload/jruby-bin-9.2.8.0.tar.gz
2929
```
3030

3131
Then use the excellent `update-alternatives` tool to provide symbolic links to `jruby`, `jgem`, `jirb` and `rake` especially if you haven't installed `mri` ruby.
@@ -49,5 +49,5 @@ export PATH="${PATH}:${GEM_PATH}/bin"
4949

5050
If you know better please post on wiki
5151

52-
[download]:"https://repo1.maven.org/maven2/org/jruby/jruby-dist/9.2.7.0/jruby-dist-9.2.7.0-bin.tar.gz"
52+
[download]:"https://repo1.maven.org/maven2/org/jruby/jruby-dist/9.2.8.0/jruby-dist-9.2.8.0-bin.tar.gz"
5353
[rake_gist]:https://gist.github.com/monkstone/159c5a9813c9cd181040b4715e74f6b2

docs/_posts/2018-11-18-building-gem.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ Requirements:-
88

99
1. An installed version of vanilla processing to provide `processing.org` customised version of the `jogl` jars. The default `Rakefile` assumes root installation of processing, for debian distros you will need to adjust `processing_root` _ca. line 20_.
1010

11-
2. jdk-11 and maven (builds for jdk-8)
11+
2. jdk-11+ and maven (builds for jdk-8)
1212

1313
Simply clone this distribution, then rake to build and test gem
1414
```bash
15-
git clone https://github.com/ruby-processing/PiCrate.git
15+
git clone -b stretch --single-branch https://github.com/ruby-processing/PiCrate.git
1616
cd PiCrate
1717
rake # to build gem
1818
```

docs/_posts/2018-11-27-getting_started_geany.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@ The current version of raspbian installs jdk-1.8.0_65-bi17 (hard float) and that
1010
Then install JRuby see [jruby][jruby].
1111

1212
```bash
13-
jgem install picrate
13+
jgem install picrate -v 1.1.0
1414
```
1515

1616
Install samples, and configure `geany` ide (for `PiCrate`)
1717

1818
```bash
19-
picrate -i Samples # geany configuration files are installed if required
19+
picrate -i # geany configuration files are installed if required
20+
# or
21+
picrate --install # no args or samples without geany config
2022
```
2123

2224
Install processing libraries

docs/about.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Your PiCrate sketches need to `require` the `picrate` library, and can be run wi
2525

2626
* Gui interface, sketches can be run from [GeanyIDE][geany]
2727

28-
28+
* Use --dev flag to speed start-up
2929

3030

3131
[rubygems]:https://rubygems.org/

lib/picrate/app.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ class App < PApplet
5555
alias stroke_width stroke_weight
5656
alias rgb color
5757
alias gray color
58-
field_reader :surface
59-
6058
def sketch_class
6159
self.class.sketch_class
6260
end
@@ -79,8 +77,8 @@ def self.inherited(subclass)
7977
#
8078
class << self
8179
# Handy getters and setters on the class go here:
82-
attr_accessor :sketch_class, :library_loader, :title, :arguments, :options
83-
80+
attr_accessor :sketch_class, :library_loader, :arguments, :options
81+
attr_reader :surface
8482
def load_libraries(*args)
8583
library_loader ||= LibraryLoader.new
8684
library_loader.load_library(*args)
@@ -121,6 +119,7 @@ def initialize(options = {}, arguments = [])
121119
Processing.app = self
122120
@arguments = arguments
123121
@options = options
122+
@surface = get_surface
124123
run_picrate
125124
end
126125

0 commit comments

Comments
 (0)