• Introduction
  • Dev Environment Setup
  • Developing Apps
  • Data Handling
  • Device Capabilities
  • Testing & Debugging
  • Extending

Build for Sailfish

Setup

Follow the instructions for setting up the development environment for building Sailfish applications.

Modification of build.yml

There are a few sections in build.yml that you should use to customize your output files

sailfish:
    configuration: Release
    target: 'arm'
    target_sdk: 'SailfishOS-2.1.4.13-armv7hl'
    build_threads: 1
    enable_web_engine: true
    device:
        type: real
        device_name: INOI R7 (ARM)
        user: nemo
        key: C:/SailfishOS/vmshare/ssh/private_keys/INOI_R7_(ARM)/nemo
        password: 123
        host: '192.168.2.15'
    extensions: ["mediacapture", "barcode", "signature", "rhoconnect-client", "serialport"]
paths:
    extensions: ["../rhoconnect-client/ext"]
  • configuration – Release or Debug – makes output file built with Release or Debug libs
  • target – ‘arm’ or ‘i486’ – choose a target for a build (i486 is for sailfish emulator)
  • target_sdk – ‘SailfishOS-2.1.4.13-armv7hl’, or another, if you have one – you can choose sdk for building
  • build_threads – a number between 1 and quantity of your processor cores – can make the build go faster

    Note: build_threads in some cases may be a cause of errors – please, start with one thread

  • enable_web_engine – true or false. If you choose true – your application will be based on QtWebEngine, that is not a part of standard sdk. That means – you should install QtWebEngine on your computer and every device, you want to run your application. If you choose false – it will be based on standard QtWebKit.
  • type – ‘real’ or ‘vbox’ – type of the target device
  • device_name – device name, that you can see from Sailfish IDE
  • user – nemo (standard username in a device)
  • key – ssh key of your device. Usually it is placed in ‘/vmshare/ssh/private_keys//nemo’
  • password – that you should set on your device in developer settings
  • host – that is also you should set on your device in developer settings

Extentions

There are some available extentions on sailfish:

mediacapture
barcode
signature
rhoconnect-client
serialport

Building and Running Your Sailfish Application from the Command Line

To build your application you should run the command:

$ rake device:sailfish:production

This command generates rpm file in the <rhodes-app-dir>/bin/target, that could be installed on the phone manually as a production version. But if you want to run an application from a command line, you should connect the device to your computer with a USB cable. You can verify that your device is connected by executing:

$ ping <device_ip>

After that you should deploy an application on the device, using:

$ rake build:sailfish:deploy

After you can run the application by tapping the desktop icon on the device, or you can run a command:

$ rake run:sailfish

Setting your application name, icon and loading screen

You will need to provide a name and icon for the application that the user will see on the device. You can also customize the loading screen that is shown while your application is launching. Refer to the Application Icon and Splash Screen guide for detailed information.

Turn off developer options

Update your application’s configuration files to make sure developer / debug / profile options are turned off.

The below values can be used as a guide for rhoconfig.txt, skip any setting which is not already present.

MinSeverity  = 3
LogToOutput = 0
net_trace = 0
log_skip_post = 0

The below values can be used as a guide for build.yml, skip any setting which is not already present.

profiler: 0
Back to Top