File: README.md

package info (click to toggle)
gir2pas 0.1.0-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 732 kB
  • sloc: pascal: 7,033; makefile: 59
file content (65 lines) | stat: -rw-r--r-- 1,988 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# gir2pas

The [gir2pas][] utility is a program to convert the
GIR metadata format (= XML files) used by [GObject introspection][] into usable
Pascal source code, suitable for generating corresponding language bindings.

It was originaly named [gir2pascal] maintained as part of the Lazarus Code and Component Repository ([lazarus-ccr][],
[wiki article][wiki-ccr]), see `applications/gobject-introspection/`. Later it has
received some maintenance by [n1tehawk][] and finally was imported from his
repository into Lazarus source tree.

# License

This project builds upon the original Lazarus CCR version and is thus intended
to follow the same licensing principles. For the `gobject-introspection` folder
this seems to be [GPL v2](LICENSE.md), as referenced in a number of file headers.

# Usage
## Compilation
In order to compile `gir2pas` one needs to install FPC and make:
```
aptitude install fpc make
```
Then run default make target:
```
make
```

## Generation of bindings
First, the GIR files need to be installed:
```
aptitude install \
	libatk1.0-dev \
	libgtk-3-dev \
	libgdk-pixbuf-2.0-dev \
	gir1.2-glib-2.0-dev \
	libgirepository1.0-dev \
	libgtk-3-dev \
	libharfbuzz-dev \
	libpango1.0-dev \
	gir1.2-freedesktop-dev
```
Then run the program:
```
./gir2pas -P Laz -e Set -w \
          -M atk-2.52 \
          -M cairo-1.0 \
          -M gdk-3.22 \
          -M glib-2.66 \
          -M gio-2.66 \
          -M gmodule-2.66 \
          -M gobject-2.66 \
          -M gtk-3.24 \
          -M pango-1.16 \
          -M pangocairo-1.46 \
          -i Gtk-3.0 \
          -o ../lazarus/lcl/interfaces/gtk3/gtk3bindings/
```

[gir2pas]: https://gitlab.com/gtk4pas/tools/gir2pas
[gir2pascal]: https://wiki.freepascal.org/gir2pascal
[GObject introspection]: https://gi.readthedocs.io/
[lazarus-ccr]: https://sourceforge.net/projects/lazarus-ccr/
[wiki-ccr]: https://wiki.lazarus.freepascal.org/Lazarus-ccr_SourceForge_repository
[n1tehawk]: https://github.com/n1tehawk/gir2pascal