diff --git a/apps/desktopgui/build.xml b/apps/desktopgui/build.xml index 598027900b872460b795fc3a1e1b94469bde6c17..7e25f3897757cb3ac006c2492c7707751621e56d 100644 --- a/apps/desktopgui/build.xml +++ b/apps/desktopgui/build.xml @@ -6,7 +6,7 @@ <property name="dist" location="dist"/> <property name="jar" value="desktopgui.jar"/> <property name="resources" value="resources"/> - <property name="javadoc" value="javadoc"/> + <property name="javadoc" value="javadoc"/> <property name="javac.compilerargs" value=""/> <property name="javac.version" value="1.6" /> <property name="require.gettext" value="true" /> @@ -17,9 +17,7 @@ <target name="init"> <mkdir dir="${build}"/> - <mkdir dir="${build}/${resources}"/> - <mkdir dir="${build}/${javadoc}"/> - <mkdir dir="${dist}"/> + <mkdir dir="${dist}"/> </target> <target name="clean"> @@ -27,35 +25,39 @@ <delete dir="${dist}"/> </target> - <target name="compile" depends="init"> + <target name="compile" depends="init"> <javac debug="true" deprecation="on" source="${javac.version}" target="${javac.version}" includeAntRuntime="false" srcdir="${src}" destdir="${build}"> - <compilerarg line="${javac.compilerargs}" /> - <classpath> - <pathelement location="../../core/java/build/i2p.jar" /> - <pathelement location="../../installer/lib/wrapper/all/wrapper.jar" /> - <pathelement location="../../router/java/build/router.jar" /> - </classpath> - </javac> - <copy todir="${build}/desktopgui/${resources}"> - <fileset dir="${resources}" /> - </copy> - </target> + <compilerarg line="${javac.compilerargs}" /> + <classpath> + <pathelement location="../../core/java/build/i2p.jar" /> + <pathelement location="../../installer/lib/wrapper/all/wrapper.jar" /> + <pathelement location="../../router/java/build/router.jar" /> + </classpath> + </javac> + <copy todir="${build}/desktopgui/${resources}"> + <fileset dir="${resources}" /> + </copy> + </target> - <target name="bundle" unless="no.bundle"> - <exec executable="sh" osfamily="unix" failifexecutionfails="true" failonerror="${require.gettext}" > - <env key="JAVA_HOME" value="${java.home}" /> - <arg value="./bundle-messages.sh" /> - </exec> - <exec executable="sh" osfamily="mac" failifexecutionfails="true" failonerror="${require.gettext}" > - <arg value="./bundle-messages.sh" /> - </exec> - <!-- multi-lang is optional --> - <exec executable="sh" osfamily="windows" failifexecutionfails="false" > - <arg value="./bundle-messages.sh" /> - </exec> - </target> + <target name="bundle" unless="no.bundle"> + <exec executable="sh" osfamily="unix" failifexecutionfails="true" failonerror="${require.gettext}" > + <env key="JAVA_HOME" value="${java.home}" /> + <arg value="./bundle-messages.sh" /> + </exec> + <exec executable="sh" osfamily="mac" failifexecutionfails="true" failonerror="${require.gettext}" > + <arg value="./bundle-messages.sh" /> + </exec> + <exec executable="sh" osfamily="windows" failifexecutionfails="false" > + <arg value="./bundle-messages.sh" /> + </exec> + <javac source="${javac.version}" target="${javac.version}" + includeAntRuntime="false" + srcdir="${build}/messages-src" destdir="${build}"> + <compilerarg line="${javac.compilerargs}" /> + </javac> + </target> <target name="listChangedFiles" depends="jarUpToDate" if="shouldListChanges" > <exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" > @@ -74,7 +76,7 @@ <target name="jar" depends="compile, bundle, listChangedFiles" unless="jar.uptodate" > <!-- set if unset --> <property name="workspace.changes.tr" value="" /> - <jar basedir="${build}" destfile="${dist}/${jar}"> + <jar basedir="${build}" excludes="messages-src/**" destfile="${dist}/${jar}"> <manifest> <attribute name="Main-Class" value="net.i2p.desktopgui.Main"/> <attribute name="Build-Date" value="${build.timestamp}" /> diff --git a/apps/desktopgui/bundle-messages.sh b/apps/desktopgui/bundle-messages.sh index 6823dde03e235b138b363af701035ce6e19b3a88..8654607560be4c52cd923bcfcb489da88ed9078f 100644 --- a/apps/desktopgui/bundle-messages.sh +++ b/apps/desktopgui/bundle-messages.sh @@ -106,7 +106,13 @@ do echo "Generating ${CLASS}_$LG ResourceBundle..." # convert to class files in build - msgfmt --java --statistics -r $CLASS -l $LG -d build $i + TD=build/messages-src-tmp + TDX=$TD/net/i2p/desktopgui + TD2=build/messages-src + TDY=$TD2/net/i2p/desktopgui + rm -rf $TD + mkdir -p $TD $TDY + msgfmt --java --statistics --source -r $CLASS -l $LG -d $TD $i if [ $? -ne 0 ] then echo "ERROR - msgfmt failed on ${i}, not updating translations" @@ -115,6 +121,8 @@ do RC=1 break fi + mv $TDX/messages_$LG.java $TDY + rm -rf $TD fi done rm -f $TMPFILE diff --git a/apps/i2psnark/java/build.xml b/apps/i2psnark/java/build.xml index ec0e5e7e8615b43a4a035a23609f32d917f486c2..31f3805a1891185de555f6116598d3feebe6cf90 100644 --- a/apps/i2psnark/java/build.xml +++ b/apps/i2psnark/java/build.xml @@ -150,6 +150,11 @@ <exec executable="sh" osfamily="windows" failifexecutionfails="false" > <arg value="./bundle-messages.sh" /> </exec> + <javac source="${javac.version}" target="${javac.version}" + includeAntRuntime="false" + srcdir="build/messages-src" destdir="build/obj"> + <compilerarg line="${javac.compilerargs}" /> + </javac> </target> <target name="poupdate" depends="builddep, compile"> diff --git a/apps/i2psnark/java/bundle-messages.sh b/apps/i2psnark/java/bundle-messages.sh index 7ef207a6d38500f49af9714d76f45326ae3d403b..adbacb45a65859f6a92a2520d8c15abf1ff275f4 100755 --- a/apps/i2psnark/java/bundle-messages.sh +++ b/apps/i2psnark/java/bundle-messages.sh @@ -97,7 +97,13 @@ do echo "Generating ${CLASS}_$LG ResourceBundle..." # convert to class files in build/obj - msgfmt --java --statistics -r $CLASS -l $LG -d build/obj $i + TD=build/messages-src-tmp + TDX=$TD/org/klomp/snark/web + TD2=build/messages-src + TDY=$TD2/org/klomp/snark/web + rm -rf $TD + mkdir -p $TD $TDY + msgfmt --java --statistics --source -r $CLASS -l $LG -d $TD $i if [ $? -ne 0 ] then echo "ERROR - msgfmt failed on ${i}, not updating translations" @@ -106,6 +112,8 @@ do RC=1 break fi + mv $TDX/messages_$LG.java $TDY + rm -rf $TD fi done rm -f $TMPFILE diff --git a/apps/i2ptunnel/java/build.xml b/apps/i2ptunnel/java/build.xml index 9c86a7ae19b98a5fc404ab7114dfab7c67858db6..7f3833c76b4c622ea4d1987c8d8ea03b57a4ae3e 100644 --- a/apps/i2ptunnel/java/build.xml +++ b/apps/i2ptunnel/java/build.xml @@ -136,6 +136,11 @@ <exec executable="sh" osfamily="windows" failifexecutionfails="false" > <arg value="./bundle-messages.sh" /> </exec> + <javac source="${javac.version}" target="${javac.version}" + includeAntRuntime="false" + srcdir="build/messages-src" destdir="../jsp/WEB-INF/classes"> + <compilerarg line="${javac.compilerargs}" /> + </javac> </target> <target name="poupdate" depends="compile, precompilejsp"> @@ -169,6 +174,11 @@ <exec executable="sh" osfamily="windows" failifexecutionfails="false" > <arg value="./bundle-messages-proxy.sh" /> </exec> + <javac source="${javac.version}" target="${javac.version}" + includeAntRuntime="false" + srcdir="build/messages-proxy-src" destdir="build/obj"> + <compilerarg line="${javac.compilerargs}" /> + </javac> </target> <target name="extractProxyTags"> diff --git a/apps/i2ptunnel/java/bundle-messages-proxy.sh b/apps/i2ptunnel/java/bundle-messages-proxy.sh index a777a5eed954039a22017145fdd4592d598077a6..ac31340f79687547c8162092fa75282cb4cfaa56 100755 --- a/apps/i2ptunnel/java/bundle-messages-proxy.sh +++ b/apps/i2ptunnel/java/bundle-messages-proxy.sh @@ -99,7 +99,13 @@ do echo "Generating ${CLASS}_$LG ResourceBundle..." # convert to class files in build/obj - msgfmt --java --statistics -r $CLASS -l $LG -d build/obj $i + TD=build/messages-proxy-src-tmp + TDX=$TD/net/i2p/i2ptunnel/proxy + TD2=build/messages-proxy-src + TDY=$TD2/net/i2p/i2ptunnel/proxy + rm -rf $TD + mkdir -p $TD $TDY + msgfmt --java --statistics --source -r $CLASS -l $LG -d $TD $i if [ $? -ne 0 ] then echo "ERROR - msgfmt failed on ${i}, not updating translations" @@ -108,6 +114,8 @@ do RC=1 break fi + mv $TDX/messages_$LG.java $TDY + rm -rf $TD fi done rm -f $TMPFILE diff --git a/apps/i2ptunnel/java/bundle-messages.sh b/apps/i2ptunnel/java/bundle-messages.sh index 0b426cb4d25ba24dccdc9de847fe12f5b7a3cbe5..00f26b712c2bae434b0561a4c11a9ada05095138 100755 --- a/apps/i2ptunnel/java/bundle-messages.sh +++ b/apps/i2ptunnel/java/bundle-messages.sh @@ -98,7 +98,13 @@ do echo "Generating ${CLASS}_$LG ResourceBundle..." # convert to class files in build/obj - msgfmt --java --statistics -r $CLASS -l $LG -d ../jsp/WEB-INF/classes $i + TD=build/messages-src-tmp + TDX=$TD/net/i2p/i2ptunnel/web + TD2=build/messages-src + TDY=$TD2/net/i2p/i2ptunnel/web + rm -rf $TD + mkdir -p $TD $TDY + msgfmt --java --statistics --source -r $CLASS -l $LG -d $TD $i if [ $? -ne 0 ] then echo "ERROR - msgfmt failed on ${i}, not updating translations" @@ -107,6 +113,8 @@ do RC=1 break fi + mv $TDX/messages_$LG.java $TDY + rm -rf $TD fi done rm -f $TMPFILE diff --git a/apps/ministreaming/java/build.xml b/apps/ministreaming/java/build.xml index 14f729446b29c3f15be233bd9f3601002ed59292..c3aaf4a55b227cd9ab70e14027f661b0ba017762 100644 --- a/apps/ministreaming/java/build.xml +++ b/apps/ministreaming/java/build.xml @@ -110,6 +110,11 @@ <exec executable="sh" osfamily="windows" failifexecutionfails="false" > <arg value="./bundle-messages.sh" /> </exec> + <javac source="${javac.version}" target="${javac.version}" + includeAntRuntime="false" + srcdir="build/messages-src" destdir="build/obj"> + <compilerarg line="${javac.compilerargs}" /> + </javac> </target> <target name="poupdate" depends="builddep, compile"> diff --git a/apps/ministreaming/java/bundle-messages.sh b/apps/ministreaming/java/bundle-messages.sh index 140efc61e13cd4055880713468f89f4e9b44d507..3c9103fd9308efdf7d00bc7a66166e7ccc218353 100755 --- a/apps/ministreaming/java/bundle-messages.sh +++ b/apps/ministreaming/java/bundle-messages.sh @@ -97,7 +97,13 @@ do echo "Generating ${CLASS}_$LG ResourceBundle..." # convert to class files in build/obj - msgfmt --java --statistics -r $CLASS -l $LG -d build/obj $i + TD=build/messages-src-tmp + TDX=$TD/net/i2p/client/streaming + TD2=build/messages-src + TDY=$TD2/net/i2p/client/streaming + rm -rf $TD + mkdir -p $TD $TDY + msgfmt --java --statistics --source -r $CLASS -l $LG -d $TD $i if [ $? -ne 0 ] then echo "ERROR - msgfmt failed on ${i}, not updating translations" @@ -106,6 +112,8 @@ do RC=1 break fi + mv $TDX/messages_$LG.java $TDY + rm -rf $TD fi done rm -f $TMPFILE diff --git a/apps/routerconsole/java/build.xml b/apps/routerconsole/java/build.xml index a5bfe58f74b1041a212c2189974428c4cbe52c5a..f2e7166089f40d38249e6cd39c7a04367c916150 100644 --- a/apps/routerconsole/java/build.xml +++ b/apps/routerconsole/java/build.xml @@ -158,6 +158,11 @@ <exec executable="sh" osfamily="windows" failifexecutionfails="false" > <arg value="./bundle-messages.sh" /> </exec> + <javac source="${javac.version}" target="${javac.version}" + includeAntRuntime="false" + srcdir="build/messages-src" destdir="build/obj"> + <compilerarg line="${javac.compilerargs}" /> + </javac> <!-- jar again to get the latest messages_*.class files --> <jar destfile="./build/routerconsole.jar" basedir="./build/obj" includes="**/*.class" update="true" /> </target> @@ -204,6 +209,11 @@ <exec executable="sh" osfamily="windows" failifexecutionfails="false" > <arg value="./bundle-messages-news.sh" /> </exec> + <javac source="${javac.version}" target="${javac.version}" + includeAntRuntime="false" + srcdir="build/messages-news-src" destdir="build/obj"> + <compilerarg line="${javac.compilerargs}" /> + </javac> </target> <target name="bundle-countries" unless="no.bundle"> @@ -217,6 +227,11 @@ <exec executable="sh" osfamily="windows" failifexecutionfails="false" > <arg value="./bundle-messages-countries.sh" /> </exec> + <javac source="${javac.version}" target="${javac.version}" + includeAntRuntime="false" + srcdir="build/messages-countries-src" destdir="build/obj"> + <compilerarg line="${javac.compilerargs}" /> + </javac> </target> <target name="extractProxyTags"> diff --git a/apps/routerconsole/java/bundle-messages-countries.sh b/apps/routerconsole/java/bundle-messages-countries.sh index 23588e440f92764d8642ebeef1d55f31092c0606..77045ddadbbeb7d19c42e0dade7ca98d16f4a374 100755 --- a/apps/routerconsole/java/bundle-messages-countries.sh +++ b/apps/routerconsole/java/bundle-messages-countries.sh @@ -113,7 +113,13 @@ do echo "Generating ${CLASS}_$LG ResourceBundle..." # convert to class files in build/obj - msgfmt --java --statistics -r $CLASS -l $LG -d build/obj $i + TD=build/messages-countries-src-tmp + TDX=$TD/net/i2p/router/countries + TD2=build/messages-countries-src + TDY=$TD2/net/i2p/router/countries + rm -rf $TD + mkdir -p $TD $TDY + msgfmt --java --statistics --source -r $CLASS -l $LG -d $TD $i if [ $? -ne 0 ] then echo "ERROR - msgfmt failed on ${i}, not updating translations" @@ -122,6 +128,8 @@ do RC=1 break fi + mv $TDX/messages_$LG.java $TDY + rm -rf $TD fi done rm -f $TMPFILE diff --git a/apps/routerconsole/java/bundle-messages-news.sh b/apps/routerconsole/java/bundle-messages-news.sh index 759a3137b5319781bd94998ed7aa0d3ef435e3da..22137d1f15646be38005dc563ac3d841db85ae80 100755 --- a/apps/routerconsole/java/bundle-messages-news.sh +++ b/apps/routerconsole/java/bundle-messages-news.sh @@ -99,7 +99,13 @@ do echo "Generating ${CLASS}_$LG ResourceBundle..." # convert to class files in build/obj - msgfmt --java --statistics -r $CLASS -l $LG -d build/obj $i + TD=build/messages-news-src-tmp + TDX=$TD/net/i2p/router/news + TD2=build/messages-news-src + TDY=$TD2/net/i2p/router/news + rm -rf $TD + mkdir -p $TD $TDY + msgfmt --java --statistics --source -r $CLASS -l $LG -d $TD $i if [ $? -ne 0 ] then echo "ERROR - msgfmt failed on ${i}, not updating translations" @@ -108,6 +114,8 @@ do RC=1 break fi + mv $TDX/messages_$LG.java $TDY + rm -rf $TD fi done rm -f $TMPFILE diff --git a/apps/routerconsole/java/bundle-messages.sh b/apps/routerconsole/java/bundle-messages.sh index dd100561ba7e2f499e7ac3006cefb28a9941560a..2f213752459042bafec3373b52dd73fd7eecf8f5 100755 --- a/apps/routerconsole/java/bundle-messages.sh +++ b/apps/routerconsole/java/bundle-messages.sh @@ -126,7 +126,13 @@ do echo "Generating ${CLASS}_$LG ResourceBundle..." # convert to class files in build/obj - msgfmt --java --statistics -r $CLASS -l $LG -d build/obj $i + TD=build/messages-src-tmp + TDX=$TD/net/i2p/router/web + TD2=build/messages-src + TDY=$TD2/net/i2p/router/web + rm -rf $TD + mkdir -p $TD $TDY + msgfmt --java --statistics --source -r $CLASS -l $LG -d $TD $i if [ $? -ne 0 ] then echo "ERROR - msgfmt failed on ${i}, not updating translations" @@ -135,6 +141,8 @@ do RC=1 break fi + mv $TDX/messages_$LG.java $TDY + rm -rf $TD fi done rm -f $TMPFILE diff --git a/apps/susidns/src/build.xml b/apps/susidns/src/build.xml index 482bedad0f235386999e8df2a0e1bc6b946a468c..f5279d69b401fad586d7340f1fafee9a3993fefa 100644 --- a/apps/susidns/src/build.xml +++ b/apps/susidns/src/build.xml @@ -149,6 +149,11 @@ <exec executable="sh" osfamily="windows" failifexecutionfails="false" > <arg value="./bundle-messages.sh" /> </exec> + <javac source="${javac.version}" target="${javac.version}" + includeAntRuntime="false" + srcdir="build/messages-src" destdir="${bin}"> + <compilerarg line="${javac.compilerargs}" /> + </javac> </target> <target name="poupdate" depends="compile, precompilejsp"> @@ -171,7 +176,7 @@ <delete file="susidns.war" /> <delete> <fileset dir="." includes="**/*.class" /> - <fileset dir="." includes="tmp" /> + <fileset dir="." includes="tmp, build" /> <fileset dir="WEB-INF" includes="web-fragment.xml, web-out.xml" /> </delete> <delete dir="${bin}" /> diff --git a/apps/susidns/src/bundle-messages.sh b/apps/susidns/src/bundle-messages.sh index 25bfae4d7a24d8ccccb15a3df2633267dcf19019..60aaa17d7b9e51276ca205cd76576b6c8829b850 100755 --- a/apps/susidns/src/bundle-messages.sh +++ b/apps/susidns/src/bundle-messages.sh @@ -99,7 +99,13 @@ do echo "Generating ${CLASS}_$LG ResourceBundle..." # convert to class files in build/obj - msgfmt --java --statistics -r $CLASS -l $LG -d WEB-INF/classes $i + TD=build/messages-src-tmp + TDX=$TD/i2p/susi/dns + TD2=build/messages-src + TDY=$TD2/i2p/susi/dns + rm -rf $TD + mkdir -p $TD $TDY + msgfmt --java --statistics --source -r $CLASS -l $LG -d $TD $i if [ $? -ne 0 ] then echo "ERROR - msgfmt failed on ${i}, not updating translations" @@ -108,6 +114,8 @@ do RC=1 break fi + mv $TDX/messages_$LG.java $TDY + rm -rf $TD fi done rm -f $TMPFILE diff --git a/apps/susimail/build.xml b/apps/susimail/build.xml index 3a553c60144976d790d30ce1106a642df58b879c..2a524b2b6553dbeb8359ce0d745eab6f82e61b07 100644 --- a/apps/susimail/build.xml +++ b/apps/susimail/build.xml @@ -113,6 +113,11 @@ <exec executable="sh" osfamily="windows" failifexecutionfails="false" > <arg value="./bundle-messages.sh" /> </exec> + <javac source="${javac.version}" target="${javac.version}" + includeAntRuntime="false" + srcdir="build/messages-src" destdir="src/WEB-INF/classes"> + <compilerarg line="${javac.compilerargs}" /> + </javac> </target> <target name="poupdate" depends="builddep, compile"> diff --git a/apps/susimail/bundle-messages.sh b/apps/susimail/bundle-messages.sh index 8d8b55fc54cfee727ee9c141be04c20c5bc84901..330fa7988ef19e1aa7df1cc519fbcf28f1d375bf 100644 --- a/apps/susimail/bundle-messages.sh +++ b/apps/susimail/bundle-messages.sh @@ -97,7 +97,13 @@ do echo "Generating ${CLASS}_$LG ResourceBundle..." # convert to class files in build/obj - msgfmt --java --statistics -r $CLASS -l $LG -d src/WEB-INF/classes $i + TD=build/messages-src-tmp + TDX=$TD/i2p/susi/webmail + TD2=build/messages-src + TDY=$TD2/i2p/susi/webmail + rm -rf $TD + mkdir -p $TD $TDY + msgfmt --java --statistics --source -r $CLASS -l $LG -d $TD $i if [ $? -ne 0 ] then echo "ERROR - msgfmt failed on ${i}, not updating translations" @@ -106,6 +112,8 @@ do RC=1 break fi + mv $TDX/messages_$LG.java $TDY + rm -rf $TD fi done rm -f $TMPFILE