mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
making further progress on build process
This commit is contained in:
+2
-2
@@ -71,10 +71,10 @@
|
||||
|
||||
<target name="compile" depends="preproc" description="Compile sources">
|
||||
<condition property="core-built">
|
||||
<available file="../core/core.jar" />
|
||||
<available file="../core/library/core.jar" />
|
||||
</condition>
|
||||
<fail unless="core-built"
|
||||
message="Please build the core library first and make sure it sits in ../core/core.jar" />
|
||||
message="Please build the core library first and make sure it sits in ../core/library/core.jar" />
|
||||
|
||||
<mkdir dir="bin" />
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/*
|
||||
package processing.app.tools;
|
||||
|
||||
import java.io.*;
|
||||
@@ -153,4 +154,5 @@ public class ExportExamples implements Tool {
|
||||
public String getMenuTitle() {
|
||||
return "Export Examples";
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
@@ -397,6 +397,8 @@ public class JavaBuild {
|
||||
// grab the imports from the code just preproc'd
|
||||
|
||||
importedLibraries = new ArrayList<Library>();
|
||||
importedLibraries.add(mode.getCoreLibrary());
|
||||
|
||||
// System.out.println("extra imports: " + result.extraImports);
|
||||
for (String item : result.extraImports) {
|
||||
// remove things up to the last dot
|
||||
@@ -696,14 +698,17 @@ public class JavaBuild {
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
protected boolean exportApplet() throws SketchException, IOException {
|
||||
return exportApplet(new File(sketch.getFolder(), "applet"));
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Handle export to applet.
|
||||
*/
|
||||
/*
|
||||
public boolean exportApplet(File appletFolder) throws SketchException, IOException {
|
||||
mode.prepareExportFolder(appletFolder);
|
||||
|
||||
@@ -767,37 +772,35 @@ public class JavaBuild {
|
||||
// }
|
||||
|
||||
|
||||
/*
|
||||
int wide = PApplet.DEFAULT_WIDTH;
|
||||
int high = PApplet.DEFAULT_HEIGHT;
|
||||
String renderer = "";
|
||||
|
||||
String scrubbed = PdePreprocessor.scrubComments(sketch.getCode(0).getProgram());
|
||||
String[] matches = PApplet.match(scrubbed, PdePreprocessor.SIZE_REGEX);
|
||||
|
||||
if (matches != null) {
|
||||
try {
|
||||
wide = Integer.parseInt(matches[1]);
|
||||
high = Integer.parseInt(matches[2]);
|
||||
|
||||
// Adding back the trim() for 0136 to handle Bug #769
|
||||
if (matches.length == 4) renderer = matches[3].trim();
|
||||
// Actually, matches.length should always be 4...
|
||||
|
||||
} catch (NumberFormatException e) {
|
||||
// found a reference to size, but it didn't
|
||||
// seem to contain numbers
|
||||
final String message =
|
||||
"The size of this applet could not automatically be\n" +
|
||||
"determined from your code. You'll have to edit the\n" +
|
||||
"HTML file to set the size of the applet.\n" +
|
||||
"Use only numeric values (not variables) for the size()\n" +
|
||||
"command. See the size() reference for an explanation.";
|
||||
|
||||
Base.showWarning("Could not find applet size", message, null);
|
||||
}
|
||||
} // else no size() command found
|
||||
*/
|
||||
// int wide = PApplet.DEFAULT_WIDTH;
|
||||
// int high = PApplet.DEFAULT_HEIGHT;
|
||||
// String renderer = "";
|
||||
//
|
||||
// String scrubbed = PdePreprocessor.scrubComments(sketch.getCode(0).getProgram());
|
||||
// String[] matches = PApplet.match(scrubbed, PdePreprocessor.SIZE_REGEX);
|
||||
//
|
||||
// if (matches != null) {
|
||||
// try {
|
||||
// wide = Integer.parseInt(matches[1]);
|
||||
// high = Integer.parseInt(matches[2]);
|
||||
//
|
||||
// // Adding back the trim() for 0136 to handle Bug #769
|
||||
// if (matches.length == 4) renderer = matches[3].trim();
|
||||
// // Actually, matches.length should always be 4...
|
||||
//
|
||||
// } catch (NumberFormatException e) {
|
||||
// // found a reference to size, but it didn't
|
||||
// // seem to contain numbers
|
||||
// final String message =
|
||||
// "The size of this applet could not automatically be\n" +
|
||||
// "determined from your code. You'll have to edit the\n" +
|
||||
// "HTML file to set the size of the applet.\n" +
|
||||
// "Use only numeric values (not variables) for the size()\n" +
|
||||
// "command. See the size() reference for an explanation.";
|
||||
//
|
||||
// Base.showWarning("Could not find applet size", message, null);
|
||||
// }
|
||||
// } // else no size() command found
|
||||
|
||||
// Grab the Javadoc-style description from the main code.
|
||||
String description = "";
|
||||
@@ -1030,6 +1033,7 @@ public class JavaBuild {
|
||||
|
||||
return true;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
@@ -1257,13 +1261,13 @@ public class JavaBuild {
|
||||
jarListVector.add(sketch.getName() + ".jar");
|
||||
|
||||
|
||||
/// add core.jar to the jar destination folder
|
||||
|
||||
File bagelJar = Base.isMacOS() ?
|
||||
Base.getContentFile("core.jar") :
|
||||
Base.getContentFile("lib/core.jar");
|
||||
Base.copyFile(bagelJar, new File(jarFolder, "core.jar"));
|
||||
jarListVector.add("core.jar");
|
||||
// /// add core.jar to the jar destination folder
|
||||
//
|
||||
// File bagelJar = Base.isMacOS() ?
|
||||
// Base.getContentFile("core.jar") :
|
||||
// Base.getContentFile("lib/core.jar");
|
||||
// Base.copyFile(bagelJar, new File(jarFolder, "core.jar"));
|
||||
// jarListVector.add("core.jar");
|
||||
|
||||
|
||||
/// add contents of 'library' folders to the export
|
||||
|
||||
@@ -196,6 +196,7 @@ public class JavaEditor extends Editor {
|
||||
* Made synchronized to (hopefully) avoid problems of people
|
||||
* hitting export twice, quickly, and horking things up.
|
||||
*/
|
||||
/*
|
||||
public void handleExportApplet() {
|
||||
if (handleExportCheckModified()) {
|
||||
toolbar.activate(JavaToolbar.EXPORT);
|
||||
@@ -215,17 +216,7 @@ public class JavaEditor extends Editor {
|
||||
toolbar.deactivate(JavaToolbar.EXPORT);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// public void handleExportApplication() {
|
||||
// toolbar.activate(Toolbar.EXPORT);
|
||||
// try {
|
||||
// jmode.handleExportApplication();
|
||||
// } catch (Exception e) {
|
||||
// statusError(e);
|
||||
// }
|
||||
// toolbar.deactivate(Toolbar.EXPORT);
|
||||
// }
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -222,10 +222,10 @@ public class JavaMode extends Mode {
|
||||
// }
|
||||
|
||||
|
||||
public boolean handleExportApplet(Sketch sketch) throws SketchException, IOException {
|
||||
JavaBuild build = new JavaBuild(sketch);
|
||||
return build.exportApplet();
|
||||
}
|
||||
// public boolean handleExportApplet(Sketch sketch) throws SketchException, IOException {
|
||||
// JavaBuild build = new JavaBuild(sketch);
|
||||
// return build.exportApplet();
|
||||
// }
|
||||
|
||||
|
||||
public boolean handleExportApplication(Sketch sketch) throws SketchException, IOException {
|
||||
|
||||
+3
-1
@@ -29,7 +29,6 @@
|
||||
<!-- Libraries required for running processing -->
|
||||
<fileset dir=".." id="runtime.jars">
|
||||
<!--<include name="core/library/core.jar" />-->
|
||||
<include name="core/library" />
|
||||
<include name="app/pde.jar" />
|
||||
<include name="app/lib/antlr.jar" />
|
||||
<include name="app/lib/ecj.jar" />
|
||||
@@ -345,6 +344,7 @@
|
||||
</copy>
|
||||
|
||||
<copy todir="macosx/work/Processing.app/Contents/Resources/Java">
|
||||
<fileset dir=".." includes="core/library/**" />
|
||||
<fileset dir="shared" includes="lib/**" />
|
||||
<fileset dir="shared" includes="modes/**" />
|
||||
<fileset file="shared/revisions.txt" />
|
||||
@@ -458,6 +458,7 @@
|
||||
<mkdir dir="linux/work" />
|
||||
|
||||
<copy todir="linux/work">
|
||||
<fileset dir=".." includes="core/library/**" />
|
||||
<fileset dir="shared" includes="lib/**" />
|
||||
<fileset dir="shared" includes="modes/**" />
|
||||
<fileset file="shared/revisions.txt" />
|
||||
@@ -567,6 +568,7 @@ http://www.gnu.org/software/tar/manual/html_section/transform.html
|
||||
</copy>
|
||||
|
||||
<copy todir="windows/work">
|
||||
<fileset dir=".." includes="core/library/**" />
|
||||
<fileset dir="shared" includes="lib/**" />
|
||||
<fileset dir="shared" includes="modes/**" />
|
||||
<fileset file="shared/revisions.txt" />
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
<!-- In 0149, removed /System/Library/Java from the CLASSPATH because
|
||||
it can cause problems if users have installed weird files there.
|
||||
http://dev.processing.org/bugs/show_bug.cgi?id=1045 -->
|
||||
<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>
|
||||
<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>
|
||||
|
||||
<!-- 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 -->
|
||||
<key>Properties</key>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
name = OpenGL
|
||||
|
||||
application.macosx=opengl.jar,jogl.all.jar,gluegen-rt.jar,jogl-all-natives-macosx-universal.jar,gluegen-rt-natives-macosx-universal.jar
|
||||
application.windows32=opengl.jar,jogl.all.jar,gluegen-rt.jar,jogl-all-natives-windows-i586.jar,gluegen-rt-natives-windows-i586.jar
|
||||
application.windows64=opengl.jar,jogl.all.jar,gluegen-rt.jar,jogl-all-natives-windows-amd64.jar,gluegen-rt-natives-windows-amd64.jar
|
||||
application.linux32=opengl.jar,jogl.all.jar,gluegen-rt.jar,jogl-all-natives-linux-i586.jar,gluegen-rt-natives-linux-i586.jar
|
||||
application.linux64=opengl.jar,jogl.all.jar,gluegen-rt.jar,jogl-all-natives-linux-amd64.jar,gluegen-rt-natives-linux-amd64.jar
|
||||
application.macosx=core.jar,jogl.all.jar,gluegen-rt.jar,jogl-all-natives-macosx-universal.jar,gluegen-rt-natives-macosx-universal.jar
|
||||
application.windows32=core.jar,jogl.all.jar,gluegen-rt.jar,jogl-all-natives-windows-i586.jar,gluegen-rt-natives-windows-i586.jar
|
||||
application.windows64=core.jar,jogl.all.jar,gluegen-rt.jar,jogl-all-natives-windows-amd64.jar,gluegen-rt-natives-windows-amd64.jar
|
||||
application.linux32=core.jar,jogl.all.jar,gluegen-rt.jar,jogl-all-natives-linux-i586.jar,gluegen-rt-natives-linux-i586.jar
|
||||
application.linux64=core.jar,jogl.all.jar,gluegen-rt.jar,jogl-all-natives-linux-amd64.jar,gluegen-rt-natives-linux-amd64.jar
|
||||
|
||||
@@ -8,16 +8,16 @@
|
||||
|
||||
<target name="compile" description="Compile sources">
|
||||
<condition property="core-built">
|
||||
<available file="../../../core/core.jar" />
|
||||
<available file="../../../core/library/core.jar" />
|
||||
</condition>
|
||||
<fail unless="core-built" message="Please build the core library first and make sure it sits in ../../../core/core.jar" />
|
||||
<fail unless="core-built" message="Please build the core library first and make sure it sits in ../../../core/library/core.jar" />
|
||||
|
||||
<mkdir dir="bin" />
|
||||
<javac target="1.5"
|
||||
srcdir="src" destdir="bin"
|
||||
encoding="UTF-8"
|
||||
includeAntRuntime="false"
|
||||
classpath="../../../core/core.jar" />
|
||||
classpath="../../../core/library/core.jar" />
|
||||
</target>
|
||||
|
||||
<target name="build" depends="compile" description="Build DXF library">
|
||||
|
||||
@@ -8,16 +8,16 @@
|
||||
|
||||
<target name="compile" description="Compile sources">
|
||||
<condition property="core-built">
|
||||
<available file="../../../core/core.jar" />
|
||||
<available file="../../../core/library/core.jar" />
|
||||
</condition>
|
||||
<fail unless="core-built" message="Please build the core library first and make sure it sits in ../../../core/core.jar" />
|
||||
<fail unless="core-built" message="Please build the core library first and make sure it sits in ../../../core/library/core.jar" />
|
||||
|
||||
<mkdir dir="bin" />
|
||||
<javac target="1.5"
|
||||
srcdir="src" destdir="bin"
|
||||
encoding="UTF-8"
|
||||
includeAntRuntime="false"
|
||||
classpath="../../../core/core.jar" />
|
||||
classpath="../../../core/library/core.jar" />
|
||||
</target>
|
||||
|
||||
<target name="build" depends="compile" description="Build net library">
|
||||
|
||||
@@ -8,16 +8,16 @@
|
||||
|
||||
<target name="compile" description="Compile sources">
|
||||
<condition property="core-built">
|
||||
<available file="../../../core/core.jar" />
|
||||
<available file="../../../core/library/core.jar" />
|
||||
</condition>
|
||||
<fail unless="core-built" message="Please build the core library first and make sure it sits in ../../../core/core.jar" />
|
||||
<fail unless="core-built" message="Please build the core library first and make sure it sits in ../../../core/library/core.jar" />
|
||||
|
||||
<mkdir dir="bin" />
|
||||
<javac target="1.5"
|
||||
srcdir="src" destdir="bin"
|
||||
encoding="UTF-8"
|
||||
includeAntRuntime="false"
|
||||
classpath="../../../core/core.jar; library/itext.jar" />
|
||||
classpath="../../../core/library/core.jar; library/itext.jar" />
|
||||
</target>
|
||||
|
||||
<target name="build" depends="compile" description="Build PDF library">
|
||||
|
||||
@@ -8,16 +8,16 @@
|
||||
|
||||
<target name="compile" description="Compile sources">
|
||||
<condition property="core-built">
|
||||
<available file="../../../core/core.jar" />
|
||||
<available file="../../../core/library/core.jar" />
|
||||
</condition>
|
||||
<fail unless="core-built" message="Please build the core library first and make sure it sits in ../../../core/core.jar" />
|
||||
<fail unless="core-built" message="Please build the core library first and make sure it sits in ../../../core/library/core.jar" />
|
||||
|
||||
<mkdir dir="bin" />
|
||||
<javac target="1.5"
|
||||
srcdir="src" destdir="bin"
|
||||
encoding="UTF-8"
|
||||
includeAntRuntime="false"
|
||||
classpath="../../../core/core.jar; library/RXTXcomm.jar" />
|
||||
classpath="../../../core/library/core.jar; library/RXTXcomm.jar" />
|
||||
</target>
|
||||
|
||||
<target name="build" depends="compile" description="Build serial library">
|
||||
|
||||
@@ -8,16 +8,16 @@
|
||||
|
||||
<target name="compile" description="Compile sources">
|
||||
<condition property="core-built">
|
||||
<available file="../../../core/core.jar" />
|
||||
<available file="../../../core/library/core.jar" />
|
||||
</condition>
|
||||
<fail unless="core-built" message="Please build the core library first and make sure it sits in ../../../core/core.jar" />
|
||||
<fail unless="core-built" message="Please build the core library first and make sure it sits in ../../../core/library/core.jar" />
|
||||
|
||||
<mkdir dir="bin" />
|
||||
<javac target="1.5"
|
||||
srcdir="src" destdir="bin"
|
||||
encoding="UTF-8"
|
||||
includeAntRuntime="false"
|
||||
classpath="../../../core/core.jar; library/gstreamer-java.jar; library/jna.jar" />
|
||||
classpath="../../../core/library/core.jar; library/gstreamer-java.jar; library/jna.jar" />
|
||||
</target>
|
||||
|
||||
<target name="build" depends="compile" description="Build video library">
|
||||
|
||||
Reference in New Issue
Block a user