picrate 1.3.0-java → 2.1.2-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/.mvn/wrapper/MavenWrapperDownloader.java +1 -1
  3. data/CHANGELOG.md +10 -1
  4. data/Gemfile +3 -1
  5. data/README.md +9 -6
  6. data/Rakefile +8 -3
  7. data/bin/picrate +3 -1
  8. data/docs/_config.yml +1 -1
  9. data/docs/_editors/geany.md +1 -0
  10. data/docs/_gems/gems/gems.md +1 -1
  11. data/docs/_methods/alternative_methods.md +2 -1
  12. data/docs/_posts/2018-05-06-getting_started.md +4 -4
  13. data/docs/_posts/2018-05-06-install_jruby.md +5 -11
  14. data/docs/_posts/2018-05-11-arch-linux-arm.md +1 -11
  15. data/docs/_posts/2018-11-18-building-gem.md +2 -2
  16. data/docs/_posts/2018-11-27-getting_started_geany.md +1 -1
  17. data/docs/_posts/2019-11-11-getting_started_buster.md +3 -6
  18. data/docs/_posts/{2018-06-26-auto_install_picrate.md → 2020-03-09-auto_install_picrate.md} +9 -6
  19. data/docs/_posts/2020-05-11-getting_started_manjaro.md +106 -0
  20. data/docs/about.md +1 -1
  21. data/lib/picrate.rb +3 -2
  22. data/lib/picrate/app.rb +11 -3
  23. data/lib/picrate/creators/parameters.rb +8 -8
  24. data/lib/picrate/creators/sketch_factory.rb +5 -3
  25. data/lib/picrate/helper_methods.rb +22 -22
  26. data/lib/picrate/helpers/numeric.rb +2 -0
  27. data/lib/picrate/library.rb +5 -1
  28. data/lib/picrate/library_loader.rb +2 -0
  29. data/lib/picrate/native_folder.rb +2 -1
  30. data/lib/picrate/native_loader.rb +3 -0
  31. data/lib/picrate/runner.rb +5 -4
  32. data/lib/picrate/version.rb +1 -1
  33. data/library/boids/boids.rb +17 -8
  34. data/library/chooser/chooser.rb +10 -9
  35. data/library/color_group/color_group.rb +2 -0
  36. data/library/control_panel/control_panel.rb +7 -4
  37. data/library/dxf/dxf.rb +2 -0
  38. data/library/jcomplex/jcomplex.rb +1 -0
  39. data/library/library_proxy/library_proxy.rb +2 -0
  40. data/library/net/net.rb +2 -0
  41. data/library/slider/slider.rb +24 -23
  42. data/library/vector_utils/vector_utils.rb +4 -0
  43. data/library/video_event/video_event.rb +2 -0
  44. data/mvnw +2 -2
  45. data/mvnw.cmd +2 -2
  46. data/picrate.gemspec +13 -13
  47. data/pom.rb +26 -23
  48. data/pom.xml +19 -7
  49. data/src/main/java/monkstone/ColorUtil.java +1 -1
  50. data/src/main/java/monkstone/MathToolModule.java +1 -1
  51. data/src/main/java/monkstone/PicrateLibrary.java +8 -8
  52. data/src/main/java/monkstone/complex/JComplex.java +252 -0
  53. data/src/main/java/monkstone/fastmath/Deglut.java +16 -16
  54. data/src/main/java/monkstone/filechooser/Chooser.java +1 -1
  55. data/src/main/java/monkstone/noise/SimplexNoise.java +3 -3
  56. data/src/main/java/monkstone/slider/CustomHorizontalSlider.java +1 -1
  57. data/src/main/java/monkstone/slider/CustomVerticalSlider.java +1 -1
  58. data/src/main/java/monkstone/slider/SimpleHorizontalSlider.java +12 -12
  59. data/src/main/java/monkstone/slider/SimpleVerticalSlider.java +1 -1
  60. data/src/main/java/monkstone/slider/SliderBar.java +1 -1
  61. data/src/main/java/monkstone/slider/SliderGroup.java +1 -1
  62. data/src/main/java/monkstone/slider/WheelHandler.java +1 -1
  63. data/src/main/java/monkstone/vecmath/package-info.java +1 -1
  64. data/src/main/java/monkstone/vecmath/vec2/Vec2.java +1 -1
  65. data/src/main/java/monkstone/vecmath/vec3/Vec3.java +1 -1
  66. data/src/main/java/monkstone/videoevent/CaptureEvent.java +1 -1
  67. data/src/main/java/monkstone/videoevent/MovieEvent.java +1 -1
  68. data/src/main/java/monkstone/videoevent/package-info.java +1 -1
  69. data/src/main/java/processing/awt/PGraphicsJava2D.java +33 -36
  70. data/src/main/java/processing/awt/PImageAWT.java +377 -0
  71. data/src/main/java/processing/awt/PSurfaceAWT.java +0 -20
  72. data/src/main/java/processing/awt/ShimAWT.java +545 -0
  73. data/src/main/java/processing/core/PApplet.java +699 -1523
  74. data/src/main/java/processing/core/PConstants.java +180 -180
  75. data/src/main/java/processing/core/PFont.java +2 -2
  76. data/src/main/java/processing/core/PGraphics.java +190 -176
  77. data/src/main/java/processing/core/PImage.java +1536 -1721
  78. data/src/main/java/processing/core/PMatrix.java +39 -39
  79. data/src/main/java/processing/core/PSurface.java +69 -103
  80. data/src/main/java/processing/core/PSurfaceNone.java +29 -0
  81. data/src/main/java/processing/core/PVector.java +2 -2
  82. data/src/main/java/processing/data/FloatDict.java +251 -284
  83. data/src/main/java/processing/data/TableRow.java +32 -32
  84. data/src/main/java/processing/dxf/RawDXF.java +3 -3
  85. data/src/main/java/processing/net/Client.java +1 -1
  86. data/src/main/java/processing/opengl/PGL.java +1016 -4132
  87. data/src/main/java/processing/opengl/PGraphicsOpenGL.java +232 -176
  88. data/src/main/java/processing/opengl/PJOGL.java +374 -1526
  89. data/src/main/java/processing/opengl/PShapeOpenGL.java +5 -6
  90. data/src/main/java/processing/opengl/PSurfaceJOGL.java +262 -147
  91. data/test/color_group_test.rb +4 -4
  92. data/test/deglut_spec_test.rb +2 -0
  93. data/test/helper_methods_test.rb +41 -13
  94. data/test/math_tool_test.rb +46 -37
  95. data/test/respond_to_test.rb +5 -3
  96. data/test/sketches/key_event.rb +2 -2
  97. data/test/sketches/library/my_library/my_library.rb +3 -0
  98. data/test/test_helper.rb +2 -0
  99. data/test/vecmath_spec_test.rb +30 -19
  100. data/vendors/Rakefile +33 -21
  101. data/vendors/{picrate_sketches.geany → geany.rb} +32 -7
  102. metadata +27 -46
  103. data/src/main/java/processing/opengl/shaders/LightVert-brcm.glsl +0 -154
  104. data/src/main/java/processing/opengl/shaders/LightVert-vc4.glsl +0 -154
  105. data/src/main/java/processing/opengl/shaders/TexLightVert-brcm.glsl +0 -160
  106. 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: 674b5526a2444390b3230e1d751b737c6dd45b9d411956a1f2911f8c79c0bf18
4
- data.tar.gz: 178aee951ab71107cb59981a6e2edea6952a80067dccb1431879edff8eb7aa32
3
+ metadata.gz: 7e9ef3696c4eb0b3a488c7e25d30546ab03eae3a49e5220ec3d9cf4c862fddf3
4
+ data.tar.gz: 88f799089492e9507bbb09baa4e9634c335627fea27ec8adf22207cf4678de7b
5
5
  SHA512:
6
- metadata.gz: 3f78af9e8a537e7a28f0e4cd31d44457566eecfee63ad97434c6e33dd70e7b29baa824c628e0f72ba50d3f0ffc77827c70923a443417cdfc5d46b1ecc76012b5
7
- data.tar.gz: 0aae76990d4ef5a801d20f22fc177de3f4319e16e45ce426adf1bfaf6d6eb57e20287c7558fbeb2221fe8b1d3ddcb0cb11f8a60a7e535236e78d52df95a7c612
6
+ metadata.gz: 57be7c1825b5afe9fac52830070c97e04b18590d6db7d3ff099a83861e757eb7dfba02f1f9a3ad80c5e6b20c1ce73226a13be1ce3aefb3d6e66180af59d742d1
7
+ data.tar.gz: a94c876edf96da7f89939d0cb11e8ab09f74c03686c5f36eaeae90ea61c5dd44e23c9d7812d521a17215110534a722f4a20ee7c29f8dffc28a1af0b15eac21db
@@ -20,7 +20,7 @@ import java.util.Properties;
20
20
 
21
21
  public class MavenWrapperDownloader {
22
22
 
23
- private static final String WRAPPER_VERSION = "0.5.5";
23
+ private static final String WRAPPER_VERSION = "0.5.6";
24
24
  /**
25
25
  * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
26
26
  */
@@ -1,6 +1,15 @@
1
- v1.3.0 Last version for jdk8. But should run OK jdk11 with JRuby-9.2.11.0 and with included jogl-2.4.0-rc.
1
+ v2.1.2 Bump to JRuby-9.2.14.0
2
+
3
+ v2.1.1 Bump to JRuby-9.2.13.0, include examples using ruby `clamp` in place of processing `constrain`, update to video-2.0 release, add run instruction to help
4
+
5
+ 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.
6
+
7
+ 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.
8
+
9
+ v2.0.0 Use JDK11+ update to processing-3.5.4 suggest jruby-9.2.11.0
2
10
 
3
11
  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).
12
+
4
13
  v1.2.3 Favor latest beta Video2 library over GLVideo.
5
14
 
6
15
  v1.2.2 Removed landscape from example as too taxing for raspberryPI. Improved geany tools.
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
- ruby '2.5.7', :engine => 'jruby', :engine_version => '9.2.11.0'
4
+ ruby '2.5.7', engine: 'jruby', engine_version: '9.2.11.0'
3
5
  gemspec
data/README.md CHANGED
@@ -1,7 +1,8 @@
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
- Version for RaspberryPI `Stretch` and `Oracle JDK8`, will probably also work on `OpenJDK11+`. For latest version see auto-install script for [PiCrate-2.0][buster] on Buster (tested 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?
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
+
5
6
 
6
7
  ### To install from rubygems ###
7
8
 
@@ -11,21 +12,21 @@ jgem install picrate
11
12
 
12
13
  ### To Build and Test ###
13
14
 
14
- Clone this repo:-
15
+ Clone main branch:-
15
16
 
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.
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.
17
18
 
18
19
  ```bash
19
- cd PiCrate
20
+ cd PiCrate # or whatever you call it
20
21
  rake # assumes an installed version of vanilla processing
21
- jgem install picrate-1.2.4-java.gem
22
+ jgem install picrate-2.1.2-java.gem
22
23
 
23
24
  ```
24
25
  To create a template sketch:-
25
26
  ```bash
26
27
  picrate -c my_sketch 200 200
27
28
  ```
28
- Edit sketch (vim is a good choice):-
29
+ Edit sketch ([vim][vim] is a good choice, but we recommend [geany][geany]) :-
29
30
  ```ruby
30
31
  #!/usr/bin/env jruby
31
32
  # frozen_string_literal: false
@@ -56,3 +57,5 @@ jruby --dev my_sketch.rb # --dev flag speeds start-up
56
57
 
57
58
  [buster]:https://gist.github.com/monkstone/6ae9840d7b7008c177b4a9f589d14ec6
58
59
  [propane]:https://ruby-processing.github.io/propane/
60
+ [vim]:https://github.com/ruby-processing/PiCrate/blob/master/docs/_editors/vim.md
61
+ [geany]:https://github.com/ruby-processing/PiCrate/blob/master/docs/_editors/geany.md
data/Rakefile CHANGED
@@ -6,11 +6,11 @@ HOME_DIR = ENV['HOME']
6
6
 
7
7
  task default: %i[init compile install test gem]
8
8
 
9
- # depends on installed processing, with processing on path
9
+ # Currently depends on local jogl-2.4.0 jars on path ~/jogl24
10
10
  desc 'Copy Jars'
11
11
  task :init do
12
12
  jogl24 = File.join(HOME_DIR, 'jogl24')
13
- opengl = Dir.entries(jogl24).grep(/amd64|armv6hf/).select { |jar| jar =~ /linux/ }
13
+ opengl = Dir.entries(jogl24).grep(/amd64|armv6hf|aarch64/).select { |jar| jar =~ /linux/ }
14
14
  opengl.concat %w[jogl-all.jar gluegen-rt.jar]
15
15
  opengl.each do |gl|
16
16
  FileUtils.cp(File.join(jogl24, gl), File.join('.', 'lib'))
@@ -24,7 +24,7 @@ end
24
24
 
25
25
  desc 'Gem'
26
26
  task :gem do
27
- system 'gem build picrate.gemspec'
27
+ system 'jruby -S gem build picrate.gemspec'
28
28
  end
29
29
 
30
30
  desc 'Document'
@@ -46,6 +46,11 @@ task :test do
46
46
  system 'jruby --dev test/vecmath_spec_test.rb'
47
47
  end
48
48
 
49
+ desc 'JDeps Tool'
50
+ task :jdeps do
51
+ system './mvnw jdeps:jdkinternals'
52
+ end
53
+
49
54
  desc 'clean'
50
55
  task :clean do
51
56
  Dir['./**/*.{jar,gem}'].each do |path|
@@ -1,6 +1,8 @@
1
1
  #!/usr/bin/env jruby
2
+ # frozen_string_literal: true
3
+
2
4
  unless defined? PICRATE_ROOT
3
- $LOAD_PATH << File.expand_path(File.dirname(__FILE__))
5
+ $LOAD_PATH << __dir__
4
6
  PICRATE_ROOT = File.expand_path(File.dirname(__FILE__) + '/../')
5
7
  end
6
8
 
@@ -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"
@@ -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
 
@@ -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/
@@ -28,8 +28,9 @@ Here is a list of ruby alternatives to some 'processing' convenience methods; wh
28
28
  | |`second` |`t.second` |
29
29
  | |`year` |`t.year` |
30
30
  |custom math |`map(x, b0, eo, b1, e1)`|`map1d(x, (b0..e0), (b1..e1))`|
31
- | |`map(x, b0, eo, b1, e1)`|`p5map(x, b0, e0, b1, e1)`|
32
31
  | |`max(array) `|`array.max` |
32
+ | |`map(x, b0, eo, b1, e1)`|`p5map(x, b0, e0, b1, e1)`|
33
+ | |`constrain(x, lo, hi)` |`x.clamp(lo, hi)` |
33
34
  | |`min(array) `|`array.min` |
34
35
  |conversion |`degrees(theta)` |`theta.degrees` |
35
36
  |conversion |`radians(theta)` |`theta.radians` |
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  layout: post
3
- title: "Getting Started Stretch"
4
- date: 2018-05-24 07:34:13
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 Stretch installs Oracle 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. Will work with OpenJDK-11 but currently performance is sub-optimal.
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 glvideo # preferred over vanilla video for now
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.11.0.tar.gz
17
+ sudo tar xzvf /pathToDownload/jruby-bin-9.2.14.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 Rakefile ###
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
- ```bash
43
- mkdir installer
44
- cd installer
45
- rake
46
- ```
47
- Currently installs jruby-9.2.11.0
41
+ The [picrate2_install.sh][bash] script currently installs jruby-9.2.14.0 and picrate-2.1.2.
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.11.0/jruby-dist-9.2.11.0-bin.tar.gz"
52
- [rake_gist]:https://gist.github.com/monkstone/159c5a9813c9cd181040b4715e74f6b2
45
+ [download]:"https://repo1.maven.org/maven2/org/jruby/jruby-dist/9.2.14.0/jruby-dist-9.2.14.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
- It is quite likely that people wishing to experiment with PiCrate on arm have moved beyond the raspbian distribution. As a first step [archlinuxarm][alarm] which seems to be well thought out. Installing jdk8 and jruby should be as simple as:-
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. 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_.
9
+ 1. Latest jogl-2.4.0-rc jars (place in ~/jogl24 folder).
10
10
 
11
- 2. jdk-11+ and maven (builds for jdk-8)
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,7 +5,7 @@ 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-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
+ 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
 
@@ -5,17 +5,14 @@ date: 2019-11-11 07:34:13
5
5
  categories: PiCrate update
6
6
  permalink: /getting_buster/
7
7
  ---
8
- Currently Raspbian Buster does not come with a pre-installed java. So the first step is to install a `jdk` we currently recommend installing openjdk8 (_there a complications you don't need using jdk11_) to benefit from `client` optimisations. There is a bash script [here][buster], that will install `openjdk8`, `jruby-9.2.11.0` and picrate for you.
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-8-jdk # installs latest jdk8
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
@@ -1,28 +1,31 @@
1
1
  ---
2
2
  layout: post
3
3
  title: "Automated PiCrate Install"
4
- date: 2018-06-26 07:34:13
4
+ date: 2020-03-09 07:34:13
5
5
  categories: PiCrate update
6
6
  permalink: /install_picrate/
7
7
  ---
8
8
 
9
- For a semi-automated setup and install, download and extract [this gist](https://gist.github.com/monkstone/e9df8ea776aed58ce1c4de8e12982aad). To keep your system clean put the file in a folder say
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
10
  `~/install_picrate`
11
11
 
12
12
  ```bash
13
13
  cd ~/picrate_install
14
- bash picrate_install.sh # to run default task
14
+ bash picrate2_install.sh # to run default task
15
15
  ```
16
16
  #### What the script does ###
17
17
  1. Downloads JRuby
18
18
  2. Installs JRuby to `/opt`
19
19
  3. Uses `update-alternatives` to configure `jruby`, `jgem` and `jirb`
20
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 `picrate` gem
22
- 6. Downloads and installs `picrate_samples` also configures `geanyIDE` for use with `picrate`
21
+ 5. Installs jdk11 if required sets `JAVA_HOME`, needed to support jruby
22
+ 6. Creates `~/.gemrc` with `gem: no-document`
23
+ 7. Installs `picrate` gem
24
+ To install `picrate_samples` also configures `geanyIDE` for use with `picrate` run
25
+ `picrate --install` in a bash console
23
26
 
24
27
  #### Note ####
25
- `GEM_HOME` and path to `gem` binaries is not available until next logon, to use immediately you could:-
28
+ `GEM_HOME`, `JAVA_HOME` and path to `gem` binaries are not available until next logon, to use immediately you could:-
26
29
 
27
30
  ```bash
28
31
  source ~/.profile
@@ -0,0 +1,106 @@
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
+ If Manjaro does not come with a pre-installed java, then the first step is to install a `jdk` the distro version (jdk14) should work.
9
+
10
+ ```bash
11
+ sudo pacman -S jdk-openjdk # current distro version jdk14
12
+ ```
13
+ You can also use pacman to install jruby
14
+ ```bash
15
+ sudo pacman -S jruby # current version jruby-9.2.14.0
16
+ ```
17
+ It is probably a good idea to create a local gem store (rather needing to use sudo to install gems)
18
+
19
+ ```bash
20
+ mkdir -p ~/.gem/ruby/2.5.0 # current MRI version supported by jruby
21
+ ```
22
+ Now set your `GEM_HOME`, `GEM_PATH` and amend your `PATH` as follows:-
23
+
24
+ ```bash
25
+ echo "export GEM_HOME=\"\${HOME}/.gem/ruby/${MRI_RUBY}\"" >> ~/.bashrc
26
+ echo "export GEM_PATH=\"\${HOME}/.gem/ruby/${MRI_RUBY}\"" >> ~/.bashrc
27
+ echo "export PATH=\"\${PATH}:\${GEM_PATH}/bin\"" >> ~/.bashrc
28
+ source ~/.bashrc # to update environment without re-logging in
29
+ ```
30
+ Now should be ready to install `picrate` and other gems. But speed up install time you should set `--no-document` option in ~/.gemrc
31
+
32
+ ```bash
33
+ touch ~/.gemrc
34
+ echo "gem: --no-document" > ~/.gemrc
35
+ ```
36
+ To install latest picrate and its dependencies:-
37
+
38
+ ```bash
39
+ jgem install picrate
40
+ ```
41
+
42
+ Geany is a good editor/ide for PiCrate on the RaspberryPI (install via pacman), but some may prefer vim. For geany you should edit/preferences/Terminal to `Execute programs in the VTE`.
43
+
44
+ __For a first install:-__
45
+
46
+ ```bash
47
+ picrate --install # no args, install samples and geany config
48
+ # or
49
+ picrate -i Samples # to omit geany config
50
+ ```
51
+
52
+ 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. The geany config creates `picrate.rb` template sketch so you can create a new sketch with template.
53
+
54
+ To create a template sketch from the command line:-
55
+
56
+ ```bash
57
+ picrate -c my_sketch 600 400
58
+ ```
59
+ creates file my_sketch.rb
60
+
61
+ ```ruby
62
+ #!/usr/bin/env jruby
63
+ # frozen_string_literal: false
64
+ require 'picrate'
65
+
66
+ class MySketch < Processing::App
67
+ def settings
68
+ size 200, 200
69
+ end
70
+
71
+ def setup
72
+ sketch_title 'My Sketch'
73
+ end
74
+
75
+ def draw
76
+
77
+ end
78
+ end
79
+ MySketch.new
80
+
81
+ ```
82
+
83
+ Edit in `vim` (at command line) or `geany` (gui), you may need to install `vim`
84
+ ```bash
85
+ vim my_sketch.rb
86
+ :!jruby % # from vim runs the sketch
87
+ ```
88
+
89
+ To run sketches from command line:-
90
+
91
+ ```bash
92
+ jruby --dev my_sketch.rb
93
+ ```
94
+
95
+ Or even `chmod +x my_sketch.rb` to make an executable script.
96
+
97
+ See [editors][geany] geany, for how to run sketches from a gui.
98
+
99
+ ### JWishy Sketch Running on RaspberryPI
100
+
101
+ ![jwishy_buster]({{ site.github.url }}/assets/jwishy_buster.png)
102
+
103
+ [buster]: https://gist.github.com/monkstone/04a1272ca9274a2c7e3e1bf170877bfb
104
+ [java]:http://ruby-processing.github.io/java/raspberry/
105
+ [jruby]:{{ site.github.url }}/install_jruby/
106
+ [geany]:{{ site.github.url }}/editors/geany
@@ -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