picrate 1.2.4-java → 2.1.1-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/Gemfile +3 -1
  4. data/README.md +11 -10
  5. data/Rakefile +10 -9
  6. data/bin/picrate +3 -1
  7. data/docs/_config.yml +1 -1
  8. data/docs/_editors/geany.md +1 -0
  9. data/docs/_gems/gems/gems.md +1 -1
  10. data/docs/_methods/alternative_methods.md +2 -1
  11. data/docs/_posts/2018-05-06-getting_started.md +4 -4
  12. data/docs/_posts/2018-05-06-install_jruby.md +5 -11
  13. data/docs/_posts/2018-05-11-arch-linux-arm.md +1 -11
  14. data/docs/_posts/2018-11-18-building-gem.md +2 -2
  15. data/docs/_posts/2018-11-27-getting_started_geany.md +1 -1
  16. data/docs/_posts/2019-11-11-getting_started_buster.md +4 -7
  17. data/docs/_posts/{2018-06-26-auto_install_picrate.md → 2020-03-09-auto_install_picrate.md} +9 -6
  18. data/docs/_posts/2020-05-11-getting_started_manjaro.md +94 -0
  19. data/docs/about.md +1 -1
  20. data/lib/picrate.rb +1 -1
  21. data/lib/picrate/app.rb +11 -3
  22. data/lib/picrate/creators/parameters.rb +8 -8
  23. data/lib/picrate/creators/sketch_factory.rb +5 -3
  24. data/lib/picrate/helper_methods.rb +21 -21
  25. data/lib/picrate/helpers/numeric.rb +2 -0
  26. data/lib/picrate/library.rb +5 -1
  27. data/lib/picrate/library_loader.rb +2 -0
  28. data/lib/picrate/native_folder.rb +2 -1
  29. data/lib/picrate/native_loader.rb +3 -0
  30. data/lib/picrate/runner.rb +1 -0
  31. data/lib/picrate/version.rb +1 -1
  32. data/library/boids/boids.rb +17 -8
  33. data/library/chooser/chooser.rb +10 -9
  34. data/library/color_group/color_group.rb +2 -0
  35. data/library/control_panel/control_panel.rb +7 -4
  36. data/library/dxf/dxf.rb +2 -0
  37. data/library/library_proxy/library_proxy.rb +2 -0
  38. data/library/net/net.rb +2 -0
  39. data/library/slider/slider.rb +24 -23
  40. data/library/vector_utils/vector_utils.rb +4 -0
  41. data/library/video_event/video_event.rb +2 -0
  42. data/picrate.gemspec +13 -14
  43. data/pom.rb +28 -26
  44. data/pom.xml +18 -6
  45. data/src/main/java/monkstone/ColorUtil.java +1 -1
  46. data/src/main/java/monkstone/MathToolModule.java +1 -1
  47. data/src/main/java/monkstone/PicrateLibrary.java +8 -8
  48. data/src/main/java/monkstone/fastmath/Deglut.java +16 -16
  49. data/src/main/java/monkstone/filechooser/Chooser.java +1 -1
  50. data/src/main/java/monkstone/noise/SimplexNoise.java +3 -3
  51. data/src/main/java/monkstone/slider/CustomHorizontalSlider.java +1 -1
  52. data/src/main/java/monkstone/slider/CustomVerticalSlider.java +1 -1
  53. data/src/main/java/monkstone/slider/SimpleHorizontalSlider.java +12 -12
  54. data/src/main/java/monkstone/slider/SimpleVerticalSlider.java +1 -1
  55. data/src/main/java/monkstone/slider/SliderBar.java +1 -1
  56. data/src/main/java/monkstone/slider/SliderGroup.java +1 -1
  57. data/src/main/java/monkstone/slider/WheelHandler.java +1 -1
  58. data/src/main/java/monkstone/vecmath/package-info.java +1 -1
  59. data/src/main/java/monkstone/vecmath/vec2/Vec2.java +1 -1
  60. data/src/main/java/monkstone/vecmath/vec3/Vec3.java +1 -1
  61. data/src/main/java/monkstone/videoevent/CaptureEvent.java +1 -1
  62. data/src/main/java/monkstone/videoevent/MovieEvent.java +1 -1
  63. data/src/main/java/monkstone/videoevent/package-info.java +1 -1
  64. data/src/main/java/processing/awt/PGraphicsJava2D.java +33 -36
  65. data/src/main/java/processing/awt/PImageAWT.java +377 -0
  66. data/src/main/java/processing/awt/PSurfaceAWT.java +0 -20
  67. data/src/main/java/processing/awt/ShimAWT.java +545 -0
  68. data/src/main/java/processing/core/PApplet.java +699 -1523
  69. data/src/main/java/processing/core/PConstants.java +180 -180
  70. data/src/main/java/processing/core/PFont.java +2 -2
  71. data/src/main/java/processing/core/PGraphics.java +190 -176
  72. data/src/main/java/processing/core/PImage.java +1536 -1721
  73. data/src/main/java/processing/core/PMatrix.java +39 -39
  74. data/src/main/java/processing/core/PSurface.java +69 -103
  75. data/src/main/java/processing/core/PSurfaceNone.java +29 -0
  76. data/src/main/java/processing/core/PVector.java +2 -2
  77. data/src/main/java/processing/data/FloatDict.java +251 -284
  78. data/src/main/java/processing/data/TableRow.java +32 -32
  79. data/src/main/java/processing/dxf/RawDXF.java +3 -3
  80. data/src/main/java/processing/net/Client.java +1 -1
  81. data/src/main/java/processing/opengl/PGL.java +1016 -4132
  82. data/src/main/java/processing/opengl/PGraphicsOpenGL.java +223 -184
  83. data/src/main/java/processing/opengl/PJOGL.java +374 -1526
  84. data/src/main/java/processing/opengl/PShapeOpenGL.java +5 -6
  85. data/src/main/java/processing/opengl/PSurfaceJOGL.java +262 -147
  86. data/test/color_group_test.rb +4 -4
  87. data/test/deglut_spec_test.rb +2 -0
  88. data/test/helper_methods_test.rb +41 -13
  89. data/test/math_tool_test.rb +46 -37
  90. data/test/respond_to_test.rb +5 -3
  91. data/test/sketches/key_event.rb +2 -2
  92. data/test/sketches/library/my_library/my_library.rb +3 -0
  93. data/test/test_helper.rb +2 -0
  94. data/test/vecmath_spec_test.rb +30 -19
  95. data/vendors/Rakefile +8 -5
  96. data/vendors/{picrate_sketches.geany → geany.rb} +32 -7
  97. metadata +25 -46
  98. data/src/main/java/processing/opengl/shaders/LightVert-brcm.glsl +0 -154
  99. data/src/main/java/processing/opengl/shaders/LightVert-vc4.glsl +0 -154
  100. data/src/main/java/processing/opengl/shaders/TexLightVert-brcm.glsl +0 -160
  101. 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: 1ac2e940ede1e29f5b6d6e4856b945d7302487aee87dea6229c68470a32e41c4
4
- data.tar.gz: f000acd2d65cf8bea16754c2474ff48c9b22ce62a9c06637de2b64820aa166e3
3
+ metadata.gz: d75664876e56bfb68eb317371315aa6eb989d714f0ca9421c997fded6013f92e
4
+ data.tar.gz: 0ed6af00f023c0d5d447cdf19e94001343f64b335e28b0037029368aed84705a
5
5
  SHA512:
6
- metadata.gz: eed56464f6ebb5dab6881872de1bfff120cea520babe3cf3d559ec2698d018b1d5b73e914950d215cdcb2e1f28a6cc6ca28fbb94f64e19e78c6b851aa53a0f66
7
- data.tar.gz: 69c364b81095fe15803b1ab5020d1a116858edc1f0dfb7732bc9c157634f2bdf2f7b42bfccb10fd8c35855d68aeb822cc795ad9d2aac67544e43f542a72e276c
6
+ metadata.gz: 6369280804b285a714f9fb8cb9dac9dd70cb46d0b6d0aa66a9e3dc63d06cf3425be9cb0bf1143f5ed81f2e4823790ddba517eeb2ab852567f5f1eded80471e96
7
+ data.tar.gz: ace654cbd577df5fab79afcddafbb67a1c19aca7beb4c19fec8a3db01bf06bc308ba35107febb9122d320ff3bb7b6779ecdd1885089b9dde196825f6802fe0cf
@@ -1,3 +1,11 @@
1
+ v2.1.1 Bump to JRuby-9.2.13.0, include examples using ruby `clamp` in place of processing `constrain`.
2
+
3
+ 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.
4
+
5
+ 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.
6
+
7
+ v2.0.0 Use JDK11+ update to processing-3.5.4 suggest jruby-9.2.11.0
8
+
1
9
  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).
2
10
 
3
11
  v1.2.3 Favor latest beta Video2 library over GLVideo.
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.9.0'
4
+ ruby '2.5.7', engine: 'jruby', engine_version: '9.2.11.0'
3
5
  gemspec
data/README.md CHANGED
@@ -1,32 +1,32 @@
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+` but see `PiCrate-2.0.0` for version targetting `Buster`.
5
- 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
+
6
6
 
7
7
  ### To install from rubygems ###
8
8
 
9
9
  ```bash
10
- jgem install picrate -v 1.2.3
10
+ jgem install picrate
11
11
  ```
12
12
 
13
13
  ### To Build and Test ###
14
14
 
15
- Clone this repo:-
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+. 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.
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-1.2.3-java.gem
22
+ jgem install picrate-2.1.1-java.gem
23
23
 
24
24
  ```
25
25
  To create a template sketch:-
26
26
  ```bash
27
27
  picrate -c my_sketch 200 200
28
28
  ```
29
- Edit sketch (vim is a good choice):-
29
+ Edit sketch ([vim][vim] is a good choice, but we recommend [geany][geany]) :-
30
30
  ```ruby
31
31
  #!/usr/bin/env jruby
32
32
  # frozen_string_literal: false
@@ -55,6 +55,7 @@ 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
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,18 +6,14 @@ 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
- # for Archlinux etc
13
- # processing_root = File.dirname(`readlink -f $(which processing)`)
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(jar_dir, gl), File.join('.', 'lib'))
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|
@@ -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.9.0.tar.gz
17
+ sudo tar xzvf /pathToDownload/jruby-bin-9.2.13.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.9.0
41
+ The [picrate2_install.sh][bash] script currently installs jruby-9.2.13.0 and picrate-2.1.1.
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.9.0/jruby-dist-9.2.9.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.13.0/jruby-dist-9.2.13.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.9.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
@@ -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 `~/sample_sketches` and ties them into a `geany` project `picrate.geany`. It should also be possible to run sketches from the `geany` ide.
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
 
@@ -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,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` the distro version (jdk14) should work. 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/ruby/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
@@ -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