aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/neptune-build-run.qdoc
blob: 1a8f75733532e4389ca0f10de98d29aa72e1c016 (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
/****************************************************************************
**
** Copyright (C) 2017 Pelagicore AG
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Neptune IVI UI.
**
** $QT_BEGIN_LICENSE:GPL-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 General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 or (at your option) any later version
** approved by the KDE Free Qt Foundation. The licenses are as published by
** the Free Software Foundation and appearing in the file LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
** SPDX-License-Identifier: GPL-3.0
**
****************************************************************************/

/*!
   \page neptune-build-run.html
   \title Building and Running Neptune UI
   \previouspage neptuneui-gettingstarted.html
   \nextpage neptune-app-development.html
   \brief Building and running Neptune UI

   Typically, Neptune 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 UI on a Qt Automotive emulator or a target device.

   You can also use Neptune UI as a stand-alone UI without any Qt application.
   The following topics describe how you can run Neptune UI
   \l{Running Neptune UI in Emulator} {in the emulator} or
   \l {Running Neptune UI without Installing Qt} {without installing Qt}.

   \section1 Running Neptune UI in Emulator

   When you include an emulator in your \QAS installation, the Qt online installer
   automatically creates a virtual machine setup for the installed
   emulator image. \note You need to install VirtualBox before installing the emulator.
   See \l{Emulator Requirements for Linux/x11} and
   \l{Emulator Requirements for Windows}.

   Run the following command in a terminal to launch the emulator:

   \badcode
   cd <Qt installation path>/Tools/emulator2
   emulator --vbox QtAutomotive-10
   \endcode

   \c {<Qt installation path>/Tools/emulator2} is the emulator installation path.
   The \c emulator is a tool that is shipped with \QAS, and
   \c QtAutomotive-10 is the name of the virtual machine setup.

   After running the command, the emulator is launched:

   \image emulator-automotive.png

   \section1 Running Neptune UI without Installing Qt

   If you are interested in exploring Neptune UI without installing
   \QAS, follow these instructions to run Neptune UI on your Linux desktop:

   \list 1
    \li Clone the \l{Qt Application Manager Git Repository}{Qt Application Manager}
    and \l{Neptune-UI Git Repository}{Neptune-UI} Git repositories.

    \li Build Qt Application Manager against Qt 5.6 or later that is
    installed on your desktop. See \l{Qt Applicaton Manager Installation}
    for more detailed build instructions.

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

    \li Run the following command in a terminal under the \e neptune-ui installation directory:
    \badcode
    appman -r -c am-config.yaml
    \endcode

    \c appman is an utility that is installed while building
    \l{Qt Application Manager}. \c AM_CONFIG_FILE points to the Application
    Manager's \c config.yaml file.

    \note You can edit \c am-config.yaml by commenting out parts that
    are not relevant (for example, an SD card installation directory under the
    \c "installationLocations:" section).

    \note Add \c {-I <neptune-ui git clone>/dummyimport} to the \c appman command,
    if you have not installed \l{Qt IVI}.
    \endlist

   \section2 Development with Neptune UI

   To avoid running the \c {make install} command, use a plugins.yaml file
   generated by \c qmake. The file contains all the settings
   you need for running the Neptune UI also without installing Qt. Run the
   following command in a terminal:

   \badcode
   appman -r -c am-config.yaml -c <build-folder>/plugins.yaml
   \endcode

   In Qt Creator, run the following command:

   \badcode
   appman --recreate-database -c am-config.yaml -c %{buildDir}/plugins.yaml
   \endcode

   \section2 Configuring Neptune 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 config.yaml
       \li Defines generic parameters, such as an installation location for
       applications installed from the APP STORE or a database.
   \row
       \li \c am-config.yaml
       \li Defines the \l{head unit} 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).
    \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.yaml file:

   \badcode
    formatVersion: 1
    formatType: am-configuration

    # basic AM functionality - the built-in apps are in 'apps'.

    applications:
      builtinAppsManifestDir: "apps"

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

    runtimes:
      qml:
        importPaths: [ "imports/shared" ]

    # ... as well as the SystemUI

    ui:
      fullscreen: yes
      style: "${CONFIG_PWD}/styles/neptune"
      mainQml: "Main.qml"
      importPaths: [ "imports/shared", "imports/system" ]
      windowIcon: "imports/shared/assets/icons/active/apps@96.png"

    systemProperties:
      public:
        showCluster: yes
      private:
        appStoreServerUrl: 'http://chaos.pelagicore.net:8080'

    # 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.

   \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}.

   \section2 Configuring Style

   Neptune UI supports different style configurations. They can be used to adapt
   the style to the current target device needs. Neptune UI supports the following resolutions:

   \list
       \li 1920x1080 (a default resolution)
       \li 1280x800
       \li 1080x1920
       \li 768x1024
    \endlist

   To change the Neptune UI resolution, you need to add the location of the
   QtQuickControls 2 configuration file to the \c QT_QUICK_CONTROLS_CONF
   environment variable. You find the configuration files under the \e styles folder.
   See \l{Qt QuickControls 2 Environment Variables}.

   For example, you can define a 1080x1920 potrait resolution with the
   following configuration file:

   \badcode
    [Controls]
    Style=Material
    [Material]
    Theme=Dark

    [Neptune]
    Theme=Dark
    FontSize=28
    FontFactor=1.0
    FontFamily="Source Sans Pro"
    WindowWidth=1080
    WindowHeight=1920
    Dark/BrightColor=#FEFEFE
    Light/BrightColor=#3E3E3E

   \endcode

   \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 UI Application Development}
    \li \l{Building eLinux image} {Building Embedded Linux Image}
    \li \l{Qt Application Manager Git Repository}
    \li \l{Neptune-UI Git Repository}
   \endlist


*/