build: optional doc with NSIS installer
[adg.git] / README.md
blobc3d2fad43eabe743480808d31aa026e46a80d1a3
1 General information
2 ===================
3 [![Build Status](https://travis-ci.org/ntd/adg.svg?branch=master)](https://travis-ci.org/ntd/adg)
5 Automatic Drawing Generation is GObject-based library that provides
6 a non-interactive cairo canvas specifically designed for generating
7 technical drawings. It can be viewed as a tool for programmatically
8 representing an abstract model into a layout (2D drafting).
10 If you want to develop an application that needs to show and print
11 drawings where some data change but the overall design is similar,
12 the ADG library can be quite useful. In manufacturing industries
13 this is often the case and an ADG-based application could help to
14 greatly improve the productivity of technical offices.
16 You could reach similar targets using parametric CADs but a custom
17 application provides the following benefits:
19  * more customizable;
20  * quicker and not so bloated as a parametric CAD;
21  * can be easily connected to a database;
22  * an ADG based filter can generate drawing on-fly: this feature
23    could be used in web-based applications.
25 Visit the [ADG web site](http://adg.entidi.com/) for further
26 details.
29 Design overview
30 ===============
32 The project is based on the [GObject](http://www.gtk.org/) library:
33 the ADG canvas is developed in plain C using an object-oriented
34 approach. Applications based on ADG are not expected to be
35 developed in C, though: the basic idea is to have a set of bindings
36 for higher level languages (the garbage-collected ones, above all).
37 An application can then be developed using any specific language
38 available, much in the same way as [GNOME](http://www.gnome.org/)
39 applications are conceived.
41 Lua bindings based on [LGI](http://github.com/pavouk/lgi) are
42 already availables and effectively used upstream to test the APIs.
43 The [adg-lua](http://dev.entidi.com/p/adg-lua/) project provides
44 code examples on how to use them.
46 The mathematical and geometrical algorithms, together with a bunch
47 of other useful functions for manipulating cairo paths, are kept
48 in a separated library called [CPML](http://adg.entidi.com/cpml/)
49 (Cairo Path Manipulation Library). Although actually embedded into
50 the ADG project, this library can be easily splitted on its own,
51 if needed.
53 The rendering leverages [cairo](http://cairographics.org/), so the
54 ADG canvas fully shares strong and weak points of that library.
55 Most notably, the availables export formats include PostScript,
56 SVG, PDF, PNG but no CAD specific ones (such as DXF). A complete
57 list can be [browsed online](http://cairographics.org/backends/).
60 External dependencies
61 =====================
63 The ADG library has the following dependencies:
65  * [cairo](http://cairographics.org/) 1.7.4 or later, required by
66    either CPML and ADG;
67  * [GLib](http://www.gtk.org/) 2.10.1 or later, required by ADG;
68  * [GTK+](http://www.gtk.org/) 3.0.0 or later (or GTK+ 2.12.0 or
69    later for GTK+2 support) to optionally include GTK+ support and
70    build the adg-demo program;
71  * [pango](http://www.pango.org/) 1.18.0 or later (optional)
72    to support a serious engine for rendering text instead of using
73    the cairo "toy" APIs (only the pango-cairo module will be used);
74  * [gtk-doc](http://www.gtk.org/gtk-doc/) 1.12 or later (optional),
75    used to regenerate the API documentation
76  * [GObject introspection](http://live.gnome.org/GObjectIntrospection)
77    0.9.5 or later (optional) to dinamically generate bindings
78    metadata.
80 The required packages must be installed prior the ADG building:
81 they should be availables on nearly every decent unix-like system.
83 The ADG is mainly developed on GNU/Linux but its dependecies are
84 known to be cross platform so a porting should be quite easy, if
85 not automatic. Anyway, the cross-compilation of a Windows
86 installer is supported upstream and it is based on the ArchLinux
87 [Fedora mingw port](http://github.com/ntd/aur-fedora-mingw).