propane 3.0.1.pre-java → 3.1.0.pre-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9ef3d3bb06db328b5edfdb66a77c63c7698ffd06bf77d94a0f0efb313d6e030a
4
- data.tar.gz: ec99108177b6771d29881b4962754026b7567b33b259b6c9eaa90719589ef04d
3
+ metadata.gz: d30b5c711105c3e4795739b48211591d221039464e60a9e1f545c7d43bcd0294
4
+ data.tar.gz: 7cced24e7cc4e1dc831837f8d263c8211f09dd2e265bf7d46a8362704d577ce8
5
5
  SHA512:
6
- metadata.gz: 939d9b0ad433e0abc8857fc703f8d769298cc392373f5a2af3e75474e6cb19f969cc7d5fe401820a2f9cb6ff4be8a6c1cdc2b208c63e5b03b8ba140d111f55c1
7
- data.tar.gz: 0f0bd83c83a6dc5450e9d24f9097aa90816ffebd731fe5c1f75f0286951960777aeac4df1087134c2c620846aa4ec311f990717cc7821745273ecadc7cc73696
6
+ metadata.gz: e3e297a0d7a8ce24c5543bb83eb69146be511d808fd6e6a2e2bbaf0dc84ed60cbde754b6b40c09c5354210d88a999da386f61165bdbeb91554817546b6516af6
7
+ data.tar.gz: 895be9e7ce50d9bba9d2433cc457265faaa3690199ea88815c52cb87c09fc7f1a17f86661defff1a1a41d3f76e81c01f7c9daead46dcdc8dac1a47943ea6a1a1
data/CHANGELOG.md CHANGED
@@ -1,4 +1,6 @@
1
- **v3.0.1.pre** Bump jriuby version
1
+ **v3.1.0.pre** Now is the time for some serious refactoring for jdk11. Hell we might even get in working on MacOS and Windows, ahead of vanilla processing. For MacOS this means ditching apple.jar dependency.
2
+
3
+ **v3.0.1.pre** Bump jruby version
2
4
 
3
5
  **v3.0.0.pre** Compiled for java 11, works on linux, requires testing on MacOS and Windows
4
6
 
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Propane
2
- To build custom core see [processing-core][processing-core]
2
+
3
+ Here is my attempt to get a version of ruby-processing working with openjdk11, it imore than a proof of concept, as it already works very succesfully under linux the question is will it work under Windows and MacOS. To do this I have created a custom maven build of processing core, to which I add vanilla processing jogl jars (these are not the same as jogl jars form maven).
4
+ I am watching with interest progress made by @sampottinger on [vanilla processing][vanilla]. I have implemented a different solution for think different than @ssilverman in my jdk11 branch (but I don't know whether it works).
3
5
 
4
6
  A slim layer to communicate with Processing from JRuby, features a polyglot maven build. We have created a configuration free version of ruby processing, for processing-3.4, where we include a modified processing core (`public runPropane()` to replace `protected runSketch()`. These jars are small enough to include in a gem distribution, and hence we do not require configuration. This has created a scriptable version, ie files get run direct from jruby, but you could use jruby-complete if you used the propane script (avoids need to give the absolute data path for the data folder, but would also be needed for a watch mode). See guide to [building ruby-processing projects][building]. NB: this is a far from perfect solution and javafx sketches and possibly a few others will not run with jdk11, but a least I get to diagnose those errors too.
5
7
 
@@ -8,9 +10,8 @@ adjust above for your OS/distro setup.
8
10
  ## Requirements
9
11
 
10
12
  - `jdk-11.0.1`
11
- - `jruby-9.2.4.0`
13
+ - `jruby-9.2.5.0`
12
14
  - `mvn-3.5.4+`
13
- - `apple.jar` (_build only_) see (or may'be runtime as well a MacOS user needed to test) [vanilla-processing](https://github.com/processing/processing/blob/master/core/apple.jar)
14
15
 
15
16
  ## Building and testing
16
17
 
@@ -23,10 +24,10 @@ rake javadoc
23
24
  ## Installation
24
25
  ```bash
25
26
  jgem install --pre propane # from rubygems
26
- jgem install propane-3.0.1.pre-java.gem # local install requires a custom processing-core
27
+ jgem install propane-3.1.0.pre-java.gem # local install requires a custom processing-core
27
28
  # Alternative
28
29
  jruby -S gem install --pre propane # from rubygems
29
- jruby -S gem install propane-3.0.1.pre-java.gem # local install requires a custom processing-core
30
+ jruby -S gem install propane-3.1.0.pre-java.gem # local install requires a custom processing-core
30
31
  ```
31
32
 
32
33
  ## Usage
@@ -84,4 +85,5 @@ propane --install samples
84
85
 
85
86
  [building]:http://ruby-processing.github.io/building/building/
86
87
  [gh-pages]:https://ruby-processing.github.io/propane/
87
- [processing-core]:https://github.com/ruby-processing/processing-core
88
+ [vanilla]:https://github.com/processing/processing/pull/5753
89
+ https://github.com/processing/processing/pull/5747
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Propane
3
- VERSION = '3.0.1.pre'.freeze
3
+ VERSION = '3.1.0.pre'.freeze
4
4
  end
data/pom.xml CHANGED
@@ -4,7 +4,7 @@
4
4
  <modelVersion>4.0.0</modelVersion>
5
5
  <groupId>propane</groupId>
6
6
  <artifactId>propane</artifactId>
7
- <version>3.0.1</version>
7
+ <version>3.1.0</version>
8
8
  <name>propane</name>
9
9
  <description>An integrated processing-core (somewhat hacked), with additional java code for a jruby version of processing.</description>
10
10
  <url>https://github.com/monkstone/propane</url>
@@ -69,19 +69,16 @@
69
69
  <project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
70
70
  <propane.basedir>${project.basedir}</propane.basedir>
71
71
  <source.directory>src</source.directory>
72
+ <maven.compiler.source>11</maven.compiler.source>
73
+ <maven.compiler.target>11</maven.compiler.target>
72
74
  </properties>
73
75
  <dependencies>
74
76
  <dependency>
75
77
  <groupId>org.jruby</groupId>
76
78
  <artifactId>jruby</artifactId>
77
- <version>9.2.4.0</version>
79
+ <version>9.2.5.0</version>
78
80
  <type>pom</type>
79
81
  </dependency>
80
- <dependency>
81
- <groupId>com.apple.eawt</groupId>
82
- <artifactId>apple</artifactId>
83
- <version>1.0</version>
84
- </dependency>
85
82
  <dependency>
86
83
  <groupId>org.processing</groupId>
87
84
  <artifactId>video</artifactId>
@@ -133,8 +130,8 @@
133
130
  <artifactId>maven-compiler-plugin</artifactId>
134
131
  <version>3.8.0</version>
135
132
  <configuration>
136
- <release>11</release>
137
- </configuration>
133
+ <release>11</release>
134
+ </configuration>
138
135
  </plugin>
139
136
  <plugin>
140
137
  <artifactId>maven-javadoc-plugin</artifactId>
data/propane.gemspec CHANGED
@@ -10,13 +10,12 @@ Gem::Specification.new do |gem|
10
10
  gem.email = ['mamba2928@yahoo.co.uk']
11
11
  gem.licenses = %w(GPL-3.0 LGPL-2.0)
12
12
  gem.description = <<-EOS
13
- A batteries included version of processing in ruby.
13
+ A batteries included version of processing in ruby targetting jdk11.
14
14
  EOS
15
15
  gem.summary = %q{ruby wrapper for processing-3.4 on MacOS, linux and windows (64bit only)}
16
16
  gem.homepage = 'https://ruby-processing.github.io/propane/'
17
17
  gem.files = `git ls-files`.split($/)
18
- gem.files << 'lib/propane-3.0.1.jar'
19
- gem.files << 'lib/apple.jar'
18
+ gem.files << 'lib/propane-3.1.0.jar'
20
19
  gem.files << 'lib/gluegen-rt.jar'
21
20
  gem.files << 'lib/jogl-all.jar'
22
21
  gem.files << 'lib/gluegen-rt-natives-linux-amd64.jar'
@@ -23,74 +23,48 @@
23
23
  package processing.core;
24
24
 
25
25
  import java.awt.Image;
26
+ import java.awt.Taskbar;
27
+ import java.awt.Desktop;
28
+ import java.awt.desktop.QuitResponse;
29
+ import java.awt.desktop.QuitEvent;
26
30
 
27
- import com.apple.eawt.AppEvent.QuitEvent;
28
- import com.apple.eawt.Application;
29
- import com.apple.eawt.QuitHandler;
30
- import com.apple.eawt.QuitResponse;
31
31
 
32
-
33
- /**
34
- * Deal with issues related to thinking differently.
35
- *
36
- * We have to register a quit handler to safely shut down the sketch,
37
- * otherwise OS X will just kill the sketch when a user hits Cmd-Q.
38
- * In addition, we have a method to set the dock icon image so we look more
39
- * like a native application.
40
- *
41
- * This is a stripped-down version of what's in processing.app.platform to fix
42
- * <a href="https://github.com/processing/processing/issues/3301">3301</a>.
43
- */
44
32
  public class ThinkDifferent {
45
33
 
46
- // http://developer.apple.com/documentation/Java/Reference/1.4.2/appledoc/api/com/apple/eawt/Application.html
47
- private static Application application;
48
-
49
- // True if user has tried to quit once. Prevents us from canceling the quit
50
- // call if the sketch is held up for some reason, like an exception that's
51
- // managed to put the sketch in a bad state.
34
+ private static Desktop desktop;
35
+ private static Taskbar taskbar;
52
36
  static boolean attemptedQuit;
53
37
 
54
38
 
55
39
  static public void init(final PApplet sketch) {
56
- if (application == null) {
57
- application = Application.getApplication();
40
+ if (taskbar == null) {
41
+ taskbar = Taskbar.getTaskbar();
42
+ }
43
+ if (desktop == null) {
44
+ desktop = Desktop.getDesktop();
58
45
  }
59
46
 
60
- application.setQuitHandler(new QuitHandler() {
61
- public void handleQuitRequestWith(QuitEvent event, QuitResponse response) {
47
+ desktop.setQuitHandler((QuitEvent event, QuitResponse response) -> {
62
48
  sketch.exit();
63
49
  if (PApplet.uncaughtThrowable == null && // no known crash
64
- !attemptedQuit) { // haven't tried yet
65
- response.cancelQuit(); // tell OS X we'll handle this
66
- attemptedQuit = true;
50
+ !attemptedQuit) { // haven't tried yet
51
+ response.cancelQuit(); // tell OS X we'll handle this
52
+ attemptedQuit = true;
67
53
  } else {
68
- response.performQuit(); // just force it this time
54
+ response.performQuit(); // just force it this time
69
55
  }
70
- }
71
56
  });
72
57
  }
73
58
 
74
59
  static public void cleanup() {
75
- if (application == null) {
76
- application = Application.getApplication();
60
+ if (desktop == null) {
61
+ desktop = Desktop.getDesktop();
77
62
  }
78
- application.setQuitHandler(null);
63
+ desktop.setQuitHandler(null);
79
64
  }
80
65
 
81
66
  // Called via reflection from PSurfaceAWT and others
82
67
  static public void setIconImage(Image image) {
83
- // When already set, is a sun.awt.image.MultiResolutionCachedImage on OS X
84
- // Image current = application.getDockIconImage();
85
- // System.out.println("current dock icon image is " + current);
86
- // System.out.println("changing to " + image);
87
-
88
- application.setDockIconImage(image);
68
+ taskbar.setIconImage(image);
89
69
  }
90
-
91
-
92
- // Instead, just use Application.getApplication() inside your app
93
- // static public Application getApplication() {
94
- // return application;
95
- // }
96
70
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: propane
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1.pre
4
+ version: 3.1.0.pre
5
5
  platform: java
6
6
  authors:
7
7
  - monkstone
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-14 00:00:00.000000000 Z
11
+ date: 2019-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -58,7 +58,7 @@ dependencies:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
60
  version: '1.0'
61
- description: " A batteries included version of processing in ruby.\n"
61
+ description: " A batteries included version of processing in ruby targetting jdk11.\n"
62
62
  email:
63
63
  - mamba2928@yahoo.co.uk
64
64
  executables:
@@ -78,7 +78,6 @@ files:
78
78
  - bin/propane
79
79
  - lib/.gitignore
80
80
  - lib/PROCESSING_LICENSE.txt
81
- - lib/apple.jar
82
81
  - lib/export.txt
83
82
  - lib/gluegen-rt-natives-linux-amd64.jar
84
83
  - lib/gluegen-rt-natives-macosx-universal.jar
@@ -88,7 +87,7 @@ files:
88
87
  - lib/jogl-all-natives-macosx-universal.jar
89
88
  - lib/jogl-all-natives-windows-amd64.jar
90
89
  - lib/jogl-all.jar
91
- - lib/propane-3.0.1.jar
90
+ - lib/propane-3.1.0.jar
92
91
  - lib/propane.rb
93
92
  - lib/propane/app.rb
94
93
  - lib/propane/creators/sketch_class.rb
@@ -264,8 +263,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
264
263
  version: 1.3.1
265
264
  requirements:
266
265
  - java runtime >= 11.0.1+
267
- rubyforge_project:
268
- rubygems_version: 2.7.8
266
+ rubygems_version: 3.0.1
269
267
  signing_key:
270
268
  specification_version: 4
271
269
  summary: ruby wrapper for processing-3.4 on MacOS, linux and windows (64bit only)