fixing small issues to get things running again

This commit is contained in:
benfry
2011-01-26 02:54:43 +00:00
parent bb80fcbf24
commit a6f0f1ef99
8 changed files with 44 additions and 18 deletions
+2
View File
@@ -116,6 +116,7 @@
<src path="src" />
<src path="generated" />
</javac>
<!--
<javac target="1.5"
srcdir="../android/tool/src"
destdir="bin"
@@ -126,6 +127,7 @@
<copy todir="bin/processing/app/tools/android/data">
<fileset dir="../android/tool/src/processing/app/tools/android/data/" />
</copy>
-->
</target>
<target name="build" depends="compile" description="Build PDE">
+13 -6
View File
@@ -209,14 +209,20 @@ public class Base {
public Base(String[] args) {
// Get the sketchbook path, and make sure it's set properly
determineSketchbookFolder();
// Make sure ThinkDifferent has library examples too
defaultMode.rebuildLibraryList();
// Put this after loading the examples, so that building the default file
// menu works on Mac OS X (since it needs examplesFolder to be set).
// menu works on Mac OS X (since it needs examplesFolder to be set).
platform.init(this);
toolsFolder = getContentFile("tools");
// Get the sketchbook path, and make sure it's set properly
determineSketchbookFolder();
// // Get the sketchbook path, and make sure it's set properly
// determineSketchbookFolder();
// Check if there were previously opened sketches to be restored
boolean opened = restoreSketches();
@@ -966,10 +972,10 @@ public class Base {
}
protected void rebuildSketchbookMenu() { //JMenu menu) {
//System.out.println("rebuilding sketchbook menu");
//new Exception().printStackTrace();
protected void rebuildSketchbookMenu() {
try {
System.err.println("sketchbook: " + sketchbookFolder);
sketchbookMenu.removeAll();
addSketches(sketchbookMenu, sketchbookFolder, false);
} catch (IOException e) {
@@ -1361,6 +1367,7 @@ public class Base {
sketchbookFolder.mkdirs();
}
}
System.err.println("sketchbook: " + sketchbookFolder);
}
+2 -1
View File
@@ -134,8 +134,9 @@ public abstract class EditorToolbar extends JComponent implements MouseInputList
public Image[][] loadImages() {
// Image allButtons = Base.getThemeImage("buttons.gif", this);
// Image allButtons = Base.loadImage(file);
Image allButtons = mode.loadImage("buttons.gif");
Image allButtons = mode.loadImage("theme/buttons.gif");
int count = allButtons.getWidth(this) / BUTTON_WIDTH;
// System.out.println("width is " + allButtons.getWidth(this));
Image[][] buttonImages = new Image[count][3];
for (int i = 0; i < count; i++) {
+3
View File
@@ -84,6 +84,8 @@ public abstract class Mode {
public void rebuildLibraryList() {
System.out.println("rebuildLibraryList()");
// reset the table mapping imports to libraries
importToLibraryTable = new HashMap<String, Library>();
@@ -224,6 +226,7 @@ public abstract class Mode {
//base.addSketches(menu, examplesFolder, false);
// break down the examples folder for examples
System.out.println("checking examples folder " + examplesFolder);
File[] subfolders = examplesFolder.listFiles(new FilenameFilter() {
public boolean accept(File dir, String name) {
return dir.isDirectory() && name.charAt(0) != '.';
@@ -101,6 +101,9 @@ public class PdeKeywords extends TokenMarker {
* @param coloring one of KEYWORD1, KEYWORD2, LITERAL1, etc.
*/
public void addColoring(String keyword, String coloring) {
if (keywordColoring == null) {
keywordColoring = new KeywordMap(true);
}
// text will be KEYWORD or LITERAL
boolean isKey = (coloring.charAt(0) == 'K');
// KEYWORD1 -> 0, KEYWORD2 -> 1, etc
+1 -1
View File
@@ -63,7 +63,7 @@ public class JavaMode extends Mode {
}
try {
theme = new Settings(new File(folder, "theme.txt"));
theme = new Settings(new File(folder, "theme/theme.txt"));
} catch (IOException e) {
Base.showError("Problem loading theme.txt",
"Could not load theme.txt, please re-install Processing", e);
+17 -10
View File
@@ -104,38 +104,42 @@
</copy>
<!-- copy shared library folder -->
<copy todir="${target.path}/libraries">
<fileset dir="shared/libraries" />
<copy todir="${target.path}/modes/java/libraries">
<fileset dir="shared/modes/java/libraries" />
</copy>
<!-- copy libraries for dxf, pdf, etc. -->
<copy todir="${target.path}/libraries/dxf">
<copy todir="${target.path}/modes/java/libraries/dxf">
<fileset dir="../dxf" includes="library/**,src/**" />
</copy>
<copy todir="${target.path}/libraries/net">
<copy todir="${target.path}/modes/java/libraries/net">
<fileset dir="../net" includes="library/**,src/**" />
</copy>
<copy todir="${target.path}/libraries/opengl">
<copy todir="${target.path}/modes/java/libraries/opengl">
<fileset dir="../opengl" includes="library/**,src/**" />
</copy>
<copy todir="${target.path}/libraries/pdf">
<copy todir="${target.path}/modes/java/libraries/pdf">
<fileset dir="../pdf" includes="library/**,src/**" />
</copy>
<copy todir="${target.path}/libraries/serial">
<copy todir="${target.path}/modes/java/libraries/serial">
<fileset dir="../serial" includes="library/**,src/**" />
</copy>
<copy todir="${target.path}/libraries/video">
<copy todir="${target.path}/modes/java/libraries/video">
<fileset dir="../video" includes="library/**,src/**" />
</copy>
<!-- Unzip documentation + examples -->
<unzip dest="${target.path}" src="shared/examples.zip" overwrite="false">
<unzip dest="${target.path}/modes/java"
src="shared/modes/java/examples.zip"
overwrite="false">
<patternset>
<exclude name="__MACOSX/**" />
<exclude name="**/._*" />
</patternset>
</unzip>
<unzip dest="${target.path}" src="shared/reference.zip" overwrite="false">
<unzip dest="${target.path}/modes/java"
src="shared/modes/java/reference.zip"
overwrite="false">
<patternset>
<exclude name="__MACOSX/**" />
<exclude name="**/._*" />
@@ -248,6 +252,7 @@
<copy todir="macosx/work/Processing.app/Contents/Resources/Java">
<fileset dir="shared" includes="lib/**" />
<fileset dir="shared" includes="modes/**" />
<fileset file="shared/revisions.txt" />
</copy>
@@ -337,6 +342,7 @@
<copy todir="linux/work">
<fileset dir="shared" includes="lib/**" />
<fileset dir="shared" includes="modes/**" />
<fileset file="shared/revisions.txt" />
</copy>
@@ -448,6 +454,7 @@ http://www.gnu.org/software/tar/manual/html_section/transform.html
<copy todir="windows/work">
<fileset dir="shared" includes="lib/**" />
<fileset dir="shared" includes="modes/**" />
<fileset file="shared/revisions.txt" />
</copy>
+3
View File
@@ -39,6 +39,9 @@ o message(new String(b, offset, length), err, false);
o http://code.google.com/p/processing/issues/detail?id=197
X couldn't find a good way to reproduce this, closing
_ can't do fileMenu.add(base.getSketchbookMenu()); inside ThinkDifferent
_ sketchbook location hasn't been determined yet
_ add splash image on os x
If you want a bundled app to show a splash screen you can do so by adding an entry named SplashFile to the Java section of the Info.plist:
<key>SplashFile</key>