build cleanups to die when files not present, remove duplicate fonts

This commit is contained in:
Ben Fry
2014-07-30 16:20:52 -04:00
parent ad6430b988
commit e279fa2e47
4 changed files with 47 additions and 38 deletions
+10 -3
View File
@@ -40,8 +40,8 @@ import java.awt.font.TextLayout;
import java.awt.geom.AffineTransform;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.HashSet;
@@ -453,9 +453,16 @@ public class Toolkit {
}
/**
* Get a font from the JRE lib/fonts folder. Our default fonts are also
* installed there so that the monospace (and others) can be used by other
* font listing calls (i.e. it appears in the list of monospace fonts in
* the Preferences window).
*/
static private Font createFont(String filename, int size) throws IOException, FontFormatException {
InputStream is = Base.getLibStream("fonts/" + filename);
BufferedInputStream input = new BufferedInputStream(is);
//InputStream is = Base.getLibStream("fonts/" + filename);
File fontFile = new File(System.getProperty("java.home"), "lib/fonts/" + filename);
BufferedInputStream input = new BufferedInputStream(new FileInputStream(fontFile));
Font font = Font.createFont(Font.TRUETYPE_FONT, input);
input.close();
return font.deriveFont((float) size);
+9 -7
View File
@@ -275,7 +275,7 @@
</fileset>
</copy>
<delete dir="${target.path}/modes/java/examples">
<delete dir="${target.path}/modes/java/examples" failonerror="true">
<include name="**/applet/**" />
</delete>
@@ -471,7 +471,7 @@
<copy todir="macosx/work/Processing.app/Contents/Java">
<fileset dir=".." includes="core/library/**" /> <!-- why this? -->
<!--<fileset dir="shared" includes="launch4j/**" />-->
<fileset dir="shared" includes="lib/**" />
<fileset dir="shared" includes="lib/**" excludes="lib/fonts/**" />
<fileset file="shared/revisions.txt" />
</copy>
@@ -500,7 +500,7 @@
<chmod perm="ugo+x" file="${launch4j.dir}/bin/ld" />
<!-- remove the others -->
<delete>
<delete failonerror="true">
<fileset dir="${launch4j.dir}/bin" includes="ld-*" />
<fileset dir="${launch4j.dir}/bin" includes="windres-*" />
</delete>
@@ -599,7 +599,7 @@
<copy todir="linux/work">
<fileset dir=".." includes="core/library/**" />
<fileset dir="shared" includes="launch4j/**" />
<fileset dir="shared" includes="lib/**" />
<fileset dir="shared" includes="lib/**" excludes="lib/fonts/**" />
<fileset dir="shared" includes="modes/**" />
<fileset file="shared/revisions.txt" />
</copy>
@@ -621,7 +621,7 @@
<chmod perm="ugo+x" file="${launch4j.dir}/bin/ld" />
<!-- remove the others -->
<delete>
<delete failonerror="true">
<fileset dir="${launch4j.dir}/bin" includes="ld-*" />
<fileset dir="${launch4j.dir}/bin" includes="windres-*" />
</delete>
@@ -768,7 +768,7 @@
<copy todir="windows/work">
<fileset dir=".." includes="core/library/**" />
<fileset dir="shared" includes="launch4j/**" />
<fileset dir="shared" includes="lib/**" />
<fileset dir="shared" includes="lib/**" excludes="lib/fonts/**" />
<fileset dir="shared" includes="modes/**" />
<fileset file="shared/revisions.txt" />
</copy>
@@ -788,7 +788,7 @@
tofile="${launch4j.dir}/bin/ld.exe" />
<!-- remove the others -->
<delete>
<delete failonerror="true">
<fileset dir="${launch4j.dir}/bin" includes="ld-*" />
<fileset dir="${launch4j.dir}/bin" includes="windres-*" />
</delete>
@@ -949,7 +949,9 @@ remove the spaces for depth since it should be double dash, but screws up commen
<packageset dir="../core/src">
<include name="processing/**" />
<!--
<include name="japplemenubar/**" />
-->
</packageset>
</javadoc>
+2
View File
@@ -38,8 +38,10 @@
</javac>
<!-- Copy the jnilib to the bin folder so it's included. -->
<!--
<copy todir="bin/japplemenubar"
file="src/japplemenubar/libjAppleMenuBar.jnilib" />
-->
<!-- Copy shaders to bin. (Eclipse does this automatically.) -->
<copy todir="bin">
+26 -28
View File
@@ -13,6 +13,14 @@ X user opens non-main pde of already open sketch, it'll open again
X https://github.com/processing/processing/issues/2506
X remove the prefs for 32/64-bit from Preferences
X also remove the extra OS X cruft inside Runner.java
X OS X export button not disabled on other platforms
X https://github.com/processing/processing/issues/2642
o try new syntax package
X exclude 'fonts' folder from build (since it's going into the JRE)
X was storing our fonts in both ./lib/fonts and jre/lib/fonts
X now gets the jre folder and loads from there
X make ant fail when trying to delete JRE files that don't exist
X some aren't being removed properly
gsoc
X clear status messages in the Contribution Manager
@@ -41,42 +49,29 @@ X https://github.com/processing/processing/issues/2141
o double-clicking a .pde file doesn't open properly on OS X
o https://github.com/processing/processing/issues/2639
X moving p5 examples to the web repo
X remove reference.zip from main repo
_ huge i18n patch
_ https://github.com/processing/processing/pull/2084
X move examples into web repo
_ add a new pref for the 3.0 sketchbook location
_ make reference and examples build process part of dist
_ separate ant targets, but only require them for dist
_ as separate targets, folks can build explicitly if they'd like
_ remove reference.zip from main repo
_ fix the build scripts to include the examples
_ https://github.com/processing/processing/issues/2652
_ all examples are out of "processing/java" and are now in "processing-docs/content/". The Book examples have been removed entirely from our repositories.
_ reference wasn't included either
_ https://github.com/processing/processing/issues/2656
_ processing-web/java_generate/ReferenceGenerator
_ "Platform is ${platform}" message during 'ant clean'
_ on OS X, but not Windows (haven't checked Linux)
_ make ant fail when trying to delete JRE files that don't exist
_ some aren't being removed properly
_ "Platform is ${platform}" message during 'ant clean'
_ OS X export button not disabled on other platforms
_ https://github.com/processing/processing/issues/2642
pending
_ huge i18n patch
_ https://github.com/processing/processing/pull/2084
_ look at the sound library https://github.com/wirsing/ProcessingSound
_ appears that sound is not yet supported on Windows
_ try new syntax package
_ possibility of libraries folder inside a particular sketch?
_ incorporate new preproc
_ https://github.com/fjenett/processing-preprocessor-antlr4
_ sound is not yet supported on Windows
_ glw? lwjgl? retina jogl?
_ move sketchbook into its own window
_ move recent into the sketchbook menu
_ needs to recognize the p5 app folder
_ also should recognize the user's home dir
_ move examples into web repo
_ make reference and examples build process part of dist
_ separate ant targets, but only require them for dist
_ as separate targets, folks can build explicitly if they'd like
gsoc/help me
@@ -90,9 +85,16 @@ _ shouldn't write sketch.properties unless it's a non-default mode
_ https://github.com/processing/processing/issues/2531
_ closing the color selector makes things freeze (only Linux and Windows?)
_ https://github.com/processing/processing/issues/2381
_ move sketchbook into its own window
_ move recent into the sketchbook menu
_ needs to recognize the p5 app folder
_ also should recognize the user's home dir
_ incorporate new preproc
_ https://github.com/fjenett/processing-preprocessor-antlr4
medium
_ possibility of libraries folder inside a particular sketch?
_ check on why 2x core.jar inside the Java folder
_ maybe OS X Java can't look in subfolders? (just auto-adds things)
_ display "1" is not correct in 2.1.2
@@ -153,10 +155,6 @@ _ http://stackoverflow.com/questions/4933677/detecting-windows-ie-proxy-settin
_ http://www.java2s.com/Code/Java/Network-Protocol/DetectProxySettingsforInternetConnection.htm
post 2.1 cleaning
_ exclude 'fonts' folder from build (since it's going into the JRE)
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .