picrate 1.2.3-java → 2.1.0-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/Gemfile +3 -1
- data/README.md +8 -9
- data/Rakefile +10 -9
- data/bin/picrate +3 -1
- data/docs/_config.yml +1 -1
- data/docs/_editors/geany.md +1 -0
- data/docs/_gems/gems/gems.md +1 -1
- data/docs/_posts/2018-05-06-getting_started.md +4 -4
- data/docs/_posts/2018-05-06-install_jruby.md +5 -11
- data/docs/_posts/2018-05-11-arch-linux-arm.md +1 -11
- data/docs/_posts/2018-11-18-building-gem.md +2 -2
- data/docs/_posts/2018-11-27-getting_started_geany.md +4 -4
- data/docs/_posts/2019-11-11-getting_started_buster.md +4 -7
- data/docs/_posts/2020-03-09-auto_install_picrate.md +34 -0
- data/docs/_posts/2020-05-11-getting_started_manjaro.md +94 -0
- data/docs/about.md +1 -1
- data/lib/picrate.rb +1 -1
- data/lib/picrate/app.rb +11 -3
- data/lib/picrate/creators/parameters.rb +8 -8
- data/lib/picrate/creators/sketch_factory.rb +5 -3
- data/lib/picrate/helper_methods.rb +21 -21
- data/lib/picrate/helpers/numeric.rb +2 -0
- data/lib/picrate/library.rb +5 -1
- data/lib/picrate/library_loader.rb +2 -0
- data/lib/picrate/native_folder.rb +2 -1
- data/lib/picrate/native_loader.rb +3 -0
- data/lib/picrate/runner.rb +5 -2
- data/lib/picrate/version.rb +1 -1
- data/library/boids/boids.rb +17 -8
- data/library/chooser/chooser.rb +10 -9
- data/library/color_group/color_group.rb +2 -0
- data/library/control_panel/control_panel.rb +7 -4
- data/library/dxf/dxf.rb +2 -0
- data/library/library_proxy/library_proxy.rb +2 -0
- data/library/net/net.rb +2 -0
- data/library/slider/slider.rb +24 -23
- data/library/vector_utils/vector_utils.rb +4 -0
- data/library/video_event/video_event.rb +2 -0
- data/picrate.gemspec +13 -14
- data/pom.rb +28 -26
- data/pom.xml +18 -6
- data/src/main/java/monkstone/ColorUtil.java +1 -1
- data/src/main/java/monkstone/MathToolModule.java +1 -1
- data/src/main/java/monkstone/PicrateLibrary.java +8 -8
- data/src/main/java/monkstone/fastmath/Deglut.java +16 -16
- data/src/main/java/monkstone/filechooser/Chooser.java +1 -1
- data/src/main/java/monkstone/noise/SimplexNoise.java +3 -3
- data/src/main/java/monkstone/slider/CustomHorizontalSlider.java +1 -1
- data/src/main/java/monkstone/slider/CustomVerticalSlider.java +1 -1
- data/src/main/java/monkstone/slider/SimpleHorizontalSlider.java +12 -12
- data/src/main/java/monkstone/slider/SimpleVerticalSlider.java +1 -1
- data/src/main/java/monkstone/slider/SliderBar.java +1 -1
- data/src/main/java/monkstone/slider/SliderGroup.java +1 -1
- data/src/main/java/monkstone/slider/WheelHandler.java +1 -1
- data/src/main/java/monkstone/vecmath/package-info.java +1 -1
- data/src/main/java/monkstone/vecmath/vec2/Vec2.java +1 -1
- data/src/main/java/monkstone/vecmath/vec3/Vec3.java +1 -1
- data/src/main/java/monkstone/videoevent/CaptureEvent.java +1 -1
- data/src/main/java/monkstone/videoevent/MovieEvent.java +1 -1
- data/src/main/java/monkstone/videoevent/package-info.java +1 -1
- data/src/main/java/processing/awt/PGraphicsJava2D.java +33 -36
- data/src/main/java/processing/awt/PImageAWT.java +377 -0
- data/src/main/java/processing/awt/PSurfaceAWT.java +0 -20
- data/src/main/java/processing/awt/ShimAWT.java +545 -0
- data/src/main/java/processing/core/PApplet.java +699 -1523
- data/src/main/java/processing/core/PConstants.java +180 -180
- data/src/main/java/processing/core/PFont.java +2 -2
- data/src/main/java/processing/core/PGraphics.java +190 -176
- data/src/main/java/processing/core/PImage.java +1536 -1721
- data/src/main/java/processing/core/PMatrix.java +39 -39
- data/src/main/java/processing/core/PSurface.java +69 -103
- data/src/main/java/processing/core/PSurfaceNone.java +29 -0
- data/src/main/java/processing/core/PVector.java +2 -2
- data/src/main/java/processing/data/FloatDict.java +251 -284
- data/src/main/java/processing/data/TableRow.java +32 -32
- data/src/main/java/processing/dxf/RawDXF.java +3 -3
- data/src/main/java/processing/net/Client.java +1 -1
- data/src/main/java/processing/opengl/PGL.java +1016 -4132
- data/src/main/java/processing/opengl/PGraphicsOpenGL.java +223 -184
- data/src/main/java/processing/opengl/PJOGL.java +374 -1526
- data/src/main/java/processing/opengl/PShapeOpenGL.java +5 -6
- data/src/main/java/processing/opengl/PSurfaceJOGL.java +262 -147
- data/test/color_group_test.rb +4 -4
- data/test/deglut_spec_test.rb +2 -0
- data/test/helper_methods_test.rb +41 -13
- data/test/math_tool_test.rb +46 -37
- data/test/respond_to_test.rb +5 -3
- data/test/sketches/key_event.rb +2 -2
- data/test/sketches/library/my_library/my_library.rb +3 -0
- data/test/test_helper.rb +2 -0
- data/test/vecmath_spec_test.rb +30 -19
- data/vendors/Rakefile +13 -7
- data/vendors/{picrate_sketches.geany → geany.rb} +32 -7
- metadata +26 -47
- data/docs/_posts/2018-06-26-auto_install_picrate.md +0 -30
- data/src/main/java/processing/opengl/shaders/LightVert-brcm.glsl +0 -154
- data/src/main/java/processing/opengl/shaders/LightVert-vc4.glsl +0 -154
- data/src/main/java/processing/opengl/shaders/TexLightVert-brcm.glsl +0 -160
- data/src/main/java/processing/opengl/shaders/TexLightVert-vc4.glsl +0 -160
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 815b6e840309b917ad6161954369b0e9bb959ea37395f55305686aeaafda8cc0
|
4
|
+
data.tar.gz: c8f489adb6e0819610d265498baf205b458badf6306fcfa9d0c75813fb539218
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b32a35a68e3fd8c35a59f45207fc13e0548e0efd8578d4ca74c4e2910308bf7f5ea1e9ba3573b56ada55508090e2b8592f13720ce2992f31537425e22df2a6b
|
7
|
+
data.tar.gz: 016cb1f2b2afc5b32d35620eaa6854f3d3e2bf28befd7de20267db10442a534676482836ba6aa7822132755a1f6adc285dee9352d5aa640d9819232bbc3157e4
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
v2.1.0 Refactor how we configure geany so we can use ENV['HOME'] rather hard code config file. Bump to JRuby-9.2.12.0, include Sam Pottingers July 2020 staging changes.
|
2
|
+
|
3
|
+
v2.0.1 Use JOGL-2.4.0-rc fixes reflection warnings, remove geomerative and wordcram gem dependencies since can now be in step with JRubyArt and propane (re jdk compatibility), bump version for release. Removed Gottfreid Haider shaders, warn legacy driver doesn't work with P2D and P3D sketches. Support aarch64 architecture on RaspberriPI4.
|
4
|
+
|
5
|
+
v2.0.0 Use JDK11+ update to processing-3.5.4 suggest jruby-9.2.11.0
|
6
|
+
|
7
|
+
v1.2.4 Extract picrate examples to ~/projects/examples instead of ~/picrate_samples for tighter integration with geany editor. Remove non-functioning sound library as an install option (direct toward minim as option).
|
8
|
+
|
1
9
|
v1.2.3 Favor latest beta Video2 library over GLVideo.
|
2
10
|
|
3
11
|
v1.2.2 Removed landscape from example as too taxing for raspberryPI. Improved geany tools.
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,25 +1,25 @@
|
|
1
1
|
__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)
|
2
2
|
|
3
3
|
# PiCrate
|
4
|
-
|
5
|
-
|
4
|
+
New version for `Buster` on raspberryPI 3B+ works with jdk11 (reflective access warnings fixed for jdk11). Since version 2.0.1 also works on 64 bit Manjaro distro on RaspberryPI4. 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?
|
5
|
+
|
6
6
|
|
7
7
|
### To install from rubygems ###
|
8
8
|
|
9
9
|
```bash
|
10
|
-
jgem install picrate
|
10
|
+
jgem install picrate
|
11
11
|
```
|
12
12
|
|
13
13
|
### To Build and Test ###
|
14
14
|
|
15
|
-
Clone
|
15
|
+
Clone main branch:-
|
16
16
|
|
17
|
-
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
|
17
|
+
Requires java to build (and jogl-2.4.0-rc jars), 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 both RaspberryPI 3B+ and RaspberryPI4. Needs installed jruby to test/run.
|
18
18
|
|
19
19
|
```bash
|
20
|
-
cd PiCrate
|
20
|
+
cd PiCrate # or whatever you call it
|
21
21
|
rake # assumes an installed version of vanilla processing
|
22
|
-
jgem install picrate-
|
22
|
+
jgem install picrate-2.0.1-java.gem
|
23
23
|
|
24
24
|
```
|
25
25
|
To create a template sketch:-
|
@@ -55,6 +55,5 @@ MySketch.new
|
|
55
55
|
jruby --dev my_sketch.rb # --dev flag speeds start-up
|
56
56
|
```
|
57
57
|
|
58
|
-
|
58
|
+
[buster]:https://gist.github.com/monkstone/6ae9840d7b7008c177b4a9f589d14ec6
|
59
59
|
[propane]:https://ruby-processing.github.io/propane/
|
60
|
-
[oracle]:http://www.rpiblog.com/2014/03/installing-oracle-jdk-8-on-raspberry-pi.html
|
data/Rakefile
CHANGED
@@ -6,18 +6,14 @@ HOME_DIR = ENV['HOME']
|
|
6
6
|
|
7
7
|
task default: %i[init compile install test gem]
|
8
8
|
|
9
|
-
# depends on
|
9
|
+
# Currently depends on local jogl-2.4.0 jars on path ~/jogl24
|
10
10
|
desc 'Copy Jars'
|
11
11
|
task :init do
|
12
|
-
|
13
|
-
|
14
|
-
# alternative for debian linux etc
|
15
|
-
processing_root = File.join(HOME_DIR, 'processing-3.5.3')
|
16
|
-
jar_dir = File.join(processing_root, 'core', 'library')
|
17
|
-
opengl = Dir.entries(jar_dir).grep(/amd64|armv6hf/).select { |jar| jar =~ /linux/ }
|
12
|
+
jogl24 = File.join(HOME_DIR, 'jogl24')
|
13
|
+
opengl = Dir.entries(jogl24).grep(/amd64|armv6hf|aarch64/).select { |jar| jar =~ /linux/ }
|
18
14
|
opengl.concat %w[jogl-all.jar gluegen-rt.jar]
|
19
15
|
opengl.each do |gl|
|
20
|
-
FileUtils.cp(File.join(
|
16
|
+
FileUtils.cp(File.join(jogl24, gl), File.join('.', 'lib'))
|
21
17
|
end
|
22
18
|
end
|
23
19
|
|
@@ -28,7 +24,7 @@ end
|
|
28
24
|
|
29
25
|
desc 'Gem'
|
30
26
|
task :gem do
|
31
|
-
system 'gem build picrate.gemspec'
|
27
|
+
system 'jruby -S gem build picrate.gemspec'
|
32
28
|
end
|
33
29
|
|
34
30
|
desc 'Document'
|
@@ -50,6 +46,11 @@ task :test do
|
|
50
46
|
system 'jruby --dev test/vecmath_spec_test.rb'
|
51
47
|
end
|
52
48
|
|
49
|
+
desc 'JDeps Tool'
|
50
|
+
task :jdeps do
|
51
|
+
system './mvnw jdeps:jdkinternals'
|
52
|
+
end
|
53
|
+
|
53
54
|
desc 'clean'
|
54
55
|
task :clean do
|
55
56
|
Dir['./**/*.{jar,gem}'].each do |path|
|
data/bin/picrate
CHANGED
data/docs/_config.yml
CHANGED
@@ -4,7 +4,7 @@ title: PiCrate gem
|
|
4
4
|
email: mamba2928@yahoo.co.uk
|
5
5
|
description: > # this means to ignore newlines until "baseurl:"
|
6
6
|
The picrate gem is ruby implementation of processing, targetting raspberrypi and
|
7
|
-
linux
|
7
|
+
linux works on 32 bit raspbian Buster (and 64 bit Manajaro raspberryPI4).
|
8
8
|
baseurl: "" # the subpath of your site, e.g. /blog
|
9
9
|
regenerate: true
|
10
10
|
url: "https://ruby-processing.github.io/PiCrate"
|
data/docs/_editors/geany.md
CHANGED
@@ -9,6 +9,7 @@ Geany is highly configurable, and we have created a `geany` project file `picrat
|
|
9
9
|
```bash
|
10
10
|
picrate --install samples
|
11
11
|
```
|
12
|
+
Examples get installed in `~/projects/examples`, you can use `~/projects/sketchbook` to save your own sketches.
|
12
13
|
|
13
14
|
#### Using picrate.rb template ####
|
14
15
|
|
data/docs/_gems/gems/gems.md
CHANGED
@@ -18,7 +18,7 @@ NB: the arcball gem is installed as a picrate dependency
|
|
18
18
|
jbox2d ([pbox2d][jbox2d])
|
19
19
|
|
20
20
|
### Stand Alone Gems
|
21
|
-
[cf3][cf3] context free art in ruby
|
21
|
+
[cf3][cf3] context free art in ruby, examples may need a bit of hacking
|
22
22
|
|
23
23
|
[cf3]:https://github.com/monkstone/cf3ruby/
|
24
24
|
[arcball]:https://github.com/ruby-processing/ArcBall/
|
@@ -1,11 +1,11 @@
|
|
1
1
|
---
|
2
2
|
layout: post
|
3
|
-
title: "Getting Started
|
4
|
-
date:
|
3
|
+
title: "Getting Started Buster"
|
4
|
+
date: 2020-03-09 07:34:13
|
5
5
|
categories: PiCrate update
|
6
6
|
permalink: /getting/
|
7
7
|
---
|
8
|
-
Raspbian
|
8
|
+
Raspbian Buster installs OpenJDK11 (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. NB: Will not work with OpenJDK-8.
|
9
9
|
|
10
10
|
__Then install JRuby see__ [jruby][jruby].
|
11
11
|
|
@@ -27,7 +27,7 @@ __Install processing libraries__
|
|
27
27
|
|
28
28
|
```bash
|
29
29
|
picrate -i Sound
|
30
|
-
picrate -i
|
30
|
+
picrate -i video # install beta verion of vanilla video for now
|
31
31
|
```
|
32
32
|
|
33
33
|
To create a template sketch from the command line:-
|
@@ -14,7 +14,7 @@ Get the latest version from [http://jruby.org/download][download]
|
|
14
14
|
|
15
15
|
```bash
|
16
16
|
cd /opt
|
17
|
-
sudo tar xzvf /pathToDownload/jruby-bin-9.2.
|
17
|
+
sudo tar xzvf /pathToDownload/jruby-bin-9.2.11.0.tar.gz
|
18
18
|
```
|
19
19
|
|
20
20
|
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.
|
@@ -36,17 +36,11 @@ export GEM_PATH="$HOME/tux/.gem/ruby/2.5.0"
|
|
36
36
|
export PATH="${PATH}:${GEM_PATH}/bin"
|
37
37
|
```
|
38
38
|
|
39
|
-
### Automated install using
|
40
|
-
Get the `Rakefile` [here][rake_gist] however it assumes an existing ruby install (which is not needed by PiCrate).
|
39
|
+
### Automated install using bash ###
|
41
40
|
|
42
|
-
|
43
|
-
mkdir installer
|
44
|
-
cd installer
|
45
|
-
rake
|
46
|
-
```
|
47
|
-
Currently installs jruby-9.2.9.0
|
41
|
+
The [picrate2_install.sh][bash] script currently installs jruby-9.2.11.0 and picrate-2.0.pre.
|
48
42
|
|
49
43
|
If you know better please post on wiki
|
50
44
|
|
51
|
-
[download]:"https://repo1.maven.org/maven2/org/jruby/jruby-dist/9.2.
|
52
|
-
[
|
45
|
+
[download]:"https://repo1.maven.org/maven2/org/jruby/jruby-dist/9.2.11.0/jruby-dist-9.2.11.0-bin.tar.gz"
|
46
|
+
[bash]:https://gist.github.com/monkstone/6ae9840d7b7008c177b4a9f589d14ec6
|
@@ -4,14 +4,4 @@ title: "Installing JRuby on Archlinux arm"
|
|
4
4
|
date: 2018-05-24 07:34:13
|
5
5
|
categories: PiCrate update
|
6
6
|
---
|
7
|
-
|
8
|
-
|
9
|
-
```bash
|
10
|
-
sudo pacman -Syu # get up to data
|
11
|
-
sudo pacman jdk-arm # but I'm not 100% sure what version is installed jdk8+ is reqd
|
12
|
-
sudo archlinux-java set java-8-openjdk/jre # case you have more than one java installed
|
13
|
-
sudo pacman jruby # should install latest version
|
14
|
-
```
|
15
|
-
|
16
|
-
|
17
|
-
[alarm]:https://archlinuxarm.org/platforms/armv6/raspberry-pi
|
7
|
+
Might work, please let us know!!! Manjaro works OK.
|
@@ -6,9 +6,9 @@ categories: PiCrate update
|
|
6
6
|
---
|
7
7
|
Requirements:-
|
8
8
|
|
9
|
-
1.
|
9
|
+
1. Latest jogl-2.4.0-rc jars (place in ~/jogl24 folder).
|
10
10
|
|
11
|
-
2. jdk-11+ and maven
|
11
|
+
2. jdk-11+ and maven
|
12
12
|
|
13
13
|
Simply clone this distribution, then rake to build and test gem
|
14
14
|
```bash
|
@@ -5,12 +5,12 @@ date: 2018-11-27 07:34:13
|
|
5
5
|
categories: PiCrate update
|
6
6
|
permalink: /geany_ide/
|
7
7
|
---
|
8
|
-
The current version of raspbian installs jdk-
|
8
|
+
The current version of raspbian installs jdk-11 (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.
|
9
9
|
|
10
10
|
Then install JRuby see [jruby][jruby].
|
11
11
|
|
12
12
|
```bash
|
13
|
-
jgem install picrate
|
13
|
+
jgem install picrate
|
14
14
|
```
|
15
15
|
|
16
16
|
Install samples, and configure `geany` ide (for `PiCrate`)
|
@@ -31,8 +31,8 @@ picrate --install Samples
|
|
31
31
|
Install processing libraries
|
32
32
|
|
33
33
|
```bash
|
34
|
-
picrate -i Sound
|
35
|
-
picrate -i
|
34
|
+
# picrate -i Sound not currently working
|
35
|
+
picrate -i video # preferred over vanilla video for now
|
36
36
|
```
|
37
37
|
|
38
38
|
### Creating Sketches from the GeanyIDE
|
@@ -5,17 +5,14 @@ date: 2019-11-11 07:34:13
|
|
5
5
|
categories: PiCrate update
|
6
6
|
permalink: /getting_buster/
|
7
7
|
---
|
8
|
-
|
9
|
-
```bash
|
10
|
-
bash buster_install.sh
|
11
|
-
```
|
8
|
+
Raspbian Buster usually comes with a pre-installed jdk11. Before installing JRuby it is worth setting the `JAVA_HOME` environmental variable (needed to supress reflection warnings).
|
12
9
|
|
13
10
|
__Otherwise follow these instructions in order as needed:-__
|
14
11
|
|
15
12
|
```bash
|
16
13
|
sudo apt-get update # sync your local database with current release
|
17
14
|
sudo update # update to latest release
|
18
|
-
sudo apt install openjdk-
|
15
|
+
sudo apt install openjdk-11-jdk # installs latest jdk11
|
19
16
|
java -version # check installed version
|
20
17
|
```
|
21
18
|
If you have already installed a version java the java version may not match you can control the _active_ java version on Debian using `update-alternatives` as follows:-
|
@@ -46,7 +43,7 @@ Install a local version of rake:-
|
|
46
43
|
```bash
|
47
44
|
jgem install rake
|
48
45
|
```
|
49
|
-
To install picrate and its dependencies:-
|
46
|
+
To install latest picrate and its dependencies:-
|
50
47
|
|
51
48
|
```bash
|
52
49
|
jgem install picrate
|
@@ -59,7 +56,7 @@ picrate --install # no args, install samples and geany config
|
|
59
56
|
picrate -i Samples # to omit geany config
|
60
57
|
```
|
61
58
|
|
62
|
-
This installs example sketches in `~/
|
59
|
+
This installs example sketches in `~/projects/examples` and ties them into a `geany` project `examples.geany`. It should also be possible to run sketches from the `geany` ide.
|
63
60
|
|
64
61
|
To create a template sketch from the command line:-
|
65
62
|
|
@@ -0,0 +1,34 @@
|
|
1
|
+
---
|
2
|
+
layout: post
|
3
|
+
title: "Automated PiCrate Install"
|
4
|
+
date: 2020-03-09 07:34:13
|
5
|
+
categories: PiCrate update
|
6
|
+
permalink: /install_picrate/
|
7
|
+
---
|
8
|
+
|
9
|
+
For a semi-automated setup and install, download and extract [this gist](https://gist.github.com/monkstone/6ae9840d7b7008c177b4a9f589d14ec6). To keep your system clean put the file in a folder say
|
10
|
+
`~/install_picrate`
|
11
|
+
|
12
|
+
```bash
|
13
|
+
cd ~/picrate_install
|
14
|
+
bash picrate2_install.sh # to run default task
|
15
|
+
```
|
16
|
+
#### What the script does ###
|
17
|
+
1. Downloads JRuby
|
18
|
+
2. Installs JRuby to `/opt`
|
19
|
+
3. Uses `update-alternatives` to configure `jruby`, `jgem` and `jirb`
|
20
|
+
4. The script checks for `GEM_HOME`, if undefined it modifies `~/.profile` to define `GEM_HOME` and puts gem binaries on your path, at logon.
|
21
|
+
5. Installs jdk11 if required sets `JAVA_HOME`, needed to support jruby (--add-opens)
|
22
|
+
6. Creates `~/.gemrc` with `gem: no-document`
|
23
|
+
7. Creates `~/.jruby.java_opts` with `--add-opens` to suppress reflective access warnings.
|
24
|
+
8. Installs `picrate` gem
|
25
|
+
To install `picrate_samples` also configures `geanyIDE` for use with `picrate` run
|
26
|
+
`picrate --install` in a bash console
|
27
|
+
|
28
|
+
#### Note ####
|
29
|
+
`GEM_HOME`, `JAVA_HOME` and path to `gem` binaries are not available until next logon, to use immediately you could:-
|
30
|
+
|
31
|
+
```bash
|
32
|
+
source ~/.profile
|
33
|
+
```
|
34
|
+
NB: this only works in current shell, so if you want to use `geanyIDE` you should logout and logon again.
|
@@ -0,0 +1,94 @@
|
|
1
|
+
---
|
2
|
+
layout: post
|
3
|
+
title: "Getting Started Manjaro"
|
4
|
+
date: 2020-05-11 07:34:13
|
5
|
+
categories: PiCrate update
|
6
|
+
permalink: /getting_manjaro/
|
7
|
+
---
|
8
|
+
Currently Manjaro does not come with a pre-installed java. So the first step is to install a `jdk` we currently recommend installing hotspot adopt-openjdk11 from the AdoptOpenJDK project (there may be issues with distro version). Setting the JDK_HOME environment (easiest done `/etc/profile.d`) and then manually install the latest JRuby. It is probably worth creating a symbolic links to `/usr/bin/jruby` and `/usr/bin/jgem` from wherever you installed jruby eg /opt folder.
|
9
|
+
|
10
|
+
```bash
|
11
|
+
mkdir -p ~/.gem/jruby/2.5.0
|
12
|
+
```
|
13
|
+
|
14
|
+
Now set your `GEM_HOME`, `GEM_PATH` and amend your `PATH` as follows:-
|
15
|
+
|
16
|
+
```bash
|
17
|
+
echo "export GEM_HOME=\"\${HOME}/.gem/ruby/${MRI_RUBY}\"" >> ~/.bashrc
|
18
|
+
echo "export GEM_PATH=\"\${HOME}/.gem/ruby/${MRI_RUBY}\"" >> ~/.bashrc
|
19
|
+
echo "export PATH=\"\${PATH}:\${GEM_PATH}/bin\"" >> ~/.bashrc
|
20
|
+
source ~/.bashrc # to update environment without re-logging in
|
21
|
+
```
|
22
|
+
Now should be ready to install `picrate` and other gems.
|
23
|
+
Install a local version of rake:-
|
24
|
+
```bash
|
25
|
+
jgem install rake
|
26
|
+
```
|
27
|
+
To install latest picrate and its dependencies:-
|
28
|
+
|
29
|
+
```bash
|
30
|
+
jgem install picrate
|
31
|
+
```
|
32
|
+
__For a first install:-__
|
33
|
+
|
34
|
+
```bash
|
35
|
+
picrate --install # no args, install samples and geany config
|
36
|
+
# or
|
37
|
+
picrate -i Samples # to omit geany config
|
38
|
+
```
|
39
|
+
|
40
|
+
This installs example sketches in `~/projects/examples` and ties them into a `geany` project `examples.geany`. It should also be possible to run sketches from the `geany` ide. Sketches need to be run in VTE terminal on Manjaro ARM the terminal emulator, does not give access to local environment variables in the version of Geany supplied.
|
41
|
+
|
42
|
+
To create a template sketch from the command line:-
|
43
|
+
|
44
|
+
```bash
|
45
|
+
picrate -c my_sketch 600 400
|
46
|
+
```
|
47
|
+
creates file my_sketch.rb
|
48
|
+
|
49
|
+
```ruby
|
50
|
+
#!/usr/bin/env jruby
|
51
|
+
# frozen_string_literal: false
|
52
|
+
require 'picrate'
|
53
|
+
|
54
|
+
class MySketch < Processing::App
|
55
|
+
def settings
|
56
|
+
size 200, 200
|
57
|
+
end
|
58
|
+
|
59
|
+
def setup
|
60
|
+
sketch_title 'My Sketch'
|
61
|
+
end
|
62
|
+
|
63
|
+
def draw
|
64
|
+
|
65
|
+
end
|
66
|
+
end
|
67
|
+
MySketch.new
|
68
|
+
|
69
|
+
```
|
70
|
+
|
71
|
+
Edit in `vim` (at command line) or `geany` (gui), you may need to install `vim`
|
72
|
+
```bash
|
73
|
+
vim my_sketch.rb
|
74
|
+
:!jruby % # from vim runs the sketch
|
75
|
+
```
|
76
|
+
|
77
|
+
To run sketches from command line:-
|
78
|
+
|
79
|
+
```bash
|
80
|
+
jruby my_sketch.rb
|
81
|
+
```
|
82
|
+
|
83
|
+
Or even `chmod +x my_sketch.rb` to make an executable script.
|
84
|
+
|
85
|
+
See [editors][geany] geany, for how to run sketches from a gui.
|
86
|
+
|
87
|
+
### JWishy Sketch Running on RaspberryPI
|
88
|
+
|
89
|
+
![jwishy_buster]({{ site.github.url }}/assets/jwishy_buster.png)
|
90
|
+
|
91
|
+
[buster]: https://gist.github.com/monkstone/04a1272ca9274a2c7e3e1bf170877bfb
|
92
|
+
[java]:http://ruby-processing.github.io/java/raspberry/
|
93
|
+
[jruby]:{{ site.github.url }}/install_jruby/
|
94
|
+
[geany]:{{ site.github.url }}/editors/geany
|
data/docs/about.md
CHANGED
@@ -4,7 +4,7 @@ title: About
|
|
4
4
|
permalink: /about/
|
5
5
|
---
|
6
6
|
![picrate.png]({{ site.github.url }}/assets/android-chrome-192x192.png)
|
7
|
-
PiCrate is both a `library` and an `app` that allows you to create [processing][processing] sketches in ruby on the [RaspberryPI][PI] (or 64 bit linux). PiCrate is available as a gem (from [rubygems][rubygems]), it requires [JRuby][jruby] to both install and run. It does not depend on a vanilla processing install ( _cf_ JRubyArt).
|
7
|
+
PiCrate is both a `library` and an `app` that allows you to create [processing][processing] sketches in ruby on the [RaspberryPI][PI] (or 64 bit linux). PiCrate is available as a gem (from [rubygems][rubygems]), it requires [JRuby][jruby] to both install and run. It does not depend on a vanilla processing install ( _cf_ JRubyArt).Tested on raspbian Buster on RaspberryPI3B+ and RaspberryPI4, also works on Manajaro distro (64bit) on RapsberryPI4.
|
8
8
|
|
9
9
|
#### Executable ####
|
10
10
|
|