diff --git a/build.xml b/build.xml
index 66044689e9107215d1579cdde7796c5291def09a..fee13acf36d9f7d8a0203a2c831a98752a3640d5 100644 (file)
--- a/build.xml
+++ b/build.xml
## P R O J E C T : I N K S C A P E
########################################################################
-->
-<project name="Inkscape" default="dist" basedir=".">
+<project name="Inkscape" default="dist-inkscape" basedir=".">
<description>
Build file for the Inkscape SVG editor. This file
was written for GTK-2.10 on Win32, but it should work
<!-- -->
<property name="arch" value="mingw32-"/>
<property name="archutil" value=""/>
- <property name="devlibs" location="c:/devlibs"/>
+ <property name="devlibs" location="${env.DEVLIBS_PATH}"/>
+ <property name="mingw_bin" location="${env.MINGW_BIN}"/>
<property name="cxxtest" location="cxxtest"/>
<!-- -->
<mkdir dir="${build}/java"/>
<mkdir dir="${build}/java/classes"/>
<mkdir dir="${build}/java/lib"/>
-
- <mkdir dir="${build}"/>
<mkdir dir="${dist}"/>
+
<copy file="${src}/helper/sp-marshal.h.mingw"
tofile="${src}/helper/sp-marshal.h"/>
<copy file="${src}/helper/sp-marshal.cpp.mingw"
tofile="${src}/helper/sp-marshal.cpp"/>
+
<makefile file="inkscape_version.h">
- #define INKSCAPE_VERSION "${version}"
+ #define INKSCAPE_VERSION "${version}, revision ${svn.revision}"
</makefile>
<makefile file="config.h">
#ifndef _CONFIG_H_
#define HAVE_STDLIB_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_INTTYPES_H 1
+ #define HAVE_OPENMP 1
#define ENABLE_LCMS 1
/* Allow reading WordPerfect? */
#define WITH_LIBWPG 1
+ /* Do we support SVG Fonts? */
+ #define ENABLE_SVG_FONTS 1
+
#endif /* _CONFIG_H_ */
</makefile>
</target>
########################################################################
-->
<target name="touchabout"
- description="update the modification time of aboutdialog.cpp">
- <!-- not good <touch file="${src}/ui/dialog/aboutdialog.cpp"/> -->
+ description="update the modification time of aboutbox.cpp">
+ <!-- not good <touch file="${src}/ui/dialog/aboutbox.cpp"/> -->
<!-- better -->
- <delete file="${build}/obj/ui/dialog/aboutdialog.o"/>
+ <delete file="${build}/obj/ui/dialog/aboutbox.o"/>
+ <delete file="inkscape_version.h"/>
</target>
description="generate test files" >
<!-- Generate CxxTest files -->
- <cxxtestpart command="python ${cxxtest}/cxxtestgen.py"
+ <cxxtestpart command="python ${cxxtest}/cxxtestgen.py --have-eh"
out="${src}/test-src.cpp">
<fileset dir="${src}">
<include name="attributes-test.h"/>
<include name="dir-util-test.h"/>
<include name="extract-uri-test.h"/>
<include name="mod360-test.h"/>
+ <include name="preferences-test.h"/>
<include name="round-test.h"/>
<include name="sp-gradient-test.h"/>
<include name="sp-style-elem-test.h"/>
<include name="verbs-test.h"/>
</fileset>
</cxxtestpart>
- <cxxtestpart command="python ${cxxtest}/cxxtestgen.py"
+ <cxxtestpart command="python ${cxxtest}/cxxtestgen.py --have-eh"
out="${src}/display/test-display.cpp">
<fileset dir="${src}/display">
<include name="bezier-utils-test.h"/>
+ <include name="curve-test.h"/>
</fileset>
</cxxtestpart>
- <cxxtestpart command="python ${cxxtest}/cxxtestgen.py"
+ <cxxtestpart command="python ${cxxtest}/cxxtestgen.py --have-eh"
out="${src}/helper/test-helper.cpp">
<fileset dir="${src}/helper">
<include name="units-test.h"/>
</fileset>
</cxxtestpart>
- <cxxtestpart command="python ${cxxtest}/cxxtestgen.py"
+ <cxxtestpart command="python ${cxxtest}/cxxtestgen.py --have-eh"
out="${src}/libnr/test-nr.cpp">
<fileset dir="${src}/libnr">
<include name="nr-compose-test.h"/>
<include name="nr-matrix-test.h"/>
</fileset>
</cxxtestpart>
- <cxxtestpart command="python ${cxxtest}/cxxtestgen.py"
+ <cxxtestpart command="python ${cxxtest}/cxxtestgen.py --have-eh"
out="${src}/svg/test-svg.cpp">
<fileset dir="${src}/svg">
<include name="css-ostringstream-test.h"/>
<include name="svg-affine-test.h"/>
<include name="svg-color-test.h"/>
<include name="svg-length-test.h"/>
- <include name="svg-path-test.h"/>
+ <include name="svg-path-geom-test.h"/>
</fileset>
</cxxtestpart>
- <cxxtestpart command="python ${cxxtest}/cxxtestgen.py"
+ <cxxtestpart command="python ${cxxtest}/cxxtestgen.py --have-eh"
out="${src}/util/test-util.cpp">
<fileset dir="${src}/util">
<include name="list-container-test.h"/>
</fileset>
</cxxtestpart>
- <cxxtestpart command="python ${cxxtest}/cxxtestgen.py"
+ <cxxtestpart command="python ${cxxtest}/cxxtestgen.py --have-eh"
out="${src}/xml/test-xml.cpp">
<fileset dir="${src}/xml">
<include name="repr-action-test.h"/>
<!-- Compile from source to build -->
<cc cc="${arch}gcc" cxx="${arch}g++"
destdir="${build}/obj"
- continueOnError="true"
- refreshCache="${refresh}">
+ continueOnError="true"
+ refreshCache="${refresh}">
<fileset dir="${src}">
<!-- THINGS TO EXCLUDE -->
<exclude name="2geom/chebyshev.cpp"/>
<exclude name="deptool.cpp"/>
<!--<exclude name="test-main.cpp"/>-->
<!--<exclude name="test-src.cpp"/>-->
+ <exclude name="display/test-display.cpp"/>
<exclude name="display/testnr.cpp"/>
<exclude name="display/bezier-utils-test.cpp"/>
<exclude name="dom/work/.*"/>
<exclude name="widgets/test-widgets.cpp"/>
<exclude name="xml/quote-test.cpp"/>
<exclude name="xml/repr-action-test.cpp"/>
- <!--<exclude name="xml/test-xml.cpp"/>-->
- <exclude name="xml/test-xml-main.cpp"/>
+ <exclude name="xml/test-xml.cpp"/>
+ <!--<exclude name="xml/test-xml-main.cpp"/>-->
<exclude name="io/streamtest.cpp"/>
<!--JABBER-->
<exclude name="pedro/pedrogui.cpp"/>
-Wall -Wformat -Werror=format-security -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch
-O2
-mms-bitfields
+ -fopenmp
</flags>
<defines>
-DVERSION=\"${version}\"
objcopycommand="${archutil}objcopy">
<flags>
-mwindows
+ -mthreads
</flags>
<fileset dir="${build}">
<include name="inkres.o"/>
<include name="obj/winmain.o"/>
<include name="libinkscape.a"/>
</fileset>
+ <!-- WARNING: If you change these libraries, don't forget to change them for inkview and cxxtests below as well! -->
<libs>
-L${devlibs}/lib
${pcl.poppler-cairo} ${pcl.poppler-glib} ${pcl.poppler}
-lpng -ljpeg.dll -ltiff.dll -lpopt ${devlibs}/lib/zdll.lib
-lgc
-lws2_32 -lintl -lgdi32 -lcomdlg32 -lm
+ -lgomp -lpthreadGC2
</libs>
</link>
</target>
stripcommand="${archutil}strip"
objcopycommand="${archutil}objcopy">
<flags>
+ -mwindows
+ -mthreads
</flags>
<fileset dir="${build}">
<include name="inkviewres.o"/>
</fileset>
<libs>
-L${devlibs}/lib
- -lpoppler-cairo -lpoppler-glib -lpoppler.dll
- ${pcl.gtkmm-2.4}
- <!-- PERL -->
- -L${devlibs}/perl/lib/CORE -lperl58
- <!-- PYTHON -->
- -L${devlibs}/python/libs -lpython25
+ ${pcl.poppler-cairo} ${pcl.poppler-glib} ${pcl.poppler}
+ ${pcl.gtkmm-2.4} ${pcl.pangoft2} ${pcl.gthread-2.0}
${devlibs}/bin/libxml2.dll
${devlibs}/bin/libxslt.dll
+ ${pcl.cairo} ${pcl.cairomm-1.0}
+ ${pcl.libwpg-0.1} ${pcl.libwpg-stream-0.1}
${devlibs}/lib/iconv.lib
- -lcairo.dll -lcairomm-1.0.dll
- -lwpg-0.1.dll -lwpg-stream-0.1.dll
- -lMagick++ -lWand -lMagick
- -lfreetype.dll -lfontconfig.dll
- -llcms.dll
+ ${pcl.ImageMagick++}
+ ${pcl.fontconfig} ${pcl.freetype2}
-lssl -lcrypto
+ ${pcl.lcms}
+ ${pcl.gsl}
-lpng -ljpeg.dll -ltiff.dll -lpopt ${devlibs}/lib/zdll.lib
- -lgc -mwindows
+ -lgc
-lws2_32 -lintl -lgdi32 -lcomdlg32 -lm
+ -lgomp -lpthreadGC2
</libs>
</link>
</target>
stripcommand="${archutil}strip"
objcopycommand="${archutil}objcopy">
<flags>
+ -mthreads
</flags>
<fileset dir="${build}">
<include name="obj/test-main.o"/>
-lpng -ljpeg.dll -ltiff.dll -lpopt ${devlibs}/lib/zdll.lib
-lgc
-lws2_32 -lintl -lgdi32 -lcomdlg32 -lm
+ -lgomp -lpthreadGC2
</libs>
</link>
</target>
<!--
########################################################################
- ## T A R G E T : D I S T
+ ## T A R G E T : D I S T B A S E
########################################################################
-->
- <target name="dist" depends="link,i18n"
+ <target name="distbase" depends="i18n"
description="generate the distribution directory with all needed files">
<!-- Create the distribution directory -->
- <copy todir="${dist}" file="${build}/inkscape.exe"/>
- <copy todir="${dist}" file="${build}/inkscape.dbg"/>
<copy todir="${dist}" file="AUTHORS"/>
<copy todir="${dist}" file="COPYING"/>
<copy todir="${dist}" file="COPYING.LIB"/>
<copy todir="${dist}" file="${devlibs}/bin/libgobject-2.0-0.dll"/>
<copy todir="${dist}" file="${devlibs}/bin/libgtk-win32-2.0-0.dll"/>
<copy todir="${dist}" file="${devlibs}/bin/libgthread-2.0-0.dll"/>
+ <copy todir="${dist}" file="${devlibs}/bin/libgio-2.0-0.dll"/>
<copy todir="${dist}" file="${devlibs}/bin/libcairo-2.dll"/>
<copy todir="${dist}" file="${devlibs}/bin/libpoppler-3.dll"/>
<copy todir="${dist}" file="${devlibs}/bin/libpangocairo-1.0-0.dll"/>
<copy todir="${dist}" file="${devlibs}/bin/libpopt-0.dll"/>
<copy todir="${dist}" file="${devlibs}/bin/liblcms-1.dll"/>
<copy todir="${dist}" file="${devlibs}/bin/intl.dll"/>
+ <copy todir="${dist}" file="${devlibs}/bin/pthreadGC2.dll"/>
<copy file="${devlibs}/bin/intl.dll" tofile="${dist}/libintl-2.dll"/>
+ <!-- MINGW dll needed, I think for openmp support -->
+ <copy todir="${dist}" file="${mingw_bin}/mingwm10.dll"/>
<!-- MSGFMT files -->
<copy todir="${dist}">
</target>
+ <!--
+ ########################################################################
+ ## T A R G E T : D I S T - I N K S C A P E
+ ########################################################################
+ -->
+ <target name="dist-inkscape" depends="link,distbase"
+ description="copy inkscape to the distribution directory">
+
+ <!-- Create the distribution directory -->
+ <copy todir="${dist}" file="${build}/inkscape.exe"/>
+ <copy todir="${dist}" file="${build}/inkscape.dbg"/>
+ </target>
+
+
+ <!--
+ ########################################################################
+ ## T A R G E T : D I S T - I N K V I E W
+ ########################################################################
+ -->
+ <target name="dist-inkview" depends="linkinkview,distbase"
+ description="copy inkview to the distribution directory">
+
+ <!-- Create the distribution directory -->
+ <copy todir="${dist}" file="${build}/inkview.exe"/>
+ <copy todir="${dist}" file="${build}/inkview.dbg"/>
+ </target>
+
+
+ <!--
+ ########################################################################
+ ## T A R G E T : C H E C K
+ ########################################################################
+ -->
+ <target name="check" depends="linkcxxtests,distbase"
+ description="perform unit tests">
+ <cxxtestrun command="${build}/cxxtests" workingdir="${dist}" />
+ </target>
+
+
<!--
########################################################################
## T A R G E T : JAVAC
## T A R G E T : D I S T - A L L
########################################################################
-->
- <target name="dist-all" depends="dist"
+ <target name="dist-all" depends="dist-inkscape,dist-inkview"
description="generate the distribution, along with inkview" >
+ </target>
+
- <copy file="${build}/inkview.exe" todir="${dist}"/>
- <copy file="${build}/inkview.dbg" todir="${dist}"/>
+
+
+ <!--
+ ########################################################################
+ ## T A R G E T : D I S T - A L L - C H E C K
+ ########################################################################
+ -->
+ <target name="dist-all-check" depends="dist-all,check"
+ description="generate the distribution, along with inkview and run cxxtests" >
</target>
<delete dir="${dist}"/>
<delete file="build.dep"/>
<delete file="config.h"/>
+ <delete file="inkscape_version.h"/>
<delete file="${src}/test-main.cpp"/>
<delete file="${src}/test-src.cpp"/>