Browse code

first public release

Olivier Lecointre authored on 22/09/2024 22:51:28
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,60 @@
1
+# valabuild
2
+
3
+Tool to build a vala project in an easier way.
4
+It relies on a configuration file (.vlp) keeping the list of dependencies and file to include in the build.
5
+
6
+To build the tool, just run the build.sh 
7
+
8
+Prerequisites:
9
+valac needs to be installed, with the associated dependencies (pkg-config, libxml2, libgio2).
10
+
11
+Once Built, the tool can be run to build a project.
12
+/path/to/the/exec/valabuild /path/to/the/project/to/build
13
+
14
+either path can be relative or absolute.
15
+
16
+Notes:
17
+- The tool will not bring missing dependencies so the prerequisites packaged are assumed to be present. The errors given by the valac compiler should be enough to solve the missing libraries.
18
+- The tool has been kept with as few dependencies as possible, to work on a system where a simple hello word would compile in vala.
19
+- The tool is really just building a command line that is calling valac, with the predefined dependencies and arguments in the configuration file. This is just to simplify the recurrent building of a project.
20
+- The tool generates a sh script with the valac build command so that it doesn't need to be called every time.
21
+- The tool also generate a start script for the program (unless this is a library type), in order to set the library path and correct working directory.
22
+- The tool will generate the vapi and header files for library type project in the same directory as the library object.  
23
+
24
+TODO:
25
+- recurse in the subdirectories to build multiple projects in one command
26
+- option to launch predefined commands pre/post build
27
+- find the missing dependencies and give a list of commands to run (sudo like prompt would be ideal)
28
+- allow for non versioned dependencies to be used and resolved at runtime.
29
+- generate a template vlp to kickstart a project
30
+
31
+
32
+if you prefer to use Meson for the build, the alternate way from a command line is:
33
+
34
+meson <directory where the code is> <build directory>
35
+
36
+then go to the build directory and use ninja to initiate the build
37
+
38
+i.e. from valabuild directory: 
39
+meson . build
40
+cd build
41
+ninja 
42
+
43
+in order to use meson, you need to install ninja-build and meson package.
44
+They are small in size and handy anyway :)
45
+
46
+Why use valabuild and not meson all the time ?
47
+meson is great and could be used in most cases.
48
+However, the reason valabuild was created is to do some build with particular scenarios, specific to Cadexis.
49
+
50
+1- Avoid the dependencies of architecture and the need to select a particular version of library.
51
+2- Automatic download and check of dependent libraries in certain cases
52
+3- Check missing dependencies and propose the command to import them
53
+
54
+So there is no real reason to use valabuild unless you have similar cases that you would like to resolve.
55
+
56
+You should note that valabuild also generate the meson build file (TODO actually...) so you should be able to use meson to build any of the project that have been originally compiled with valabuild.
57
+
58
+For more information on meson and vala, visit https://mesonbuild.com/Vala.html#building-libraries
59
+
60
+For more information on valabuild, please visit https://www.cadexis.com to get contact information