Skip to content

Commit d007d76

Browse files
committed
create os specific jars
1 parent 04c5bc8 commit d007d76

File tree

2 files changed

+110
-41
lines changed

2 files changed

+110
-41
lines changed

resources/build.properties

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
# Create a Library for the Processing open source programming language and
1+
# Create a Library for the Processing open source programming language and
22
# environment (http://processing.org/)
33
#
4-
# Customize the build properties to make the ant-build-process work for your
4+
# Customize the build properties to make the ant-build-process work for your
55
# environment. How? Please read the comments below.
66
#
77
# The default properties are set for OS X. Please refer to comments for Windows
8-
# settings.
8+
# settings.
99

10-
# Where is your Processing sketchbook located?
11-
# If you are not sure, check the sketchbook location in your Processing
10+
# Where is your Processing sketchbook located?
11+
# If you are not sure, check the sketchbook location in your Processing
1212
# application preferences.
1313
# ${user.home} points the compiler to your home directory.
1414
# For windows the default path to your sketchbook would be
@@ -18,28 +18,28 @@
1818
sketchbook.location=${user.home}/sketchbook
1919

2020

21-
# Where are the jar files located that are required for compiling your Library
21+
# Where are the jar files located that are required for compiling your Library
2222
# such as e.g. core.jar?
2323
# By default the local classpath location points to folder libs inside Eclipse's
2424
# workspace (by default found in your home directory).
2525
# For Windows, the default path would be
2626
# ${user.home}/Documents/workspace/libs (make adjustments below)
2727
# For OS X,the following path will direct you into Processing's application
28-
# package, in case you put Processing inside your Applications folder.
28+
# package, in case you put Processing inside your Applications folder.
2929

3030
#classpath.local.location=${user.home}/Documents/workspace/libs
3131
classpath.local.location=libs
3232

3333

34-
# Add all jar files that are required for compiling your project to the local
35-
# and project classpath. Use a comma as delimiter. These jar files must be
34+
# Add all jar files that are required for compiling your project to the local
35+
# and project classpath. Use a comma as delimiter. These jar files must be
3636
# inside your classpath.local.location folder.
3737

3838
classpath.local.include=core.jar
3939

4040

4141
# Add Processing's libraries folder to the classpath.
42-
# If you don't need to include the libraries folder to your classpath, comment
42+
# If you don't need to include the libraries folder to your classpath, comment
4343
# out the following line.
4444

4545
classpath.libraries.location=${sketchbook.location}/libraries
@@ -55,13 +55,13 @@ java.target.version=11
5555
ant.description=Processing Library Ant build file.
5656

5757

58-
# Give your Library a name. The name must not contain spaces or special
58+
# Give your Library a name. The name must not contain spaces or special
5959
# characters.
6060

6161
project.name=scratch
6262

6363

64-
# The name as the user will see it. This can contain spaces and special
64+
# The name as the user will see it. This can contain spaces and special
6565
# characters.
6666

6767
project.prettyName=Scratch
@@ -71,7 +71,7 @@ project.prettyName=Scratch
7171
# 'fast' will only compile the project into your sketchbook.
7272
# 'normal' will compile the distribution including the javadoc-reference and all
7373
# web-files (the compile process here takes longer).
74-
# All files compiled with project.compile=normal are stored in the distribution
74+
# All files compiled with project.compile=normal are stored in the distribution
7575
# folder.
7676

7777
project.compile=normal
@@ -90,21 +90,21 @@ library.url=https://github.com/openpatch/scratch-for-java
9090

9191

9292
# Set the category (or categories) of your Library from the following list:
93-
# "3D" "Animation" "Compilations" "Data"
94-
# "Fabrication" "Geometry" "GUI" "Hardware"
95-
# "I/O" "Language" "Math" "Simulation"
93+
# "3D" "Animation" "Compilations" "Data"
94+
# "Fabrication" "Geometry" "GUI" "Hardware"
95+
# "I/O" "Language" "Math" "Simulation"
9696
# "Sound" "Utilities" "Typography" "Video & Vision"
97-
#
98-
# If a value other than those listed is used, your Library will listed as
97+
#
98+
# If a value other than those listed is used, your Library will listed as
9999
# "Other". Many categories must be comma-separated.
100100

101101
library.categories=Utilities
102102

103103

104-
# A short sentence (or fragment) to summarize the Library's function. This will
105-
# be shown from inside the PDE when the Library is being installed. Avoid
106-
# repeating the name of your Library here. Also, avoid saying anything redundant
107-
# like mentioning that it's a Library. This should start with a capitalized
104+
# A short sentence (or fragment) to summarize the Library's function. This will
105+
# be shown from inside the PDE when the Library is being installed. Avoid
106+
# repeating the name of your Library here. Also, avoid saying anything redundant
107+
# like mentioning that it's a Library. This should start with a capitalized
108108
# letter, and end with a period.
109109

110110
library.sentence=Provides classes to match the functionality of scratch
@@ -115,7 +115,7 @@ library.sentence=Provides classes to match the functionality of scratch
115115
# second sentence here. If your Library only works on certain operating systems,
116116
# mention it here.
117117

118-
library.paragraph=
118+
library.paragraph=
119119

120120

121121
# Set the source code repository for your project.
@@ -126,24 +126,24 @@ source.url=https://github.com/openpatch/scratch-for-java
126126
source.repository=https://github.com/openpatch/scratch-for-java.git
127127

128128

129-
# The current version of your Library.
130-
# This number must be parsable as an int. It increments once with each release.
131-
# This is used to compare different versions of the same Library, and check if
129+
# The current version of your Library.
130+
# This number must be parsable as an int. It increments once with each release.
131+
# This is used to compare different versions of the same Library, and check if
132132
# an update is available.
133133

134-
library.version=23
134+
library.version=24
135135

136136

137137
# The version as the user will see it.
138138

139-
library.prettyVersion=2.2
139+
library.prettyVersion=3.0
140140

141141

142142
# The min and max revision of Processing compatible with your Library.
143-
# Note that these fields use the revision and not the version of Processing,
144-
# parsable as an int. For example, the revision number for 2.2.1 is 227.
143+
# Note that these fields use the revision and not the version of Processing,
144+
# parsable as an int. For example, the revision number for 2.2.1 is 227.
145145
# You can find the revision numbers in the change log: https://raw.githubusercontent.com/processing/processing/master/build/shared/revisions.txt
146-
# Only use maxRevision (or minRevision), when your Library is known to
146+
# Only use maxRevision (or minRevision), when your Library is known to
147147
# break in a later (or earlier) release. Otherwise, use the default value 0.
148148

149149
compatible.minRevision=270

resources/build.xml

Lines changed: 79 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@
9393
<mkdir dir="${sketchbook.location}/libraries" />
9494
<mkdir dir="${project.bin}" />
9595
<mkdir dir="${project.libs}" />
96+
<mkdir dir="${project.libs}/windows-amd64" />
97+
<mkdir dir="${project.libs}/macosx-universal" />
98+
<mkdir dir="${project.libs}/linux-amd64" />
9699
</target>
97100

98101

@@ -103,14 +106,54 @@
103106

104107
<get dest="${project.libs}">
105108
<url
106-
url="https://github.com/micycle1/processing-core-4/releases/download/4.0.1/core-4.0.1-fat.jar"
107-
name="core-fat.jar" />
109+
url="https://github.com/micycle1/processing-core-4/releases/download/4.0.1/original-core-4.0.1.jar" />
110+
<url
111+
url="https://repo1.maven.org/maven2/org/jogamp/jogl/jogl-all/2.3.2/jogl-all-2.3.2.jar" />
112+
<url
113+
url="https://repo1.maven.org/maven2/org/jogamp/gluegen/gluegen-rt/2.3.2/gluegen-rt-2.3.2.jar" />
108114
<url
109115
url="https://github.com/processing/processing-sound/releases/download/v2.3.1/sound.zip" />
110-
<url url="https://github.com/java-native/jssc/releases/download/v2.9.4/jssc-2.9.4.jar"
111-
name="jssc.jar" />
112-
<url url="https://repo1.maven.org/maven2/org/processing/serial/3.3.7/serial-3.3.7.jar"
113-
name="serial.jar" />
116+
<url url="https://github.com/java-native/jssc/releases/download/v2.9.4/jssc-2.9.4.jar" />
117+
<url url="https://repo1.maven.org/maven2/org/processing/serial/3.3.7/serial-3.3.7.jar" />
118+
</get>
119+
120+
<get dest="${project.libs}/linux-amd64">
121+
<url
122+
url="https://maven.scijava.org/content/repositories/public/org/jogamp/jogl/jogl-all-natives-linux-amd64/2.1.5/jogl-all-natives-linux-amd64-2.1.5.jar" />
123+
<url
124+
url="https://maven.scijava.org/content/repositories/public/org/jogamp/gluegen/gluegen-rt-natives-linux-amd64/2.1.5/gluegen-rt-natives-linux-amd64-2.1.5.jar" />
125+
<url
126+
url="https://repo1.maven.org/maven2/org/openjfx/javafx-controls/18.0.2/javafx-controls-18.0.2-linux.jar" />
127+
<url
128+
url="https://repo1.maven.org/maven2/org/openjfx/javafx-graphics/18.0.2/javafx-graphics-18.0.2-linux.jar" />
129+
<url
130+
url="https://repo1.maven.org/maven2/org/openjfx/javafx-base/18.0.2/javafx-base-18.0.2-linux.jar" />
131+
</get>
132+
133+
<get dest="${project.libs}/windows-amd64">
134+
<url
135+
url="https://maven.scijava.org/content/repositories/public/org/jogamp/jogl/jogl-all-natives-windows-amd64/2.1.5/jogl-all-natives-windows-amd64-2.1.5.jar" />
136+
<url
137+
url="https://maven.scijava.org/content/repositories/public/org/jogamp/gluegen/gluegen-rt-natives-windows-amd64/2.1.5/gluegen-rt-natives-windows-amd64-2.1.5.jar" />
138+
<url
139+
url="https://repo1.maven.org/maven2/org/openjfx/javafx-controls/18.0.2/javafx-controls-18.0.2-win.jar" />
140+
<url
141+
url="https://repo1.maven.org/maven2/org/openjfx/javafx-graphics/18.0.2/javafx-graphics-18.0.2-win.jar" />
142+
<url
143+
url="https://repo1.maven.org/maven2/org/openjfx/javafx-base/18.0.2/javafx-base-18.0.2-win.jar" />
144+
</get>
145+
146+
<get dest="${project.libs}/macosx-universal">
147+
<url
148+
url="https://maven.scijava.org/content/repositories/public/org/jogamp/jogl/jogl-all-natives-macosx-universal/2.1.5/jogl-all-natives-macosx-universal-2.1.5.jar" />
149+
<url
150+
url="https://maven.scijava.org/content/repositories/public/org/jogamp/gluegen/gluegen-rt-natives-macosx-universal/2.1.5/gluegen-rt-natives-macosx-universal-2.1.5.jar" />
151+
<url
152+
url="https://repo1.maven.org/maven2/org/openjfx/javafx-controls/18.0.2/javafx-controls-18.0.2-mac.jar" />
153+
<url
154+
url="https://repo1.maven.org/maven2/org/openjfx/javafx-graphics/18.0.2/javafx-graphics-18.0.2-mac.jar" />
155+
<url
156+
url="https://repo1.maven.org/maven2/org/openjfx/javafx-base/18.0.2/javafx-base-18.0.2-mac.jar" />
114157
</get>
115158

116159
<echo message="extracting sound jars ..." />
@@ -182,7 +225,7 @@
182225
<fileset dir="${project.tmp}/${project.name}" />
183226
</copy>
184227
<delete
185-
file="${sketchbook.location}/${folder}/${project.name}/library/scratch-standalone.jar" />
228+
file="${sketchbook.location}/${folder}/${project.name}/library/scratch-standalone-*.jar" />
186229
</target>
187230

188231

@@ -204,9 +247,31 @@
204247
<jar jarfile="${project.tmp}/${project.name}/${folder}/${project.jar.name}.jar"
205248
basedir="${project.bin}" />
206249

207-
<jar jarfile="${project.tmp}/${project.name}/${folder}/${project.jar.name}-standalone.jar"
250+
<jar
251+
jarfile="${project.tmp}/${project.name}/${folder}/${project.jar.name}-standalone-linux-amd64.jar"
252+
basedir="${project.bin}">
253+
<zipgroupfileset dir="${project.libs}" includes="*.jar" />
254+
<zipgroupfileset dir="${project.libs}/linux-amd64" includes="*.jar" />
255+
<manifest>
256+
<attribute name="Class-Path" value="${project.libs}" />
257+
</manifest>
258+
</jar>
259+
260+
<jar
261+
jarfile="${project.tmp}/${project.name}/${folder}/${project.jar.name}-standalone-windows-amd64.jar"
208262
basedir="${project.bin}">
209263
<zipgroupfileset dir="${project.libs}" includes="*.jar" />
264+
<zipgroupfileset dir="${project.libs}/windows-amd64" includes="*.jar" />
265+
<manifest>
266+
<attribute name="Class-Path" value="${project.libs}" />
267+
</manifest>
268+
</jar>
269+
270+
<jar
271+
jarfile="${project.tmp}/${project.name}/${folder}/${project.jar.name}-standalone-macosx-universal.jar"
272+
basedir="${project.bin}">
273+
<zipgroupfileset dir="${project.libs}" includes="*.jar" />
274+
<zipgroupfileset dir="${project.libs}/macosx-universal" includes="*.jar" />
210275
<manifest>
211276
<attribute name="Class-Path" value="${project.libs}" />
212277
</manifest>
@@ -331,12 +396,16 @@
331396
<copy file="${project.dist.version}/tmp/${project.name}/library.properties"
332397
tofile="${project.dist}/${project.name}.txt" />
333398

334-
<move file="${project.dist.version}/tmp/${project.name}/library/scratch-standalone.jar"
399+
<move file="${project.dist.version}/tmp/${project.name}/library/scratch-standalone-windows-amd64.jar"
400+
todir="${project.dist}" />
401+
<move file="${project.dist.version}/tmp/${project.name}/library/scratch-standalone-linux-amd64.jar"
402+
todir="${project.dist}" />
403+
<move file="${project.dist.version}/tmp/${project.name}/library/scratch-standalone-macosx-universal.jar"
335404
todir="${project.dist}" />
336405

337406
<zip destfile="${project.dist.version}/${project.name}.zip"
338407
basedir="${project.dist.version}/tmp"
339-
excludes="**/.DS_Store,**/${project.name}-standalone.jar"
408+
excludes="**/.DS_Store,**/${project.name}-standalone-*.jar"
340409
/>
341410

342411
<move file="${project.dist.version}/${project.name}.zip" todir="${project.dist}" />

0 commit comments

Comments
 (0)