Getting Started

From WebOS-Ports
Revision as of 03:42, 2 January 2016 by KyleMaas (talk | contribs) (Instructions for webos-keyboard)
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)
    1. git clone https://github.com/webOS-ports/luna-next-cardshell.git
  • Configure your build environment:
    1. 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.
    2. Under Projects (on the left side), go to the Build tab (should be the default) and change the following settings:
      1. Deactivate Shadow Build.
      2. For the qmake build steps, click on Details to expand the edit area.
      3. Set Additional Arguments to:
        CONFIG+=desktop
    3. Now, under the Run tab at the top:
      1. Set Executable to
        qmlscene
      2. Set Additional Arguments to
        -l modules -l test/imports examples/gallery/main.qml
      3. Under Run Environment, click Details to expand the settings.
      4. Add a setting called
        QT_QUICK_CONTROLS_STYLE
        and give it a value of
        LuneOS
    4. To make sure that you're using Qt 5.5 (in case you have multiple versions installed):
      1. Go to Tools->Options and under the Build & Run section, go to the Kits tab and find the Desktop (default) kit.
      2. Click on the Desktop (default) kit and resize the window so you can see the settings below the kit selector area.
      3. 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)
      1. Open luna-next-cardshell/qml/luna-next-qml.qmlproject in Qt Creator.
      2. Click the top green Play button near the bottom left corner of the Qt Creator window.
    • FirstUse
      1. 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
      2. Open org.webosports.app.firstuse/firstuse.qmlproject in Qt Creator.
      3. Click the top green Play button near the bottom left corner of the Qt Creator window.
    • Browser
      1. If you are a distro which does not have QtWebEngine available (such as Debian, which has chosen not to distribute QtWebEngine at the time of writing), you will not be able to run the Browser app on the desktop using system Qt packages. Before continuing, please ensure that you have QtWebEngine installed.
      2. Within the same directory you cloned the other git repos into, run this command to download the Browser app:
        git clone https://github.com/webOS-ports/org.webosports.app.browser.git
      3. Open org.webosports.app.browser/browser.qmlproject in Qt Creator.
      4. Click the top green Play button near the bottom left corner of the Qt Creator window. (Not fully tested.)
    • Phone
    • webos-keyboard
      1. You will need the Maliit framework installed. This should be available as a package on Ubuntu (should be called maliit-framework). maliit-framework should also be available on Fedora. At the time of writing, this does not appear to be available on Debian outside of the experimental branch.
      2. Within the same directory you cloned the other git repos into, run this command to download the Keyboard app:
        git clone https://github.com/webOS-ports/webos-keyboard.git
      3. Open webos-keyboard/luneos-keyboard.pro in Qt Creator.
      4. Click the Configure Project button to set up basic build settings and continue.
      5. Click the top green Play button near the bottom left corner of the Qt Creator window. (Not fully tested.)