2 <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
6 <title>ADG overview</title>
7 <subtitle>How to get start with ADG</subtitle>
9 <simplesect id="README.general">
10 <title>General information</title>
12 <para>Automatic Drawing Generation is GObject-based library that provides
13 a non-interactive cairo canvas specifically designed for generating
14 technical drawings. It can be viewed as a tool for programmatically
15 representing an abstract model into a layout (<emphasis>2D drafting</emphasis>).</para>
17 <para>If you want to develop an application that needs to show and print
18 drawings where some data change but the overall design is similar,
19 the ADG library can be quite useful. In manufacturing industries
20 this is often the case and an ADG-based application could help to
21 greatly improve the productivity of technical offices.</para>
23 <para>You could reach similar targets using parametric CADs but a custom
24 application provides the following benefits:</para>
27 <listitem>more customizable;</listitem>
28 <listitem>quicker and not so bloated as a parametric CAD;</listitem>
29 <listitem>can be easily connected to a database;</listitem>
30 <listitem>an ADG based filter can generate drawing on-fly: this feature
31 could be used in web-based applications.</listitem>
34 <para>Visit the <ulink url="http://adg.entidi.com/">ADG web site</ulink> for further
39 <simplesect id="README.design">
40 <title>Design overview</title>
42 <para>The project is based on the <ulink url="http://www.gtk.org/">GObject</ulink> library:
43 the ADG canvas is developed in plain C using an object-oriented
44 approach. Applications based on ADG are not expected to be
45 developed in C, though: the basic idea is to have a set of language
46 bindings for higher level languages (the garbage-collected ones,
47 above all). An application can then be developed using any
48 specific language available, much in the same way as GNOME
49 applications are conceived. Lua bindings are yet availables from
50 the <ulink url="http://adg.entidi.com/adg-lua/">adg-lua</ulink> project.</para>
52 <para>The mathematical and geometrical algorithms, together with a bunch
53 of other useful functions for manipulating cairo paths, are kept
54 in a separated library called <ulink url="http://adg.entidi.com/cpml/">CPML</ulink>
55 (Cairo Path Manipulation Library). Although actually embedded into
56 the ADG project, this library can be easily splitted on its own,
59 <para>The rendering leverages <ulink url="http://cairographics.org/">cairo</ulink>, so the
60 ADG canvas fully shares strong and weak points of that library.
61 Most notably, the availables export formats include PostScript,
62 SVG, PDF, PNG but no CAD specific ones (such as DXF). A complete
63 list can be <ulink url="http://cairographics.org/backends/">browsed online</ulink>.</para>
67 <simplesect id="README.dependencies">
68 <title>External dependencies</title>
70 <para>The ADG library has the following dependencies:</para>
73 <listitem><ulink url="http://cairographics.org/">cairo</ulink> 1.7.4 or later, required by
74 either CPML and ADG;</listitem>
75 <listitem><ulink url="http://www.gtk.org/">GLib</ulink> 2.10.1 or later, required by ADG;</listitem>
76 <listitem><ulink url="http://www.gtk.org/">GTK+</ulink> 3.0.0 or later (or GTK+ 2.12.0 or
77 later for GTK+2 support) to optionally include GTK+ support and
78 build the <command>adg-demo</command> program;</listitem>
79 <listitem><ulink url="http://www.gtk.org/gtk-doc/">gtk-doc</ulink> 1.9 or later (optional),
80 used to regenerate the API documentation</listitem>
81 <listitem><ulink url="http://live.gnome.org/GObjectIntrospection">GObject introspection</ulink>
82 0.9.5 or later (optional) to dinamically generate bindings
86 <para>The required packages must be installed prior the ADG building:
87 they should be provided by nearly every decent unix-like system.
88 The ADG is mainly developed on GNU/Linux but its dependecies are
89 known to be cross platform so a porting should be quite easy, if
90 not automatic. Anyway, the cross-compilation of a Windows
91 installer is supported upstream and it is based on the ArchLinux
92 <ulink url="http://github.com/ntd/aur-fedora-mingw">Fedora mingw port</ulink>.</para>
96 <simplesect id="README.installation">
97 <title>Installation</title>
99 <para>The ADG build system is based on GNU autotools, the de-facto
100 standard for handling free software projects. The following
101 step-by-step instructions are included only for reference: you are
102 free to install ADG in the way you prefer. Just remember if you
103 are copying and pasting to put the proper package version instead
104 of the <code>0.6.0</code> placeholder used in the examples.</para>
107 <listitem>Download the ADG tarball and put it somewhere into your file
108 system (your home directory is a good candidate). You can
109 browse the old releases or get the latest tarball directly
110 from <ulink url="http://sourceforge.net/projects/adg/files/">SourceForge</ulink>.
111 <programlisting>cd $HOME
112 wget http://sourceforge.net/projects/adg/files/adg/0.6.0/adg-0.6.0.tar.bz2</programlisting></listitem>
113 <listitem>Unpack the tarball:
114 <programlisting>tar xjvf adg-0.6.0.tar.bz2</programlisting></listitem>
115 <listitem>Configure the build. You can set different options while
116 configuring: check the output of <code>./configure --help</code> to get a
117 list of all the available customizations.
118 <programlisting>cd adg-0.6.0
119 ./configure</programlisting></listitem>
120 <listitem>Build the ADG library.
121 <programlisting>make</programlisting></listitem>
122 <listitem>Once the building has finished, you are able to run the demo
123 program without installing anything. Just try it out by
124 launching the uninstalled executable:
125 <programlisting>demo/adg-demo-uninstalled</programlisting></listitem>
126 <listitem>Install the library. You must have root privileges, either
127 by previously logging in as root or by using the <command>sudo</command> command,
128 if you intend to install it system-wide (the default). Anyway
129 you can install to a custom destination where you have write
130 access by explicitely setting the <code>--prefix</code> option in the
132 <programlisting>sudo make install</programlisting></listitem>
135 <para>Further details on the installation are availables in the <filename>INSTALL</filename>
136 text file distributed within the tarball.</para>