aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
blob: 079e5e62c24daf12fbda12c534f80b93bf46421e (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
# QtAuto Extra Apps

This repository hosts additional apps provided for installation in the Qt Automotive Suite.

All apps are intended to be packaged by the appman-packager which is part of the QtApplicationManager module.

# Building and Packaging of Apps

All apps can be build by using the following commands:

$ qmake
$ make

In addition the apps can be packaged as well using the "package" build target

$ make package

# Adding new apps
## Simple Apps

For simple QML only apps, just add a new folder with your QML files and icon and the info.yaml for the package.
The new package needs to be added to the qmake build system. For simple apps this is done by creating a new pro file named the same way like your folder.
The pro file looks as following:

FILES += info.yaml \
         icon.png \
         Browser.qml

load(app)

Also make sure the new folder is added to the toplevel pro file qt-auto-extra-apps.pro

## Complex Apps

For more complex apps where you need to deploy a C++ based QML plugin in addition to your QML content you need to do the following:

1. Create a new folder as described for Simple Apps
2. Create a new "app" sub-folder and a new "plugin" subfolder
3. In the plugin subfolder you can use the qmlplugin feature file e.g.

TEMPLATE = lib
TARGET = camera
QT += qml quick
CONFIG += plugin

TARGET = $$qtLibraryTarget($$TARGET)
uri = camera
load(qmlplugin)

# Input
SOURCES += \
    camera_plugin.cpp \
    camerastream.cpp

HEADERS += \
    camera_plugin.h \
    camerastream.h

OTHER_FILES = qmldir

4. In the app directory you can use the same template as used in the simple app case.
5. As the package name is retrieved from the folder name, you need to manually set the package name in your app project file
e.g. NAME = com.pelagicore.camera
6. Create a sub-dirs pro file in your global app folder
7. Add your app folder to the toplevel pro file qt-auto-extra-apps.pro