Simplified doc-site generation
[AGL/documentation.git] / docs / ATTIC / 3_Developer_Guides / 4_X(cross)_Development_System:_User's_Guide / 2_Create_your_first_AGL_application / 3.4.2.2_Get_the_Source_Files.md
1 <!-- WARNING: This file is generated by fetch_docs.js using /home/boron/Documents/AGL/docs-webtemplate/site/_data/tocs/devguides/master/xds-docs-guides-devguides-book.yml -->
2
3 # Get the Source Files
4
5 XDS needs to be able to share your application source files.
6 This section describes the options you have for sharing your
7 files with the server running XDS.
8
9 ## Source Sharing Methods
10
11 For this example, you will use the _helloworld-native-application_
12 project.
13 You must clone this project's repository into a directory that
14 `xds-server` can access.
15
16 Two methods exist:
17
18 - If you Client Part is configured for SaaS (i.e. Cloud Sync), the local
19   directory into which you clone your application project is sent to
20   and replicated on the server running XDS.
21   This implies that you can use any local directory for your cloned
22   application repository.
23
24 - If you `xds-server` is running locally, you can use path mapping.
25   Path mapping uses a volume shared between your development host and the server
26   that is running XDS.
27   The directory shared is `$HOME/xds-workspace`.
28  
29   <!-- section-note -->
30   **NOTE:**
31
32   The path mapping method of sharing files is more efficient than
33   replicating the project on the XDS server.
34   However, you must clone the project under a directory that can be shared.
35   The most convenient directory is the default shared directory, which is
36   `$HOME/xds-workspace`.
37   
38   You could create additional shared volumes.
39   To create more shared volumes, See the
40   "[Create and Start a New Container](server-part.html#create-and-start-a-new-container)"
41   section.
42
43 ## Which File Sharing Method Should I Choose?
44
45 The file sharing method you choose depends on the
46 Client Part configuration (i.e. Standalone, On-Premise or SaaS).
47
48 - Standalone uses local path mapping. With this configuration, it
49   makes no sense to use SaaS (Cloud Sync) as it adds unnecessary overhead.
50
51 - On-Premise uses Cloud Sync.
52
53 - SaaS also uses Cloud Sync. With this configuration, replicating the
54   application project files on the XDS server is the only way to achieve
55   file sharing.
56
57 <!-- section-note -->
58 **NOTE:**
59
60 The
61 [helloworld-native-application](https://github.com/iotbzh/helloworld-native-application)
62 project is an AGL project that is based on CMake
63 (i.e. [cmake-apps-module](https://git.automotivelinux.org/src/cmake-apps-module/)).
64 For information on installing and using the CMake templates, see the
65 "[Installing the CMake Templates](../../../../devguides/reference/cmakeafbtemplates/dev_guide/installing-cmake.html)"
66 section.
67 CMake templates, when used to develop applications
68 with the AGL Application Framework, automatically generate Makefile rules
69 (e.g. `remote-target-populate`) or scripts (e.g. `build/target/xxx` scripts).
70 <!-- end-section-note -->
71
72 ## Clone project
73
74 Now that you know where you are going to put your application files,
75 you can clone the repository.
76 In the following example, the local repository is cloned to the
77 default shared directory assuming path mapping, which is for
78 a Client Part Standalone configuration.
79
80 ```bash
81 cd $HOME/xds-workspace
82 git clone --recursive https://github.com/iotbzh/helloworld-native-application.git
83 ```