Skip to content

Commit 554f4f3

Browse files
committed
making further progress on build process
1 parent f3fe7a1 commit 554f4f3

File tree

13 files changed

+77
-78
lines changed

13 files changed

+77
-78
lines changed

app/build.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@
7171

7272
<target name="compile" depends="preproc" description="Compile sources">
7373
<condition property="core-built">
74-
<available file="../core/core.jar" />
74+
<available file="../core/library/core.jar" />
7575
</condition>
7676
<fail unless="core-built"
77-
message="Please build the core library first and make sure it sits in ../core/core.jar" />
77+
message="Please build the core library first and make sure it sits in ../core/library/core.jar" />
7878

7979
<mkdir dir="bin" />
8080

app/src/processing/app/tools/ExportExamples.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/*
12
package processing.app.tools;
23
34
import java.io.*;
@@ -153,4 +154,5 @@ public boolean handle(Editor editor) throws SketchException, IOException {
153154
public String getMenuTitle() {
154155
return "Export Examples";
155156
}
156-
}
157+
}
158+
*/

app/src/processing/mode/java/JavaBuild.java

Lines changed: 42 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,8 @@ public String preprocess(File srcFolder,
397397
// grab the imports from the code just preproc'd
398398

399399
importedLibraries = new ArrayList<Library>();
400+
importedLibraries.add(mode.getCoreLibrary());
401+
400402
// System.out.println("extra imports: " + result.extraImports);
401403
for (String item : result.extraImports) {
402404
// remove things up to the last dot
@@ -696,14 +698,17 @@ public SketchException placeException(String message,
696698
}
697699

698700

701+
/*
699702
protected boolean exportApplet() throws SketchException, IOException {
700703
return exportApplet(new File(sketch.getFolder(), "applet"));
701704
}
705+
*/
702706

703707

704708
/**
705709
* Handle export to applet.
706710
*/
711+
/*
707712
public boolean exportApplet(File appletFolder) throws SketchException, IOException {
708713
mode.prepareExportFolder(appletFolder);
709714
@@ -767,37 +772,35 @@ public boolean exportApplet(File appletFolder) throws SketchException, IOExcepti
767772
// }
768773
769774
770-
/*
771-
int wide = PApplet.DEFAULT_WIDTH;
772-
int high = PApplet.DEFAULT_HEIGHT;
773-
String renderer = "";
774-
775-
String scrubbed = PdePreprocessor.scrubComments(sketch.getCode(0).getProgram());
776-
String[] matches = PApplet.match(scrubbed, PdePreprocessor.SIZE_REGEX);
777-
778-
if (matches != null) {
779-
try {
780-
wide = Integer.parseInt(matches[1]);
781-
high = Integer.parseInt(matches[2]);
782-
783-
// Adding back the trim() for 0136 to handle Bug #769
784-
if (matches.length == 4) renderer = matches[3].trim();
785-
// Actually, matches.length should always be 4...
786-
787-
} catch (NumberFormatException e) {
788-
// found a reference to size, but it didn't
789-
// seem to contain numbers
790-
final String message =
791-
"The size of this applet could not automatically be\n" +
792-
"determined from your code. You'll have to edit the\n" +
793-
"HTML file to set the size of the applet.\n" +
794-
"Use only numeric values (not variables) for the size()\n" +
795-
"command. See the size() reference for an explanation.";
796-
797-
Base.showWarning("Could not find applet size", message, null);
798-
}
799-
} // else no size() command found
800-
*/
775+
// int wide = PApplet.DEFAULT_WIDTH;
776+
// int high = PApplet.DEFAULT_HEIGHT;
777+
// String renderer = "";
778+
//
779+
// String scrubbed = PdePreprocessor.scrubComments(sketch.getCode(0).getProgram());
780+
// String[] matches = PApplet.match(scrubbed, PdePreprocessor.SIZE_REGEX);
781+
//
782+
// if (matches != null) {
783+
// try {
784+
// wide = Integer.parseInt(matches[1]);
785+
// high = Integer.parseInt(matches[2]);
786+
//
787+
// // Adding back the trim() for 0136 to handle Bug #769
788+
// if (matches.length == 4) renderer = matches[3].trim();
789+
// // Actually, matches.length should always be 4...
790+
//
791+
// } catch (NumberFormatException e) {
792+
// // found a reference to size, but it didn't
793+
// // seem to contain numbers
794+
// final String message =
795+
// "The size of this applet could not automatically be\n" +
796+
// "determined from your code. You'll have to edit the\n" +
797+
// "HTML file to set the size of the applet.\n" +
798+
// "Use only numeric values (not variables) for the size()\n" +
799+
// "command. See the size() reference for an explanation.";
800+
//
801+
// Base.showWarning("Could not find applet size", message, null);
802+
// }
803+
// } // else no size() command found
801804
802805
// Grab the Javadoc-style description from the main code.
803806
String description = "";
@@ -1030,6 +1033,7 @@ public boolean accept(File dir, String name) {
10301033
10311034
return true;
10321035
}
1036+
*/
10331037

10341038

10351039
/**
@@ -1257,13 +1261,13 @@ private boolean exportApplication(File destFolder,
12571261
jarListVector.add(sketch.getName() + ".jar");
12581262

12591263

1260-
/// add core.jar to the jar destination folder
1261-
1262-
File bagelJar = Base.isMacOS() ?
1263-
Base.getContentFile("core.jar") :
1264-
Base.getContentFile("lib/core.jar");
1265-
Base.copyFile(bagelJar, new File(jarFolder, "core.jar"));
1266-
jarListVector.add("core.jar");
1264+
// /// add core.jar to the jar destination folder
1265+
//
1266+
// File bagelJar = Base.isMacOS() ?
1267+
// Base.getContentFile("core.jar") :
1268+
// Base.getContentFile("lib/core.jar");
1269+
// Base.copyFile(bagelJar, new File(jarFolder, "core.jar"));
1270+
// jarListVector.add("core.jar");
12671271

12681272

12691273
/// add contents of 'library' folders to the export

app/src/processing/mode/java/JavaEditor.java

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ public String getCommentPrefix() {
196196
* Made synchronized to (hopefully) avoid problems of people
197197
* hitting export twice, quickly, and horking things up.
198198
*/
199+
/*
199200
public void handleExportApplet() {
200201
if (handleExportCheckModified()) {
201202
toolbar.activate(JavaToolbar.EXPORT);
@@ -215,17 +216,7 @@ public void handleExportApplet() {
215216
toolbar.deactivate(JavaToolbar.EXPORT);
216217
}
217218
}
218-
219-
220-
// public void handleExportApplication() {
221-
// toolbar.activate(Toolbar.EXPORT);
222-
// try {
223-
// jmode.handleExportApplication();
224-
// } catch (Exception e) {
225-
// statusError(e);
226-
// }
227-
// toolbar.deactivate(Toolbar.EXPORT);
228-
// }
219+
*/
229220

230221

231222
/**

app/src/processing/mode/java/JavaMode.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,10 @@ public void run() {
222222
// }
223223

224224

225-
public boolean handleExportApplet(Sketch sketch) throws SketchException, IOException {
226-
JavaBuild build = new JavaBuild(sketch);
227-
return build.exportApplet();
228-
}
225+
// public boolean handleExportApplet(Sketch sketch) throws SketchException, IOException {
226+
// JavaBuild build = new JavaBuild(sketch);
227+
// return build.exportApplet();
228+
// }
229229

230230

231231
public boolean handleExportApplication(Sketch sketch) throws SketchException, IOException {

build/build.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
<!-- Libraries required for running processing -->
3030
<fileset dir=".." id="runtime.jars">
3131
<!--<include name="core/library/core.jar" />-->
32-
<include name="core/library" />
3332
<include name="app/pde.jar" />
3433
<include name="app/lib/antlr.jar" />
3534
<include name="app/lib/ecj.jar" />
@@ -345,6 +344,7 @@
345344
</copy>
346345

347346
<copy todir="macosx/work/Processing.app/Contents/Resources/Java">
347+
<fileset dir=".." includes="core/library/**" />
348348
<fileset dir="shared" includes="lib/**" />
349349
<fileset dir="shared" includes="modes/**" />
350350
<fileset file="shared/revisions.txt" />
@@ -458,6 +458,7 @@
458458
<mkdir dir="linux/work" />
459459

460460
<copy todir="linux/work">
461+
<fileset dir=".." includes="core/library/**" />
461462
<fileset dir="shared" includes="lib/**" />
462463
<fileset dir="shared" includes="modes/**" />
463464
<fileset file="shared/revisions.txt" />
@@ -567,6 +568,7 @@ http://www.gnu.org/software/tar/manual/html_section/transform.html
567568
</copy>
568569

569570
<copy todir="windows/work">
571+
<fileset dir=".." includes="core/library/**" />
570572
<fileset dir="shared" includes="lib/**" />
571573
<fileset dir="shared" includes="modes/**" />
572574
<fileset file="shared/revisions.txt" />

build/macosx/template.app/Contents/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
<!-- In 0149, removed /System/Library/Java from the CLASSPATH because
7878
it can cause problems if users have installed weird files there.
7979
http://dev.processing.org/bugs/show_bug.cgi?id=1045 -->
80-
<string>$JAVAROOT/pde.jar:$JAVAROOT/core.jar:$JAVAROOT/ant.jar:$JAVAROOT/ant-launcher.jar:$JAVAROOT/antlr.jar:$JAVAROOT/ecj.jar:$JAVAROOT/jna.jar:$JAVAROOT/quaqua.jar</string>
80+
<string>$JAVAROOT/pde.jar:$JAVAROOT/core/library/core.jar:$JAVAROOT/ant.jar:$JAVAROOT/ant-launcher.jar:$JAVAROOT/antlr.jar:$JAVAROOT/ecj.jar:$JAVAROOT/jna.jar:$JAVAROOT/quaqua.jar</string>
8181

8282
<!-- More properties can be found in http://developer.apple.com/releasenotes/Java/java141/system_properties/chapter_4_section_1.html#//apple_ref/doc/uid/TP30000285 -->
8383
<key>Properties</key>

core/library/export.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
name = OpenGL
55

6-
application.macosx=opengl.jar,jogl.all.jar,gluegen-rt.jar,jogl-all-natives-macosx-universal.jar,gluegen-rt-natives-macosx-universal.jar
7-
application.windows32=opengl.jar,jogl.all.jar,gluegen-rt.jar,jogl-all-natives-windows-i586.jar,gluegen-rt-natives-windows-i586.jar
8-
application.windows64=opengl.jar,jogl.all.jar,gluegen-rt.jar,jogl-all-natives-windows-amd64.jar,gluegen-rt-natives-windows-amd64.jar
9-
application.linux32=opengl.jar,jogl.all.jar,gluegen-rt.jar,jogl-all-natives-linux-i586.jar,gluegen-rt-natives-linux-i586.jar
10-
application.linux64=opengl.jar,jogl.all.jar,gluegen-rt.jar,jogl-all-natives-linux-amd64.jar,gluegen-rt-natives-linux-amd64.jar
6+
application.macosx=core.jar,jogl.all.jar,gluegen-rt.jar,jogl-all-natives-macosx-universal.jar,gluegen-rt-natives-macosx-universal.jar
7+
application.windows32=core.jar,jogl.all.jar,gluegen-rt.jar,jogl-all-natives-windows-i586.jar,gluegen-rt-natives-windows-i586.jar
8+
application.windows64=core.jar,jogl.all.jar,gluegen-rt.jar,jogl-all-natives-windows-amd64.jar,gluegen-rt-natives-windows-amd64.jar
9+
application.linux32=core.jar,jogl.all.jar,gluegen-rt.jar,jogl-all-natives-linux-i586.jar,gluegen-rt-natives-linux-i586.jar
10+
application.linux64=core.jar,jogl.all.jar,gluegen-rt.jar,jogl-all-natives-linux-amd64.jar,gluegen-rt-natives-linux-amd64.jar

java/libraries/dxf/build.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@
88

99
<target name="compile" description="Compile sources">
1010
<condition property="core-built">
11-
<available file="../../../core/core.jar" />
11+
<available file="../../../core/library/core.jar" />
1212
</condition>
13-
<fail unless="core-built" message="Please build the core library first and make sure it sits in ../../../core/core.jar" />
13+
<fail unless="core-built" message="Please build the core library first and make sure it sits in ../../../core/library/core.jar" />
1414

1515
<mkdir dir="bin" />
1616
<javac target="1.5"
1717
srcdir="src" destdir="bin"
1818
encoding="UTF-8"
1919
includeAntRuntime="false"
20-
classpath="../../../core/core.jar" />
20+
classpath="../../../core/library/core.jar" />
2121
</target>
2222

2323
<target name="build" depends="compile" description="Build DXF library">

java/libraries/net/build.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@
88

99
<target name="compile" description="Compile sources">
1010
<condition property="core-built">
11-
<available file="../../../core/core.jar" />
11+
<available file="../../../core/library/core.jar" />
1212
</condition>
13-
<fail unless="core-built" message="Please build the core library first and make sure it sits in ../../../core/core.jar" />
13+
<fail unless="core-built" message="Please build the core library first and make sure it sits in ../../../core/library/core.jar" />
1414

1515
<mkdir dir="bin" />
1616
<javac target="1.5"
1717
srcdir="src" destdir="bin"
1818
encoding="UTF-8"
1919
includeAntRuntime="false"
20-
classpath="../../../core/core.jar" />
20+
classpath="../../../core/library/core.jar" />
2121
</target>
2222

2323
<target name="build" depends="compile" description="Build net library">

0 commit comments

Comments
 (0)