Wikipedia for Sailfish OS
So far it demonstrates a use of Sailfish Silica library and how you wrap the app, add icon, etc.
- Do a git clone of the sources.
- Fetch submodules used by running ./init.sh or manually run commands from it if you are on a system without bash shell It will [hopefully] fail to fetch subcomponent AppStoreKeys that points to the Artem's private repository. That's okay. App should be fully functional without it (will fallback to the default demo keys), if you do have access to that component, app will use keys actually used for the app store.
However, make sure that the directory src/qml/components/AppStoreKeys exists even if empty.
In your own app you probably will do the other way around, have your settings as a part of the main project and use external libraries as submodules. The approach used here is just the simplest way for me (Artem) to show you full app code, yet keep exactly production settings separate.
The following assumes that you have installed the SailfishOS SDK into your home directory under the name SailfishOS, and that you want to build an RPM package that you can install on the Jolla phone.
-
Make sure MerSDK virtual machine is running. Easiest way to check it and start if needed is from Qt Creator. Look for it's icon in the bottom left of the screen.
-
Connect to the virtual machine of the Sailfish SDK build engine:
ssh -p 2222 -i ~/SailfishOS/vmshare/ssh/private_keys/engine/mersdk mersdk@localhost
- Change to the same directory where you have your git clone:
cd git/Wikipedia
- Prepare the build:
mb2 -t SailfishOS-armv7hl qmake
- Execute the build (producing packages in the RPMS directory):
mb2 -t SailfishOS-armv7hl rpm
-
File -> Open File or Project... -> Wikipedia/wikipedia.pro
-
Uncheck Desktop, tick MerSDK-SailfishOS-i486-x86 (and/or arm) options
-
Start Sdk and Emulator (bottom-left toolbar icons)
-
Configure build configuration (toolbar icon "wikipedia Debug"): "i486-x86" & "Deploy as RPM package"
-
Run (toolbar play button)
-
Now the application should build, install and launch in the emulator.
-
To use a phone instead of the emulator, switch from "i486-x86" to "arm".
Tests should be run as
/usr/share/tst-harbour-wikipedia/runTestsOnDevice.sh
from emulator command line (or specify it as "Use this command instead" inside Creator)
- Figure out a way to launch command line build from the host system (i.e. launch ssh and perform stuff there?) and get succes status back, so that automating everything Continuous Integration style could be possible.
Best way to get support is to ask at #sailfishos channel at Freenode IRC. If you really-really need to clarify something, shoot an email to [email protected]
License is Attribution-NonCommercial-ShareAlike 3.0 Unported ( http://creativecommons.org/licenses/by-nc-sa/3.0/ ) so as long as you share alike and provide a link to https://github.com/amarchen/Wikipedia (e.g. in your app About dialog) you are free to reuse the code in any non-commercial project.
Note that Artem himself keeps the right to use the contributed code in commercial purposes too. Particularly he may like to start charging for the Wikipedia app. You can, however, release the non-commercial clone if you like.