Update doc
[staging/xdg-launcher.git] / docs / dev_guide / 2_project_architecture.md
1 # Project architecture
2
3 A typical project architecture would be :
4
5 ```tree
6 <project-root-path>
7
8 ├── conf.d/
9 │   ├── autobuild/
10 │   │   ├── agl
11 │   │   │   └── autobuild
12 │   │   ├── linux
13 │   │   │   └── autobuild
14 │   │   └── windows
15 │   │       └── autobuild
16 │   ├── app-templates/
17 │   │   ├── README.md
18 │   │   ├── cmake/
19 │   │   │   ├── export.map
20 │   │   │   └── macros.cmake
21 │   │   ├── samples.d/
22 │   │   │   ├── CMakeLists.txt.sample
23 │   │   │   ├── config.cmake.sample
24 │   │   │   ├── config.xml.in.sample
25 │   │   │   └── xds-config.env.sample
26 │   │   ├── template.d/
27 │   │   │   ├── autobuild/
28 │   │   │   │   ├── agl
29 │   │   │   │   │   └── autobuild.in
30 │   │   │   │   ├── linux
31 │   │   │   │   │   └── autobuild.in
32 │   │   │   │   └── windows
33 │   │   │   │       └── autobuild.in
34 │   │   │   ├── config.xml.in
35 │   │   │   ├── deb-config.dsc.in
36 │   │   │   ├── deb-config.install.in
37 │   │   │   ├── debian.changelog.in
38 │   │   │   ├── debian.compat.in
39 │   │   │   ├── debian.rules.in
40 │   │   │   ├── gdb-on-target.ini.in
41 │   │   │   ├── install-wgt-on-target.sh.in
42 │   │   │   ├── start-on-target.sh.in
43 │   │   │   ├── rpm-config.spec.in
44 │   │   │   └── xds-project-target.conf.in
45 │   │   └── wgt/
46 │   │       ├── icon-default.png
47 │   │       ├── icon-html5.png
48 │   │       ├── icon-native.png
49 │   │       ├── icon-qml.png
50 │   │       └── icon-service.png
51 │   ├── packaging/
52 │   │   ├── config.spec
53 │   │   └── config.deb
54 │   ├── cmake
55 │   │   └── config.cmake
56 │   └── wgt
57 │      └── config.xml.in
58 ├── <libs>
59 ├── <target>
60 │   └── <files>
61 ├── <target>
62 │   └── <file>
63 └── <target>
64     └── <files>
65 ```
66
67 | # | Parent | Description |
68 | - | -------| ----------- |
69 | \<root-path\> | - | Path to your project. Hold master CMakeLists.txt and general files of your projects. |
70 | conf.d | \<root-path\> | Holds needed files to build, install, debug, package an AGL app project |
71 | app-templates | conf.d | Git submodule to app-templates AGL repository which provides CMake helpers macros library, and build scripts. config.cmake is a copy of config.cmake.sample configured for the projects. SHOULD NOT BE MODIFIED MANUALLY !|
72 | autobuild | conf.d | Scripts generated from app-templates to build packages the same way for differents platforms.|
73 | cmake | conf.d | Contains at least config.cmake file modified from the sample provided in app-templates submodule. |
74 | wgt | conf.d | Contains at least config.xml.in template file modified from the sample provided in app-templates submodule for the needs of project (See config.xml.in.sample file for more details). |
75 | packaging | conf.d | Contains output files used to build packages. |
76 | \<libs\> | \<root-path\> | External dependencies libraries. This isn't to be used to include header file but build and link statically specifics libraries. | Library sources files. Can be a decompressed library archive file or project fork. |
77 | \<target\> | \<root-path\> | A target to build, typically library, executable, etc. |
78
79 ## Manage app-templates submodule
80
81 ### Update
82
83 You may have some news bug fixes or features available from app-templates
84 repository that you want. To update your submodule proceed like the following:
85
86 ```bash
87 git submodule update --remote
88 git commit -s conf.d/app-templates
89 ```
90
91 This will update the submodule to the HEAD of master branch repository. Save
92 the modification by commiting it in your master git project.
93
94 ### Checkout submodule to a git tag
95
96 You could just want to update at a specified repository tag or branch or commit
97 , here are the method to do so:
98
99 ```bash
100 cd conf.d/app-templates
101 # Choose one of the following depending what you want
102 git checkout <tag_name>
103 git checkout --detach <branch_name>
104 git checkout --detach <commit_id>
105 # Then commit
106 cd ../..
107 git commit -s conf.d/app-templates
108 ```