Creating an Asteroid app
Creating an AsteroidOS app can be fun and rewarding. Creating an app requires the installation of the Software Development Kit (SDK) as described in Installing the SDK and/or installing the entire bitbake environment as described in Building AsteroidOS. Note that the process of creating a watchface is a different (and somewhat easier) process documented in Creating a Watchface. Many new users start by customizing an existing watchface before graduating to creating their own watchfaces and perhaps ultimately creating their own apps.
Build methods
There are three ways that developers create or modify applications:
What AsteroidOS developers use is devtool and bitbake, but setting up the entire bitbake environment can be somewhat daunting to beginners and building the entire AsteroidOS uses a lot of resources (time, memory and disk space). The other two methods are a quick and low-resource (in terms of time, memory and disk space required) ways to begin, but have limitations. For this reason, it's recommended to move to using bitbake as soon as practical to avoid these limitations and their corresponding frustrations.
| Method | Advantages | Drawbacks |
|---|---|---|
| command line | simple, fast, easy to set up | doesn't always create .ipk file, doesn't automatically handle dependencies
|
| QtCreator | good for GUI development | difficult to set up, doesn't create .ipk file
|
devtool |
creates .ipk file, correctly handles dependencies |
relatively complex to set up, can be slow to compile |
Having a properly constructed .ipk file not only allows simplified installation on the watch, but also includes dependencies (other libraries on which the code might depend). All of the .ipk files on our nightly builds are created using the OpenEmbedded tool bitbake.
The command-line version build of asteroid-helloworld creates a simple installable .ipk file by adding build instructions for that directly to the CMakeLists.txt file. This works as a temporary fix, but is generally not done for AsteroidOS projects because it would interfere with the way bitbake builds and because it does not automatically include dependencies, as mentioned above.