aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/neptune3ui-buildrun.qdoc
blob: 29056ced21b568f13fb75406fb16cd4d0c167a42 (plain)
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
/****************************************************************************
**
** Copyright (C) 2018 Pelagicore AG
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Neptune 3 IVI UI.
**
** $QT_BEGIN_LICENSE:FDL-QTAS$
** Commercial License Usage
** Licensees holding valid commercial Qt Automotive Suite licenses may use
** this file in accordance with the commercial license agreement provided
** with the Software or, alternatively, in accordance with the terms
** contained in a written agreement between you and The Qt Company.  For
** licensing terms and conditions see https://www.qt.io/terms-conditions.
** For further information use the contact form at https://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
** $QT_END_LICENSE$
**
****************************************************************************/

/*!
   \page neptune3ui-build-run.html
   \title Neptune 3 UI - Running
   \brief Running Neptune 3 UI

   Typically, Neptune 3 UI works out-of-the-box after your have installed
   \l{Qt Automotive Suite} and launched Qt Creator. You can run your applications
   with Neptune 3 UI on your desktop or a target device.

   The simplest way to experience Neptune 3 UI is using the \l{Qt Automotive Suite}.
   It is also possible to build and run the \l{Qt Automotive Suite} including Neptune 3 UI
   from source code being able to modify any part of the code and experiment any changes.

   \section1 Running Neptune 3 UI using Qt Automotive Suite

   Neptune 3 UI is part of \l{Qt Automotive Suite}. See \l{Installing Qt Automotive Suite}
   to install all components of \l{Qt Automotive Suite}. After \l{Qt Automotive Suite} have
   been installed, Neptune 3 UI can be run either on your desktop or your embedded devices,
   e.g. Intel NUC.

   Neptune 3 UI depends on \l{Qt Application Manager} and \l{Qt IVI}. It provides support for
   a center console display and an instrument cluster and uses the Qt IVI plugins to access various
   services. Neptune 3 UI offers a multiprocess application model using a central System UI
   and various applications. The System UI provides an application launcher to start and stop
   applications. The Application Manager Plugin for Qt Creator allows a developer to develop
   and deploy applications using the Neptune 3 UI.

   Neptune 3 UI is distributed with the \l{Qt Automotive Suite}. Once the \e{Neptune 3 UI}
   component is selected and installed, the user can run the binary under
   \e{your-qt-installation-path/qt-version/your-available-platform/neptune3}, e.g.
   \e{/home/qt/5.11.0/gcc-64/neptune3}. If you use Qt Automotive Suite on an embedded
   device, the Neptune 3 UI binary will be located under \e{/opt/neptune3/}.


   \section1 Running Neptune 3 UI using the source code

   If you are interested in exploring Neptune 3 UI by building all components from the source code,
   follow these instructions to run Neptune 3 UI on your desktop:

   \section2 Platforms

   Neptune 3 UI is tested regularly on these platforms:

   \list
   \li macOS (single-process)
   \li Linux desktop (single-process)
   \li Linux desktop (multi-process)
   \endlist

   \note Multi-process UI (preferred): When in multi process mode, application run as
   independent processes, as wayland clients, and the System UI acts as a wayland server,
   compositing the application windows in its own QML scene, as regular QML items.
   While in single-process mode, all application code run in the same QML scene and
   process as the System UI itself.

   \section2 Prerequisites

   \list
   \li \b{Qt 5.12} or higher
   \endlist

   \note Qt installation need to include qtwayland submodule in order to support multi-process
   mode and built with Open GL ES (-opengl es2 -opengles3)

   \section2 Dependencies

   \list
   \li \l{Qt Application Manager} 5.12
   \li \l{Qt IVI} 5.12
   \endlist

   \section2 Build and run Neptune 3 UI

   \list

   \li Clone the \l{Qt Application Manager Git Repository}{Qt Application Manager},
   the \l{Qt IVI Git Repository}{Qt IVI} and \l{Neptune3-UI Git Repository}{Neptune3-UI}
   Git repositories.

   \li Build \l{Qt Application Manager} against Qt 5.12 or higher. See
   \l{Qt Applicaton Manager Installation} for more detailed build instructions.

   \li Build \l{Qt IVI}. against Qt 5.12 or higher. See \l{Qt IVI}{Qt
   IVI documentation} for more detailed information.

   \li Build Neptune 3 UI and install it by running the following command in a terminal:
   \badcode
   qmake -r INSTALL_PREFIX=<choose a loation> neptune3-ui.pro
   make && make install
   \endcode

   \li Run the following command in a terminal under the \e neptune3-ui installation directory:
   \badcode
   ./neptune3-ui -r -c --start-session-dbus
   \endcode
   \note --start-session-dbus is required when running Neptune 3 on Linux (Multi Process mode)

   \endlist

   \section2 Development with Neptune 3 UI using Qt Creator

   Once the project is cloned, built and installed and all pre-requisites are configured,
   you can use QtCreator as your development tool to open the project and do the
   development there. Follow these instructions to work with Neptune 3 UI using QtCreator:

   \list

   \li Start QtCreator and open the Neptune 3 project file.

   \li Configure the project to use your installed Qt (see \l{Create Project Qmake}{Adding Qt Versions})

   \li Open your project build steps configuration under Build Settings
       (under Projects → Build Settings → Build Steps) (see \l{Build Steps}{Configuring Build Steps})

   \li Expand the qmake steps and add an install prefix to the additional arguments:
       e.g. \c INSTALL_PREFIX=/path/to/your/neptune/install/folder

       \note this will install your Neptune 3 to the folder that you configured,
       otherwise by default, it will be installed under \c opt/neptune3/

   \li Expand the build steps and insert an argument under make arguments:
       -j8 (depending on how many jobs you want to use in your machine)

   \li Add another Build Step and choose "make" step. And insert the argument under make
       arguments: install -j8 (depending on how many jobs you want to use in your machine)

   \li Open your Run Settings and choose "neptune3-ui" under Run configuration. You can
       also have some other application manager options to be added into the Command line
       arguments, e.g. --recreate-database, etc. See this page for more information:
       \l{Application Manager Configuration}. Make sure that you run "neptune3-ui" from
       your install folder and not build folder.

   \li Finally you can build and run the project by pressing the Run button or press "Ctrl + R".

   \endlist

   \section2 Configuring Neptune 3 UI

   To improve the maintenance, the UI configuration is split into several
   \c .yaml files. The UI configuration files are listed and described in the
   following table:

   \table
   \header
      \li File
      \li Description
   \row
       \li \c am-config-neptune.yaml
       \li Defines the \l{center console display} and cluster-specific configurations. For example,
       built-in applications and their runtime (native or QML), import paths,
       UI-specific configurations such as a full-screen mode and a main QML file (if
       runtime is QML). This yaml file will configure Neptune 3 to use "neptune" style.
   \row
       \li \c am-config-lucee.yaml
       \li Similar to the am-config-neptune.yaml but this yaml file will configure Neptune 3
       to use "lucee" style.
    \row
       \li \c info.yaml
       \li Defines an application-specific configuration. For example, a main QML
       file and its imports.
   \endtable

   The following code defines an example of the \c am-config-neptune.yaml file:

   \badcode
    formatVersion: 1
    formatType: am-configuration

    # basic AM functionality - the built-in apps are in 'apps'.
    # installations will go into the standard /tmp/am hierarchy

    applications:
      builtinAppsManifestDir: "apps"
      database: "/tmp/neptune3-ui/apps.db"

    # QML apps will be able to import from modules...

    runtimes:
      qml:
        importPaths: [ "${CONFIG_PWD}/imports/shared" ]

    # ... as well as the SystemUI

    ui:
      fullscreen: yes
      style: "${CONFIG_PWD}/styles/neptune"
      iconThemeName: "neptune"
      iconThemeSearchPaths: [ "${CONFIG_PWD}/imports/assets/icons" ]
      mainQml: "${CONFIG_PWD}/Main.qml"
      importPaths: [ "${CONFIG_PWD}/imports/shared", "${CONFIG_PWD}/imports/system", "${CONFIG_PWD}/sysui" ]
      windowIcon: "${CONFIG_PWD}/imports/assets/icons/neptune/sysui/ic-menu-home.png"

    systemProperties:
      public:
        showCluster: yes
        showHUD: yes
        devMode: yes
      private:
        appStoreServerUrl: 'http://chaos.pelagicore.net:9090'

    # development setup: no security

    flags:
      noSecurity: yes
      noUiWatchdog: yes
   \endcode

   These options are also configurable from the command line as a parameter to the
   \e appman utility. See \l{Application Manager Configuration} for more information.

   \badcode
   appman --option 'ui: { fullscreen: no }'
   \endcode

   \note You must regenerate the Yocto image for your target after you have
   changed the \c yaml files. See \l{Building eLinux image} {Building Embedded Linux Image}.

   \section1 Related Information

   \list
    \li \l {http://doc.qt.io/QtApplicationManager/manifest.html}
{Manifest Documentation}
    \li \l{http://doc.qt.io/QtApplicationManager/configuration.html}
    {Qt Application Manager configuration options}
    \li \l{Neptune 3 UI Application Development}
    \li \l{Building eLinux image} {Building Embedded Linux Image}
    \li \l{Qt Application Manager Git Repository}
    \li \l{Neptune3-UI Git Repository}
   \endlist

*/