Getting Started
Jump to navigation
Jump to search
How to get started as a developer?
QML Apps
We have various apps and components written in QML. By using stub data you'll be able to use most of them on a desktop for agile development :)
What you will need:
- Qt 5.5 or up and Qt Creator (included with Qt which can be downloaded from http://www.qt.io/download-open-source/) or installed on Linux using one of these commands:
- Ubuntu <16.04 (Xenial Xerus)/Debian < Stretch
- You will need to download the version direct from Qt at http://www.qt.io/download-open-source/ The versions included in the system repositories are too old. The default Qt packages it selects should be all you need, and you can install this version of Qt in a directory within your home directory if you don't want to install it system-wide or replace the system packages. You will also need to run:
sudo apt-get install g++
- Ubuntu >=16.04 (Xenial Xerus)/Debian >= Stretch (tested on Debian, but untested on Ubuntu and may need to be changed a bit)
sudo apt-get install qtcreator qtdeclarative5-dev cmake gcc g++ qmlscene qml-module-qtqml-models2 qt5-default qtdeclarative5-private-dev qtbase5-private-dev qml-module-qtmultimedia qml-module-qtgraphicaleffects # Due to the way Qt is packaged, we also need to install some dependencies.
- Fedora (this one is also untested and may be too old)
yum install qt-creator
- Gentoo (untested)
- Unmask a version of Qt >= 5.5 (needed at the time of writing), then run:
emerge dev-qt/qt-creator
- luna-next-cardshell (This acts as both the system shell and a library of components)
git clone https://github.com/webOS-ports/luna-next-cardshell.git
- luneos-components (This is our shared library of components used across various QML apps and can be found at https://github.com/webOS-ports/luneos-components)
git clone https://github.com/webOS-ports/luneos-components.git
- Configure your build environment:
- Open the luneos-components.pro file in Qt Creator. You could choose another project, but this one gives us a consistent starting point for directions.
- Under Projects (on the left side), go to the Build tab (should be the default) and change the following settings:
- Deactivate Shadow Build.
- For the qmake build steps, click on Details to expand the edit area.
- Set Additional Arguments to:
CONFIG+=desktop
- Now, under the Run tab at the top:
- Set Executable to
qmlscene
- Set Additional Arguments to
-l modules -l test/imports examples/gallery/main.qml
- Under Run Environment, click Details to expand the settings.
- Add a setting called
QT_QUICK_CONTROLS_STYLE
and give it a value ofLuneOS
- Set Executable to
- To make sure that you're using Qt 5.5 (in case you have multiple versions installed):
- Go to Tools->Options and under the Build & Run section, go to the Kits tab and find the Desktop (default) kit.
- Click on the Desktop (default) kit and resize the window so you can see the settings below the kit selector area.
- Make sure your Qt version setting is set to one of the Qt 5.5 options. If you do not have a Qt 5.5 option, you may not have Qt installed correctly. If you have more than one, try and use one of the (System) ones instead of the (qt5) one. If you run into compilation problems, try a different one.
- Try building one of the QML apps:
- luna-next-cardshell (the main launcher for LuneOS)
- Open luna-next-cardshell/qml/luna-next-qml.qmlproject in Qt Creator.
- Click the top green Play button near the bottom left corner of the Qt Creator window.
- FirstUse
- Within the same directory you cloned the other git repos into, run this command to download the FirstUse app:
git clone https://github.com/webOS-ports/org.webosports.app.firstuse.git
- Open org.webosports.app.firstuse/firstuse.qmlproject in Qt Creator.
- Click the top green Play button near the bottom left corner of the Qt Creator window.
- Within the same directory you cloned the other git repos into, run this command to download the FirstUse app:
- Browser
- Phone
- webos-keyboard
- luna-next-cardshell (the main launcher for LuneOS)