Skip to content

Commit 8a3b2f1

Browse files
committed
preserve file attributes so things don't appear modified; fix some indents lost in tab conversion
1 parent 676bcec commit 8a3b2f1

File tree

3 files changed

+73
-76
lines changed

3 files changed

+73
-76
lines changed

build/build.xml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -388,11 +388,11 @@
388388
message="Do not call assemble from the command line." />
389389

390390
<!-- copy shared tools folder -->
391-
<copy todir="${target.path}/tools">
391+
<copy todir="${target.path}/tools" preservelastmodified="true">
392392
<fileset dir="shared/tools" />
393393
</copy>
394394

395-
<copy todir="${target.path}/modes/java">
395+
<copy todir="${target.path}/modes/java" preservelastmodified="true">
396396
<fileset dir="../java">
397397
<!-- don't include LWJGL, it's not operational -->
398398
<exclude name="libraries/lwjgl/**" />
@@ -403,7 +403,8 @@
403403
</copy>
404404

405405
<!-- get the examples folder, but don't require it to buid -->
406-
<copy todir="${target.path}/modes/java/examples" failonerror="false">
406+
<copy todir="${target.path}/modes/java/examples"
407+
preservelastmodified="true" failonerror="false">
407408
<fileset dir="${examples.dir}" />
408409
</copy>
409410

@@ -643,7 +644,7 @@
643644
<arg line="${jdk.path.macosx}/Contents/Home/jre/lib/jli/libjli.dylib ${jli.path}"/>
644645
</exec>
645646

646-
<copy todir="${contents.dir}/Java">
647+
<copy todir="${contents.dir}/Java" preservelastmodified="true">
647648
<fileset dir=".." includes="core/library/**" /> <!-- why this? -->
648649
<!--<fileset dir="shared" includes="launch4j/**" />-->
649650
<fileset dir="shared" includes="lib/**" />
@@ -785,7 +786,7 @@
785786
<target name="linux-build" depends="ignore-tools, check-linux-arm32, check-linux-arm64, revision-check, linux-check-os, jre-download, subprojects-build, subprojects-build-linux-arm32, subprojects-build-linux-arm64" description="Build Linux version">
786787
<mkdir dir="linux/work" />
787788

788-
<copy todir="linux/work">
789+
<copy todir="linux/work" preservelastmodified="true">
789790
<fileset dir=".." includes="core/library/**" />
790791
<fileset dir="shared" includes="launch4j/**" />
791792
<fileset dir="shared" includes="lib/**" />
@@ -818,7 +819,7 @@
818819
<fileset dir="${launch4j.dir}/bin" includes="windres-*" />
819820
</delete>
820821

821-
<copy todir="linux/work/lib" flatten="true">
822+
<copy todir="linux/work/lib" flatten="true" preservelastmodified="true">
822823
<fileset refid="runtime.jars" />
823824
</copy>
824825

@@ -1073,7 +1074,7 @@
10731074

10741075
<!-- assemble the pde -->
10751076
<mkdir dir="windows/work/lib" />
1076-
<copy todir="windows/work/lib" flatten="true">
1077+
<copy todir="windows/work/lib" flatten="true" preservelastmodified="true">
10771078
<fileset refid="runtime.jars" />
10781079
</copy>
10791080

@@ -1094,7 +1095,7 @@
10941095
<mapper type="flatten"/>
10951096
</unzip>
10961097

1097-
<copy todir="windows/work">
1098+
<copy todir="windows/work" preservelastmodified="true">
10981099
<fileset dir=".." includes="core/library/**" />
10991100
<fileset dir="shared" includes="launch4j/**" />
11001101
<fileset dir="shared" includes="lib/**" />

core/build.xml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@
1515
</target>
1616

1717
<target name="compile" description="Compile" depends="methods-build">
18-
<taskdef name="methods"
19-
classname="PAppletMethods"
18+
<taskdef name="methods"
19+
classname="PAppletMethods"
2020
classpath="methods/methods.jar" />
2121
<methods dir="${basedir}/src/processing/core" recorder="true" />
2222

2323
<!-- Where can I expect to find Java Mode JARs? -->
2424
<property name="java.mode" value="../java/mode/" />
25-
25+
2626
<!-- Check for JDT compiler, since this is likely a PDE build. Using
2727
it allows us to build the PDE with only a JRE on Windows and Linux.
28-
So that the core can be built independently of the PDE,
28+
So that the core can be built independently of the PDE,
2929
use javac (the "modern" compiler) if ecj is not present. -->
3030
<property name="jdt.jar" value="${java.mode}/org.eclipse.jdt.core.jar" />
31-
<condition property="build.compiler"
31+
<condition property="build.compiler"
3232
value="org.eclipse.jdt.core.JDTCompilerAdapter"
3333
else="modern">
3434
<available file="${jdt.jar}" />
@@ -51,8 +51,8 @@
5151
includeAntRuntime="false"
5252
debug="true"
5353
destdir="bin"
54-
classpath="apple.jar;
55-
library/jogl-all.jar;
54+
classpath="apple.jar;
55+
library/jogl-all.jar;
5656
library/gluegen-rt.jar"
5757
nowarn="true">
5858
<!-- kinda gross, but if not using the JDT, this just ignored anyway -->
@@ -61,23 +61,24 @@
6161
<include name="processing/**" />
6262
<exclude name="processing/javafx/**" if="fx.unavailable" />
6363
</javac>
64-
64+
6565
<!-- Copy the jnilib to the bin folder so it's included. -->
66-
<copy todir="bin/japplemenubar"
67-
file="src/japplemenubar/libjAppleMenuBar.jnilib" />
66+
<copy todir="bin/japplemenubar"
67+
file="src/japplemenubar/libjAppleMenuBar.jnilib"
68+
preservelastmodified="true" />
6869

6970
<!-- Copy shaders to bin. (Eclipse does this automatically.) -->
70-
<copy todir="bin">
71+
<copy todir="bin" preservelastmodified="true">
7172
<fileset dir="src">
7273
<include name="processing/opengl/shaders/*.glsl" />
7374
<include name="processing/opengl/cursors/*.png" />
7475
<include name="icon/*.png" />
7576
</fileset>
7677
</copy>
77-
</target>
78+
</target>
7879

7980
<target name="build" depends="compile" description="Build core library">
8081
<jar basedir="bin" destfile="library/core.jar" />
8182
</target>
82-
83+
8384
</project>

java/build.xml

Lines changed: 50 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<?xml version="1.0"?>
22
<project name="Java Mode" default="build">
33

4-
<property name="generated"
5-
value="${basedir}/generated/processing/mode/java/preproc" />
4+
<property name="generated"
5+
value="${basedir}/generated/processing/mode/java/preproc" />
66
<mkdir dir="${generated}" />
77

8-
<property name="grammars"
9-
value="${basedir}/src/processing/mode/java/preproc" />
8+
<property name="grammars"
9+
value="${basedir}/src/processing/mode/java/preproc" />
1010

11-
<property name="antlr_jar"
12-
value="${basedir}/mode/antlr.jar" />
11+
<property name="antlr_jar"
12+
value="${basedir}/mode/antlr.jar" />
1313

1414
<property name="mode_jar"
1515
value="${basedir}/mode/JavaMode.jar" />
@@ -23,12 +23,12 @@
2323
<delete file="${mode_jar}" />
2424
<delete>
2525
<fileset dir="${generated}">
26-
<include name="*.java" />
27-
<include name="*.tokens" />
28-
<include name="*.txt" />
29-
<include name="*.g" />
30-
<include name="*.smap" />
31-
<include name="*.properties" />
26+
<include name="*.java" />
27+
<include name="*.tokens" />
28+
<include name="*.txt" />
29+
<include name="*.g" />
30+
<include name="*.smap" />
31+
<include name="*.properties" />
3232
</fileset>
3333
</delete>
3434
</target>
@@ -37,9 +37,9 @@
3737
<antlr target="${grammars}/java15.g" outputdirectory="${generated}">
3838
<classpath path="${antlr_jar}" />
3939
</antlr>
40-
<antlr target="${grammars}/pde.g"
41-
outputdirectory="${generated}"
42-
glib="${grammars}/java15.g">
40+
<antlr target="${grammars}/pde.g"
41+
outputdirectory="${generated}"
42+
glib="${grammars}/java15.g">
4343
<classpath path="${antlr_jar}" />
4444
</antlr>
4545

@@ -49,28 +49,24 @@
4949
<property name="uc" value="@SuppressWarnings({ &quot;unused&quot;, &quot;cast&quot; })${line.separator}" />
5050

5151
<!-- need to match against the previous line so that we don't re-add -->
52-
<replaceregexp
53-
file="generated/processing/mode/java/preproc/JavaLexer.java"
54-
match="(\n\n)(public class JavaLexer .*)"
55-
replace="\1${uucr}\2">
52+
<replaceregexp file="generated/processing/mode/java/preproc/JavaLexer.java"
53+
match="(\n\n)(public class JavaLexer .*)"
54+
replace="\1${uucr}\2">
5655
</replaceregexp>
5756

58-
<replaceregexp
59-
file="generated/processing/mode/java/preproc/JavaRecognizer.java"
60-
match="(\*/\n)(public class JavaRecognizer .*)"
61-
replace="\1${uc}\2">
57+
<replaceregexp file="generated/processing/mode/java/preproc/JavaRecognizer.java"
58+
match="(\*/\n)(public class JavaRecognizer .*)"
59+
replace="\1${uc}\2">
6260
</replaceregexp>
6361

64-
<replaceregexp
65-
file="generated/processing/mode/java/preproc/PdeLexer.java"
66-
match="(\n\n)(public class PdeLexer .*)"
67-
replace="\1${uucr}\2">
62+
<replaceregexp file="generated/processing/mode/java/preproc/PdeLexer.java"
63+
match="(\n\n)(public class PdeLexer .*)"
64+
replace="\1${uucr}\2">
6865
</replaceregexp>
6966

70-
<replaceregexp
71-
file="generated/processing/mode/java/preproc/PdeRecognizer.java"
72-
match="(\n\n)(public class PdeRecognizer .*)"
73-
replace="\1${uc}\2">
67+
<replaceregexp file="generated/processing/mode/java/preproc/PdeRecognizer.java"
68+
match="(\n\n)(public class PdeRecognizer .*)"
69+
replace="\1${uc}\2">
7470
</replaceregexp>
7571
<!-- end of workaround for old antlr -->
7672
</target>
@@ -86,38 +82,37 @@
8682
</condition>
8783
<fail unless="app-built" message="Please build app first and make sure it is located at ../app/pde.jar" />
8884

89-
9085
<mkdir dir="bin" />
91-
86+
9287
<!-- in some cases, pde.jar was not getting built
93-
https://github.com/processing/processing/issues/1792 -->
88+
https://github.com/processing/processing/issues/1792 -->
9489
<delete file="${mode_jar}" />
9590

9691
<!-- env used to set classpath below -->
9792
<property environment="env" />
9893

9994
<javac source="1.8"
100-
target="1.8"
101-
destdir="bin"
102-
excludes="**/tools/format/**"
103-
encoding="UTF-8"
104-
includeAntRuntime="false"
105-
classpath="../core/library/core.jar;
95+
target="1.8"
96+
destdir="bin"
97+
excludes="**/tools/format/**"
98+
encoding="UTF-8"
99+
includeAntRuntime="false"
100+
classpath="../core/library/core.jar;
106101
107102
../app/pde.jar;
108-
../app/lib/ant.jar;
109-
../app/lib/ant-launcher.jar;
110-
../app/lib/apple.jar;
111-
../app/lib/jna.jar;
112-
../app/lib/jna-platform.jar;
113-
114-
mode/antlr.jar;
115-
mode/classpath-explorer-1.0.jar;
103+
../app/lib/ant.jar;
104+
../app/lib/ant-launcher.jar;
105+
../app/lib/apple.jar;
106+
../app/lib/jna.jar;
107+
../app/lib/jna-platform.jar;
108+
109+
mode/antlr.jar;
110+
mode/classpath-explorer-1.0.jar;
116111
mode/jsoup-1.7.1.jar;
117-
mode/org.netbeans.swing.outline.jar;
112+
mode/org.netbeans.swing.outline.jar;
118113
119-
mode/jdi.jar;
120-
mode/jdimodel.jar;
114+
mode/jdi.jar;
115+
mode/jdimodel.jar;
121116
122117
mode/com.ibm.icu.jar;
123118
@@ -130,12 +125,12 @@
130125
mode/org.eclipse.jdt.core.jar;
131126
mode/org.eclipse.osgi.jar;
132127
mode/org.eclipse.text.jar"
133-
debug="on"
134-
nowarn="true"
135-
compiler="org.eclipse.jdt.core.JDTCompilerAdapter">
128+
debug="on"
129+
nowarn="true"
130+
compiler="org.eclipse.jdt.core.JDTCompilerAdapter">
136131
<src path="src" />
137132
<src path="generated" />
138-
<compilerclasspath path="mode/org.eclipse.jdt.core.jar;
133+
<compilerclasspath path="mode/org.eclipse.jdt.core.jar;
139134
mode/jdtCompilerAdapter.jar" />
140135
</javac>
141136
</target>

0 commit comments

Comments
 (0)