Skip to content

Commit 9f18793

Browse files
authored
Merge pull request #28 from ruby-processing/compatibility
major refactor
2 parents e5800f1 + 5b63b33 commit 9f18793

File tree

120 files changed

+96349
-27
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+96349
-27
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
**v2.9.0** No-one helped with think_open branch, that was trying to get ready for jdk9 (as compilable), so I'm abandoning 2.8.0 series, the 2.9.0 version will create an integrated jar and concentrate on compatibility, rather be future looking (but I'm not sure that think_different is any use or will work in future).
2+
13
**v2.7.2** Slight re-factor of control_panel, fix virgin install of libraries folder, add grafica library examples suggest upgrade to jruby-9.1.17.0
24

35
**v2.7.1** Avoid calling protected method in control_panel (ready for jdk9)

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ adjust above for your OS/distro setup.
77

88
## Requirements
99

10-
- jdk8+ (jdk9 mostly works, see changelog, but is noisy)
11-
- jruby-9.1.16.0
12-
- mvn-3.5.0+
13-
- processing-core.jar (_build only_) see [propane-core](https://github.com/ruby-processing/processing-core)
10+
- `jdk8_u172`
11+
- `jruby-9.1.16.0`
12+
- `mvn-3.5.0+`
13+
- `apple.jar` (_build only_) see [vanilla-processing](https://github.com/processing/processing/blob/master/core/apple.jar)
1414

1515
## Building and testing
1616

@@ -23,7 +23,7 @@ rake javadoc
2323
## Installation
2424
```bash
2525
jgem install propane # from rubygems
26-
jgem install propane-2.7.1-java.gem # local install requires a custom processing-core
26+
jgem install propane-2.9.0-java.gem # local install requires a custom processing-core
2727
```
2828

2929
## Usage

Rakefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ def create_manifest
77
File.open('MANIFEST.MF', 'w') do |f|
88
f.puts(title)
99
f.puts(version)
10-
f.puts('Class-Path: processing-core.jar gluegen-rt-2.3.2.jar jog-all-2.3.2.jar')
10+
f.puts('Class-Path: gluegen-rt-2.3.2.jar jog-all-2.3.2.jar')
1111
end
1212
end
1313

@@ -21,7 +21,7 @@ end
2121
desc 'Install'
2222
task :install do
2323
sh 'mvn dependency:copy'
24-
sh 'mv target/propane.jar lib'
24+
sh 'mv target/propane-2.9.0.jar lib'
2525
end
2626

2727
desc 'Gem'

lib/propane/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# frozen_string_literal: true
22
module Propane
3-
VERSION = '2.7.2'.freeze
3+
VERSION = '2.9.0'.freeze
44
end

license.txt

Lines changed: 508 additions & 0 deletions
Large diffs are not rendered by default.

pom.rb

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
require 'fileutils'
2-
project 'rp5extras', 'https://github.com/monkstone/propane' do
2+
project 'propane', 'https://github.com/monkstone/propane' do
33
model_version '4.0.0'
4-
id 'propane:propane', '2.7.2'
4+
id 'propane:propane:2.9.0'
55
packaging 'jar'
6-
description 'rp5extras for propane'
6+
description 'An integrated processing-core (somewhat hacked), with additional java code for a jruby version of processing.'
7+
78
organization 'ruby-processing', 'https://ruby-processing.github.io'
8-
{ 'monkstone' => 'Martin Prout' }.each do |key, value|
9+
10+
{
11+
'monkstone' => 'Martin Prout', 'benfry' => 'Ben Fry',
12+
'REAS' => 'Casey Reas', 'codeanticode' => 'Andres Colubri'
13+
}.each do |key, value|
914
developer key do
1015
name value
1116
roles 'developer'
1217
end
1318
end
1419
license 'GPL 3', 'http://www.gnu.org/licenses/gpl-3.0-standalone.html'
20+
license 'LGPL 2', 'https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html'
1521
issue_management 'https://github.com/ruby-processing/propane/issues', 'Github'
1622

1723
source_control(
@@ -100,8 +106,14 @@
100106
end
101107

102108
build do
103-
default_goal 'package'
104-
source_directory 'src'
105-
final_name 'propane'
109+
resource do
110+
directory '${source.directory}/main/java'
111+
includes ['**/**/*.glsl', '**/*.jnilib']
112+
excludes '**/**/*.java'
113+
end
114+
resource do
115+
directory '${source.directory}/main/resources'
116+
includes ['**/*.png', '*.txt']
117+
end
106118
end
107119
end

pom.xml

Lines changed: 50 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ DO NOT MODIFIY - GENERATED CODE
1111
<modelVersion>4.0.0</modelVersion>
1212
<groupId>propane</groupId>
1313
<artifactId>propane</artifactId>
14-
<version>2.7.2</version>
15-
<name>rp5extras</name>
16-
<description>rp5extras for propane</description>
14+
<version>2.9.0</version>
15+
<name>propane</name>
16+
<description>An integrated processing-core (somewhat hacked), with additional java code for a jruby version of processing.</description>
1717
<url>https://github.com/monkstone/propane</url>
1818
<organization>
1919
<name>ruby-processing</name>
@@ -24,6 +24,10 @@ DO NOT MODIFIY - GENERATED CODE
2424
<name>GPL 3</name>
2525
<url>http://www.gnu.org/licenses/gpl-3.0-standalone.html</url>
2626
</license>
27+
<license>
28+
<name>LGPL 2</name>
29+
<url>https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html</url>
30+
</license>
2731
</licenses>
2832
<developers>
2933
<developer>
@@ -33,6 +37,27 @@ DO NOT MODIFIY - GENERATED CODE
3337
<role>developer</role>
3438
</roles>
3539
</developer>
40+
<developer>
41+
<id>benfry</id>
42+
<name>Ben Fry</name>
43+
<roles>
44+
<role>developer</role>
45+
</roles>
46+
</developer>
47+
<developer>
48+
<id>REAS</id>
49+
<name>Casey Reas</name>
50+
<roles>
51+
<role>developer</role>
52+
</roles>
53+
</developer>
54+
<developer>
55+
<id>codeanticode</id>
56+
<name>Andres Colubri</name>
57+
<roles>
58+
<role>developer</role>
59+
</roles>
60+
</developer>
3661
</developers>
3762
<scm>
3863
<connection>scm:git:git://github.com/ruby-processing/propane.git</connection>
@@ -62,9 +87,9 @@ DO NOT MODIFIY - GENERATED CODE
6287
<type>pom</type>
6388
</dependency>
6489
<dependency>
65-
<groupId>org.processing</groupId>
66-
<artifactId>core</artifactId>
67-
<version>3.3.7</version>
90+
<groupId>com.apple.eawt</groupId>
91+
<artifactId>apple</artifactId>
92+
<version>1.0</version>
6893
</dependency>
6994
<dependency>
7095
<groupId>org.processing</groupId>
@@ -83,9 +108,25 @@ DO NOT MODIFIY - GENERATED CODE
83108
</dependency>
84109
</dependencies>
85110
<build>
86-
<sourceDirectory>src</sourceDirectory>
87-
<defaultGoal>package</defaultGoal>
88-
<finalName>propane</finalName>
111+
<resources>
112+
<resource>
113+
<directory>${source.directory}/main/java</directory>
114+
<includes>
115+
<include>**/**/*.glsl</include>
116+
<include>**/*.jnilib</include>
117+
</includes>
118+
<excludes>
119+
<exclude>**/**/*.java</exclude>
120+
</excludes>
121+
</resource>
122+
<resource>
123+
<directory>${source.directory}/main/resources</directory>
124+
<includes>
125+
<include>**/*.png</include>
126+
<include>*.txt</include>
127+
</includes>
128+
</resource>
129+
</resources>
89130
<pluginManagement>
90131
<plugins>
91132
<plugin>

propane.gemspec

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ Gem::Specification.new do |gem|
1515
gem.summary = %q{ruby wrapper for processing-3.4 on MacOS and linux64 bit only for opengl}
1616
gem.homepage = 'https://ruby-processing.github.io/propane/'
1717
gem.files = `git ls-files`.split($/)
18-
gem.files << 'lib/propane.jar'
19-
gem.files << 'lib/processing-core.jar'
18+
gem.files << 'lib/propane-2.9.0.jar'
2019
gem.files << 'lib/gluegen-rt-2.3.2.jar'
2120
gem.files << 'lib/jogl-all-2.3.2.jar'
2221
gem.files << 'lib/gluegen-rt-2.3.2-natives-linux-amd64.jar'
@@ -30,5 +29,5 @@ Gem::Specification.new do |gem|
3029
gem.add_runtime_dependency 'arcball', '~> 1.0', '>= 1.0.0'
3130
gem.require_paths = ['lib']
3231
gem.platform = 'java'
33-
gem.requirements << 'java runtime >= 1.8.0_151+'
32+
gem.requirements << 'java runtime >= 1.8.0_171+'
3433
end
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
/*
2+
Part of the Processing project - http://processing.org
3+
4+
Copyright (c) 2011-12 hansi raber, released under LGPL under agreement
5+
6+
This library is free software; you can redistribute it and/or
7+
modify it under the terms of the GNU Lesser General Public
8+
License as published by the Free Software Foundation, version 2.1.
9+
10+
This library is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
Lesser General Public License for more details.
14+
15+
You should have received a copy of the GNU Lesser General
16+
Public License along with this library; if not, write to the
17+
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
18+
Boston, MA 02111-1307 USA
19+
*/
20+
package japplemenubar;
21+
22+
import java.io.*;
23+
24+
import processing.core.PApplet;
25+
26+
27+
/**
28+
* Starting point for the application. General initialization should be done
29+
* inside the ApplicationController's init() method. If certain kinds of
30+
* non-Swing initialization takes too long, it should happen in a new Thread
31+
* and off the Swing event dispatch thread (EDT).
32+
*
33+
* @author hansi
34+
*/
35+
public class JAppleMenuBar {
36+
static JAppleMenuBar instance;
37+
static final String FILENAME = "libjAppleMenuBar.jnilib";
38+
39+
static {
40+
try {
41+
File temp = File.createTempFile("processing", "menubar");
42+
temp.delete(); // remove the file itself
43+
temp.mkdirs(); // create a directory out of it
44+
temp.deleteOnExit();
45+
46+
File jnilibFile = new File(temp, FILENAME);
47+
InputStream input = JAppleMenuBar.class.getResourceAsStream(FILENAME);
48+
if (input != null) {
49+
if (PApplet.saveStream(jnilibFile, input)) {
50+
System.load(jnilibFile.getAbsolutePath());
51+
instance = new JAppleMenuBar();
52+
53+
} else {
54+
sadness("Problem saving " + FILENAME + " for full screen use.");
55+
}
56+
} else {
57+
sadness("Could not load " + FILENAME + " from core.jar");
58+
}
59+
} catch (IOException e) {
60+
sadness("Unknown error, here's the stack trace.");
61+
e.printStackTrace();
62+
}
63+
}
64+
65+
66+
static void sadness(String msg) {
67+
System.err.println("Full screen mode disabled. " + msg);
68+
}
69+
70+
71+
// static public void show() {
72+
// instance.setVisible(true);
73+
// }
74+
75+
76+
static public void hide() {
77+
instance.setVisible(false, false);
78+
}
79+
80+
81+
public native void setVisible(boolean visibility, boolean kioskMode);
82+
83+
84+
// public void setVisible(boolean visibility) {
85+
// // Keep original API in-tact. Default kiosk-mode to off.
86+
// setVisible(visibility, false);
87+
// }
88+
}
28.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)