From e279fa2e47bb123ce4a77c44e8f0441a1dafe5ac Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Wed, 30 Jul 2014 16:20:52 -0400 Subject: [PATCH] build cleanups to die when files not present, remove duplicate fonts --- app/src/processing/app/Toolkit.java | 13 +++++-- build/build.xml | 16 +++++---- core/build.xml | 2 ++ todo.txt | 54 ++++++++++++++--------------- 4 files changed, 47 insertions(+), 38 deletions(-) diff --git a/app/src/processing/app/Toolkit.java b/app/src/processing/app/Toolkit.java index 34aa23834..83ead7661 100644 --- a/app/src/processing/app/Toolkit.java +++ b/app/src/processing/app/Toolkit.java @@ -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); diff --git a/build/build.xml b/build/build.xml index 9433bf858..016115911 100755 --- a/build/build.xml +++ b/build/build.xml @@ -275,7 +275,7 @@ - + @@ -471,7 +471,7 @@ - + @@ -500,7 +500,7 @@ - + @@ -599,7 +599,7 @@ - + @@ -621,7 +621,7 @@ - + @@ -768,7 +768,7 @@ - + @@ -788,7 +788,7 @@ tofile="${launch4j.dir}/bin/ld.exe" /> - + @@ -949,7 +949,9 @@ remove the spaces for depth since it should be double dash, but screws up commen + diff --git a/core/build.xml b/core/build.xml index 8bb8b3a2c..3d24eae76 100755 --- a/core/build.xml +++ b/core/build.xml @@ -38,8 +38,10 @@ + diff --git a/todo.txt b/todo.txt index 87a8cd030..8959aa7c4 100644 --- a/todo.txt +++ b/todo.txt @@ -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) - - . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .