Skip to content

Commit 81d2b7e

Browse files
committed
cleaning up the build script and making notes about download size and tradeoffs
1 parent 96186a6 commit 81d2b7e

File tree

2 files changed

+18
-15
lines changed

2 files changed

+18
-15
lines changed

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
11
# `FX2D`
22

3-
This repository contains the JavaFX renderer for Processing 4, also known as `FX2D`.
3+
This repository contains the JavaFX renderer for Processing 4, also known as `FX2D`.
44

55
The JavaFX binaries have grown very large in size so this was a necessary step to avoid making the Processing download excessively large, given that not everyone uses JavaFX. More discussion/explanation [here](https://github.com/processing/processing4/issues/348).
66

7-
This version of the JavaFX library will be required for `FX2D` sketches starting with 4.0 beta 4.
7+
This version of the JavaFX library will be required for `FX2D` sketches starting with 4.0 beta 4.
8+
9+
10+
## Download Size
11+
12+
The build script creates a very large download (hundreds of megabytes), because Processing supports several platforms (3 officially, 3 more unofficially) and we want to make it easy to use all of them. This is an acceptable tradeoff for a standalone library like this, but if you want a smaller build, you have options:
13+
14+
1. Disable `<antcall target="retrieve-gluon">` stanzas for platforms you don't care about.
15+
16+
2. Un-comment the `<!-- <exclude name="**/*jfxwebkit.*" /> -->` line so that the WebKit library is removed.
17+
18+
These are not done by default because we've seen projects that (1) run on all those platforms, and (2) use the full browser implementation available with the WebKit support. Again, because this is an optional download, this seems the correct tradeoff.

build.xml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ ${line.separator}with the path to where you have the code for Processing 4 check
110110
<include name="**/*.so" />
111111

112112
<!-- The webkit library might be skipped because it is massive.
113-
Remove libjfxwebkit.dylib, libjfxwebkit.so, jfxwebkit.dll -->
113+
Un-comment this line for a smaller build. It will remove
114+
libjfxwebkit.dylib, libjfxwebkit.so, jfxwebkit.dll -->
114115
<!-- <exclude name="**/*jfxwebkit.*" /> -->
115116

116117
<!-- Not using this either, but since we're using 'include',
@@ -127,52 +128,43 @@ ${line.separator}with the path to where you have the code for Processing 4 check
127128
<target name="download-javafx">
128129
<property name="gluon.version" value="17.0.2" />
129130

131+
<!-- Retrieves all six of our (un)officially supported platforms.
132+
You can comment some of these out if you'd like a smaller build. -->
133+
130134
<antcall target="retrieve-gluon">
131-
<!-- <param name="platform.zip" value="javafx-${gluon.version}-macos" /> -->
132135
<param name="platform.name" value="osx" />
133136
<param name="platform.arch" value="x64" />
134-
<!-- <param name="platform.path" value="${library.path}/macos-x86_64" /> -->
135137
<param name="platform.variant" value="macos-x86_64" />
136138
</antcall>
137139

138140
<antcall target="retrieve-gluon">
139-
<!-- <param name="gluon.base" value="javafx-${gluon.version}-macos" /> -->
140141
<param name="platform.name" value="osx" />
141142
<param name="platform.arch" value="aarch64" />
142143
<param name="platform.variant" value="macos-aarch64" />
143-
<!-- <param name="platform.path" value="${library.path}/macos-aarch64" /> -->
144144
</antcall>
145145

146146
<antcall target="retrieve-gluon">
147-
<!-- <param name="gluon.base" value="javafx-${gluon.version}-windows" /> -->
148147
<param name="platform.name" value="windows" />
149148
<param name="platform.arch" value="x64" />
150149
<param name="platform.variant" value="windows-amd64" />
151-
<!-- <param name="platform.path" value="${library.path}/windows-amd64" /> -->
152150
</antcall>
153151

154152
<antcall target="retrieve-gluon">
155-
<!-- <param name="gluon.base" value="javafx-${gluon.version}-linux" /> -->
156153
<param name="platform.name" value="linux" />
157154
<param name="platform.arch" value="x64" />
158155
<param name="platform.variant" value="linux-amd64" />
159-
<!-- <param name="platform.path" value="${library.path}/linux-amd64" /> -->
160156
</antcall>
161157

162158
<antcall target="retrieve-gluon">
163-
<!-- <param name="gluon.base" value="javafx-${gluon.version}-linux" /> -->
164159
<param name="platform.name" value="linux" />
165160
<param name="platform.arch" value="arm32" />
166161
<param name="platform.variant" value="linux-arm" />
167-
<!-- <param name="platform.path" value="${library.path}/linux-arm" /> -->
168162
</antcall>
169163

170164
<antcall target="retrieve-gluon">
171-
<!-- <param name="gluon.base" value="javafx-${gluon.version}-linux" /> -->
172165
<param name="platform.name" value="linux" />
173166
<param name="platform.arch" value="aarch64" />
174167
<param name="platform.variant" value="linux-aarch64" />
175-
<!-- <param name="platform.path" value="${library.path}/linux-aarch64" /> -->
176168
</antcall>
177169
</target>
178170

0 commit comments

Comments
 (0)