diff --git a/build.xml b/build.xml
index d6259f4c61e69fc0fddd14b107dbac7df20d4f63..68a3162d9f83fd73bb733c0fccf0fe93a56c827a 100644 (file)
--- a/build.xml
+++ b/build.xml
* Bob Jamison
* Others
*
* Bob Jamison
* Others
*
- * Copyright (C) 2006-2007 Inkscape.org
+ * Copyright (C) 2006-2008 Inkscape.org
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
-
-
<!--
########################################################################
## P R O J E C T : I N K S C A P E
<!--
########################################################################
## P R O J E C T : I N K S C A P E
Build file for the Inkscape SVG editor. This file
was written for GTK-2.10 on Win32, but it should work
well for other types of builds with only minor adjustments.
Build file for the Inkscape SVG editor. This file
was written for GTK-2.10 on Win32, but it should work
well for other types of builds with only minor adjustments.
+ Note that the default target is 'dist'. You can execute other
+ targets instead, by "btool {target}", like "btool compile", if
+ you want to save time.
</description>
<!-- set global properties for this build -->
</description>
<!-- set global properties for this build -->
- <property name="version" value="0.46dev"/>
- <property name="src" location="src"/>
- <property name="lib" location="lib"/>
- <property name="build" location="build"/>
- <property name="dist" location="inkscape"/>
+ <property name="version" value="0.46+devel"/>
+ <property name="src" location="src"/>
+ <property name="lib" location="lib"/>
+ <property name="build" location="build"/>
+ <property name="dist" location="inkscape"/>
<!-- Use these settings for the native compiler -->
<!-- -->
<!-- Use these settings for the native compiler -->
<!-- -->
- <property name="arch" value="mingw32-"/>
- <property name="archutil" value=""/>
- <property name="gtk" location="c:/devlibs"/>
+ <property name="arch" value="mingw32-"/>
+ <property name="archutil" value=""/>
+ <property name="gtk" location="c:/devlibs"/>
<!-- -->
<!-- Use these settings for the cross compiler -->
<!--
<!-- -->
<!-- Use these settings for the cross compiler -->
<!--
- <property name="arch" value="i686-pc-mingw32-"/>
- <property name="archutil" value="${arch}"/>
- <property name="gtk" location="/target"/>
+ <property name="arch" value="i686-pc-mingw32-"/>
+ <property name="archutil" value="${arch}"/>
+ <property name="gtk" location="/target"/>
-->
-->
+ <!-- Extra properties -->
+ <property name="refresh" value="false"/>
+
+ <!--
+ This is for package-config. With these two settings, pkg-config
+ queries can be as simple as ${pcc.packageName} for cflags, and
+ ${pcl.packageName} for libs. Dependencies are calculated automatically.
+ -->
+ <property name="pkg-config-path" location="${gtk}/lib/pkgconfig"/>
+ <property name="pkg-config-prefix" location="${gtk}"/>
<!--
<!--
"Do all preparatory tasks, like make directories and copy files">
"Do all preparatory tasks, like make directories and copy files">
- <!-- example of the <pkg-config> task
- query can be cflags, libs, or both
- prefix overrides the value of prefix="" in the file
- the result of this entry can be later used as ${gtkmm}
- -->
- <!--
- <pkg-config name="gtkmm-2.4" path="${gtk}/lib/pkgconfig"
- query="both" property="gtkmm" prefix="${gtk}"/>
- -->
+ <mkdir dir="${build}"/>
+ <mkdir dir="${build}/java"/>
+ <mkdir dir="${build}/java/classes"/>
+ <mkdir dir="${build}/java/lib"/>
<mkdir dir="${build}"/>
<mkdir dir="${dist}"/>
<mkdir dir="${build}"/>
<mkdir dir="${dist}"/>
<copy file="${src}/helper/sp-marshal.cpp.mingw"
tofile="${src}/helper/sp-marshal.cpp"/>
<makefile file="inkscape_version.h">
<copy file="${src}/helper/sp-marshal.cpp.mingw"
tofile="${src}/helper/sp-marshal.cpp"/>
<makefile file="inkscape_version.h">
- #define INKSCAPE_VERSION "${version}+devel"
+ #define INKSCAPE_VERSION "${version}"
</makefile>
<makefile file="config.h">
#ifndef _CONFIG_H_
</makefile>
<makefile file="config.h">
#ifndef _CONFIG_H_
<!-- Compile from source to build -->
<cc cc="${arch}gcc" cxx="${arch}g++"
<!-- Compile from source to build -->
<cc cc="${arch}gcc" cxx="${arch}g++"
- destdir="${build}/obj">
+ destdir="${build}/obj"
+ continueOnError="true"
+ refreshCache="${refresh}">
<fileset dir="${src}">
<!-- THINGS TO EXCLUDE -->
<exclude name="2geom/chebyshev.cpp"/>
<fileset dir="${src}">
<!-- THINGS TO EXCLUDE -->
<exclude name="2geom/chebyshev.cpp"/>
<exclude name="bonobo/.*"/>
<exclude name="deptool.cpp"/>
<exclude name="test-all.cpp"/>
<exclude name="bonobo/.*"/>
<exclude name="deptool.cpp"/>
<exclude name="test-all.cpp"/>
- <exclude name="dialogs/filedialog-win32.cpp"/>
<exclude name="display/testnr.cpp"/>
<exclude name="display/bezier-utils-test.cpp"/>
<exclude name="display/testnr.cpp"/>
<exclude name="display/bezier-utils-test.cpp"/>
- <exclude name="dom/jsdombind.cpp"/>
<exclude name="dom/work/.*"/>
<exclude name="dom/odf/SvgOdg.cpp"/>
<exclude name="extension/api.cpp"/>
<exclude name="dom/work/.*"/>
<exclude name="dom/odf/SvgOdg.cpp"/>
<exclude name="extension/api.cpp"/>
<exclude name="removeoverlap/remove_rectangle_overlap-test.cpp"/>
<exclude name="removeoverlap/remove_rectangle_overlap-test.h"/>
</fileset>
<exclude name="removeoverlap/remove_rectangle_overlap-test.cpp"/>
<exclude name="removeoverlap/remove_rectangle_overlap-test.h"/>
</fileset>
+ <excludeinc dir="${src}">
+ <file name="extension/param"/>
+ </excludeinc>
<flags>
<flags>
- -Wall -Wformat-security -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch
+ -Wall -Wformat -Werror=format-security -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch
-O2
-mms-bitfields
</flags>
<defines>
-DVERSION=\"${version}\"
-DHAVE_CONFIG_H
-O2
-mms-bitfields
</flags>
<defines>
-DVERSION=\"${version}\"
-DHAVE_CONFIG_H
- -DXP_WIN <!-- for JS -->
-D_INTL_REDIRECT_INLINE
-DHAVE_SSL
-DRELAYTOOL_SSL="static const int libssl_is_present=1; static int __attribute__((unused)) libssl_symbol_is_present(char *s){ return 1; }" <!-- inkboard -->
-D_INTL_REDIRECT_INLINE
-DHAVE_SSL
-DRELAYTOOL_SSL="static const int libssl_is_present=1; static int __attribute__((unused)) libssl_symbol_is_present(char *s){ return 1; }" <!-- inkboard -->
<includes>
-I${gtk}/include
<!-- GTK / GTKMM -->
<includes>
-I${gtk}/include
<!-- GTK / GTKMM -->
- -I${gtk}/include/glibmm-2.4
- -I${gtk}/lib/glibmm-2.4/include
- -I${gtk}/include/gtkmm-2.4
- -I${gtk}/lib/gtkmm-2.4/include
- -I${gtk}/include/gdkmm-2.4
- -I${gtk}/lib/gdkmm-2.4/include
- -I${gtk}/include/pangomm-1.4
- -I${gtk}/include/atkmm-1.6
- -I${gtk}/include/cairomm-1.0
- -I${gtk}/include/sigc++-2.0
- -I${gtk}/lib/sigc++-2.0/include
- -I${gtk}/include/gtk-2.0
- -I${gtk}/lib/gtk-2.0/include
- -I${gtk}/include/atk-1.0
- -I${gtk}/include/pango-1.0
- -I${gtk}/include/glib-2.0
- -I${gtk}/lib/glib-2.0/include
+ ${pcc.gtkmm-2.4}
<!-- OTHER -->
-I${gtk}/include/libxml2
-I${gtk}/include/freetype2
<!-- OTHER -->
-I${gtk}/include/libxml2
-I${gtk}/include/freetype2
-I${gtk}/include/libwpg-0.1
-I${gtk}/include/libwpd-0.8
<!-- PERL -->
-I${gtk}/include/libwpg-0.1
-I${gtk}/include/libwpd-0.8
<!-- PERL -->
- -Wno-comment -I${gtk}/perl/lib/CORE
+ <!-- -Wno-comment -I${gtk}/perl/lib/CORE -->
<!-- PYTHON -->
-I${gtk}/python/include
<!-- PYTHON -->
-I${gtk}/python/include
+ <!-- JAVA -->
+ -I${src}/bind/javainc -I${src}/bind/javainc/win32
</includes>
</cc>
</target>
</includes>
</cc>
</target>
<libs>
-L${gtk}/lib
-lpoppler-cairo -lpoppler-glib -lpoppler.dll
<libs>
-L${gtk}/lib
-lpoppler-cairo -lpoppler-glib -lpoppler.dll
- -lgtkmm-2.4 -lgdkmm-2.4 -lglibmm-2.4
- -latkmm-1.6 -lpangomm-1.4 -lsigc-2.0
- -lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0
- -lgdk_pixbuf-2.0
- -lpangocairo-1.0 -lpangoft2-1.0 -lpangowin32-1.0 -lpango-1.0
- -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0
+ ${pcl.gtkmm-2.4} ${pcl.pangoft2} ${pcl.gthread-2.0}
<!-- PERL -->
<!-- PERL -->
- -L${gtk}/perl/lib/CORE -lperl58
+ <!-- -L${gtk}/perl/lib/CORE -lperl58 -->
<!-- PYTHON -->
<!-- PYTHON -->
- -L${gtk}/python/libs -lpython25
+ <!-- -L${gtk}/python/libs -lpython25 -->
${gtk}/bin/libxml2.dll
${gtk}/bin/libxslt.dll
-lcairo.dll
${gtk}/bin/libxml2.dll
${gtk}/bin/libxslt.dll
-lcairo.dll
-lfreetype.dll -lfontconfig.dll
-lssl -lcrypto
-llcms.dll
-lfreetype.dll -lfontconfig.dll
-lssl -lcrypto
-llcms.dll
+ -lgsl
-lpng -ljpeg.dll -ltiff.dll -lpopt ${gtk}/lib/zdll.lib
-lgc
-lws2_32 -lintl -lgdi32 -lcomdlg32 -lm
-lpng -ljpeg.dll -ltiff.dll -lpopt ${gtk}/lib/zdll.lib
-lgc
-lws2_32 -lintl -lgdi32 -lcomdlg32 -lm
<libs>
-L${gtk}/lib
-lpoppler-cairo -lpoppler-glib -lpoppler.dll
<libs>
-L${gtk}/lib
-lpoppler-cairo -lpoppler-glib -lpoppler.dll
- -lgtkmm-2.4 -lgdkmm-2.4 -lglibmm-2.4
- -latkmm-1.6 -lpangomm-1.4 -lsigc-2.0
- -lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0
- -lgdk_pixbuf-2.0
- -lpangocairo-1.0 -lpangoft2-1.0 -lpangowin32-1.0 -lpango-1.0
- -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lcairo -lcairomm-1.0
+ ${pcl.gtkmm-2.4}
<!-- PERL -->
-L${gtk}/perl/lib/CORE -lperl58
<!-- PYTHON -->
<!-- PERL -->
-L${gtk}/perl/lib/CORE -lperl58
<!-- PYTHON -->
<copy file="${gtk}/bin/libgtk-win32-2.0-0.dll" todir="${dist}"/>
<copy file="${gtk}/bin/libgthread-2.0-0.dll" todir="${dist}"/>
<copy file="${gtk}/bin/libcairo-2.dll" todir="${dist}"/>
<copy file="${gtk}/bin/libgtk-win32-2.0-0.dll" todir="${dist}"/>
<copy file="${gtk}/bin/libgthread-2.0-0.dll" todir="${dist}"/>
<copy file="${gtk}/bin/libcairo-2.dll" todir="${dist}"/>
- <copy file="${gtk}/bin/libpoppler-2.dll" todir="${dist}"/>
+ <copy file="${gtk}/bin/libpoppler-3.dll" todir="${dist}"/>
<copy file="${gtk}/bin/libpangocairo-1.0-0.dll" todir="${dist}"/>
<copy file="${gtk}/bin/libpango-1.0-0.dll" todir="${dist}"/>
<copy file="${gtk}/bin/libpangoft2-1.0-0.dll" todir="${dist}"/>
<copy file="${gtk}/bin/libpangocairo-1.0-0.dll" todir="${dist}"/>
<copy file="${gtk}/bin/libpango-1.0-0.dll" todir="${dist}"/>
<copy file="${gtk}/bin/libpangoft2-1.0-0.dll" todir="${dist}"/>
<copy file="${gtk}/bin/libwpd-stream-0.8.dll" todir="${dist}"/>
<copy file="${gtk}/bin/jpeg62.dll" todir="${dist}"/>
<copy file="${gtk}/bin/libpng13.dll" todir="${dist}"/>
<copy file="${gtk}/bin/libwpd-stream-0.8.dll" todir="${dist}"/>
<copy file="${gtk}/bin/jpeg62.dll" todir="${dist}"/>
<copy file="${gtk}/bin/libpng13.dll" todir="${dist}"/>
+ <!-- GTK changed their dep file name for PNG! :-( -->
+ <copy file="${gtk}/bin/libpng13.dll" tofile="${dist}/libpng12-0.dll"/>
<copy file="${gtk}/bin/libtiff3.dll" todir="${dist}"/>
<copy file="${gtk}/bin/msvcr70.dll" todir="${dist}"/>
<copy file="${gtk}/bin/msvcr71.dll" todir="${dist}"/>
<copy file="${gtk}/bin/libtiff3.dll" todir="${dist}"/>
<copy file="${gtk}/bin/msvcr70.dll" todir="${dist}"/>
<copy file="${gtk}/bin/msvcr71.dll" todir="${dist}"/>
</fileset>
</copy>
<copy todir="${dist}/share"> <fileset dir="${gtk}/share/themes"/> </copy>
</fileset>
</copy>
<copy todir="${dist}/share"> <fileset dir="${gtk}/share/themes"/> </copy>
+ <copy todir="${dist}/share"> <fileset dir="${gtk}/share/poppler"/> </copy>
<mkdir dir="${dist}/data"/>
<mkdir dir="${dist}/locale"/>
<mkdir dir="${dist}/modules"/>
<mkdir dir="${dist}/data"/>
<mkdir dir="${dist}/locale"/>
<mkdir dir="${dist}/modules"/>
<!-- PYTHON -->
<copy file="${gtk}/python/python25.dll" todir="${dist}"/>
<copy file="${gtk}/python/python.exe" todir="${dist}/python"/>
<!-- PYTHON -->
<copy file="${gtk}/python/python25.dll" todir="${dist}"/>
<copy file="${gtk}/python/python.exe" todir="${dist}/python"/>
+ <copy file="${gtk}/python/pythonw.exe" todir="${dist}/python"/>
<copy todir="${dist}/python"> <fileset dir="${gtk}/python/Lib"/> </copy>
<copy todir="${dist}/python"> <fileset dir="${gtk}/python/DLLs"/> </copy>
<copy todir="${dist}/python"> <fileset dir="${gtk}/python/Scripts"/> </copy>
<!--<copy file="${gtk}/share/themes/MS-Windows/gtk-2.0/gtkrc" todir="${dist}/etc/gtk-2.0"/>-->
<makefile file="${dist}/etc/gtk-2.0/gtkrc">
<copy todir="${dist}/python"> <fileset dir="${gtk}/python/Lib"/> </copy>
<copy todir="${dist}/python"> <fileset dir="${gtk}/python/DLLs"/> </copy>
<copy todir="${dist}/python"> <fileset dir="${gtk}/python/Scripts"/> </copy>
<!--<copy file="${gtk}/share/themes/MS-Windows/gtk-2.0/gtkrc" todir="${dist}/etc/gtk-2.0"/>-->
<makefile file="${dist}/etc/gtk-2.0/gtkrc">
- gtk-icon-sizes = "gtk-menu=13,13:gtk-small-toolbar=16,16:gtk-large-toolbar=24,24:gtk-dnd=32,32:inkscape-decoration=16,16"
+ gtk-icon-sizes = "gtk-menu=16,16:gtk-small-toolbar=16,16:gtk-large-toolbar=24,24:gtk-dnd=32,32:inkscape-decoration=16,16"
gtk-toolbar-icon-size = small-toolbar
# disable images in buttons. i've only seen ugly delphi apps use this feature.
gtk-toolbar-icon-size = small-toolbar
# disable images in buttons. i've only seen ugly delphi apps use this feature.
</target>
</target>
+ <!--
+ ########################################################################
+ ## T A R G E T : JAVAC
+ ########################################################################
+ -->
+ <target name="javac" depends="init"
+ description="compile java binding classes">
+ <javac srcdir="${src}/bind/java" destdir="${build}/java/classes"/>
+ </target>
+
+
+ <!--
+ ########################################################################
+ ## T A R G E T : JAR
+ ########################################################################
+ -->
+ <target name="jar" depends="javac"
+ description="pack java classes and resources into a jar file">
+ <copy todir="${build}/java/classes"> <fileset dir="${gtk}/bind/data"/> </copy>
+ <jar basedir="${build}/java/classes" destfile="${build}/java/lib/inkscape.jar"/>
+ </target>
+
+ <!--
+ ########################################################################
+ ## T A R G E T : BINDDIST
+ ########################################################################
+ -->
+ <target name="binddist" depends="jar"
+ description="pack java classes and resources into a jar file">
+ <copy todir="${dist}/share/bind"> <fileset dir="${gtk}/bind/java"/> </copy>
+ <copy todir="${dist}/share/bind/java"> <fileset dir="${build}/java/lib"/> </copy>
+
+ </target>
+
+ <!--
+ ########################################################################
+ ## T A R G E T : BINDCLEAN
+ ########################################################################
+ -->
+ <target name="bindclean" depends=""
+ description="clean up java binding classes">
+ <delete dir="${build}/java"/>
+ </target>
+
+
<!--
<!--
## T A R G E T : D I S T - A L L
########################################################################
-->
## T A R G E T : D I S T - A L L
########################################################################
-->
- <target name="dist-all" depends="dist,linkinkview"
+ <target name="dist-all" depends="dist"
description="generate the distribution, along with inkview" >
<copy file="${build}/inkview.exe" todir="${dist}"/>
description="generate the distribution, along with inkview" >
<copy file="${build}/inkview.exe" todir="${dist}"/>
+
<!--
########################################################################
## T A R G E T : C L E A N
########################################################################
-->
<!--
########################################################################
## T A R G E T : C L E A N
########################################################################
-->
- <target name="clean"
+ <target name="clean" depends="bindclean"
description="clean up. deleting build and distro dirs" >
<delete dir="${build}"/>
description="clean up. deleting build and distro dirs" >
<delete dir="${build}"/>