The Mer Wiki now uses your Mer user account and password (create account on https://bugs.merproject.org/)


Sailfish/ButterflyTouch

From Mer Wiki
< Sailfish(Difference between revisions)
Jump to: navigation, search
(Added debugging instructions)
m
Line 1: Line 1:
Work in progress. This is mostly inspired from the [[Sailfish/Exopc|ExoPC]] tutorial, with adaptation for this hardware.
+
Work in progress. This is mostly inspired from the [[Sailfish/Exopc|ExoPC]] tutorial, with adaptation for this hardware, and has been updated to use the Qt5/Wayland new SDK Alpha.
  
 
= Install Sailfish SDK Emulator on ButterflyTouch =
 
= Install Sailfish SDK Emulator on ButterflyTouch =

Revision as of 16:10, 4 August 2013

Work in progress. This is mostly inspired from the ExoPC tutorial, with adaptation for this hardware, and has been updated to use the Qt5/Wayland new SDK Alpha.

Contents

Install Sailfish SDK Emulator on ButterflyTouch

This page has instructions on how to install Sailfish SDK emulator on your Packard Bell Butterfly Touch.

It is a x86 (Intel SU4100 dual core x86_64) based laptop/tablet PC. It has a 11.6" resistive touch screen (1366x768). It uses a Intel GM45 Express Chipset.

Install Steps

USB key setup

  • Extract root filesystem from emulator virtualbox image
VBoxManage internalcommands converttoraw ~/SailfishOS/emulator/sailfishos.vdi sailfish.raw
  • Copy to flash key
sudo dd if=sailfish.raw of=/dev/sd* bs=4M
sync
  • Mount flash key
  • Edit /boot/extlinux/extlinux.conf to boot from sdb1 and add rootwait

Running on the ButterflyTouch

  • The following has been done with Ethernet cable plugged. Wifi activation could be added later on.
  • Place the USB key in ButteflyTouch
  • Boot, press F12 button to access boot device selection menu and select USB
  • Ctrl/Alt F2 - Login root/(no password)
  • sshd is already launched by default, but the root account needs a password to allow to connect to it [Edit : as user nemo is in the sudoers, it may not be needed, as nemo can do all this].
  • launch command "passwd", and set the password to nemo.

From now on, you can connect remotely to do the following (it allows copy/pasting the command from a browser and not typing by hand).

  • Edit /usr/lib/qt5/qml/Sailfish/Silica/ApplicationWindow.qml
//width: _transpose ? screen.height : screen.width
//height: _transpose ? screen.width : screen.height
width: 1366
height: 768
  • Put the display in portrait mode.

The original command don't work anymore, so edit the file manually :

vim /etc/gconf/gconf.xml.mandatory/desktop/jolla/components/%gconf.xml

and replace the angle "0" by "90".

The original command was:

su nemo # to switch to nemo user
gconftool-2 --set /desktop/jolla/components/screen_rotation_angle --type int 90
  • reboot the system, press F12 to select boot from USB, and then it should boot to sailfish, with the graphical interface showing.

Working parts

  • Touchscreen
  • General sailfish interface
  • The silica component demo

Known issues

  • If screen shut down (after a few seconds on the home screen), the only way to light it again is to type a key (shows command line), then touch the screen (show the graphical interface).


Interface with QtCreator

QtCreator can be used to compile and send the program to a remote device, not only the emulator.

Change some rights on the device

As the process to deploy the file is not exactly the same than with the emulator, some rights have to be changed, so that the sftp commands don't fail.

sudo chmod og+w /usr/bin/
sudo chmod og+w /usr/share
sudo chmod og+w /usr/share/applications/

The first is where the binary will be put, the second where a directory will be created to contains the app data, and the last is where the icon shortcut will be placed.

Create a new Device

In QtCreator menu "Options/Devices":

  • "Add"
  • "Generic Linux Device"
  • Connection data page:
    • Name : "Butterfly"
    • IP : "192.168.1.xxx"
    • User name : "nemo"
    • Authentication type : "Password"
    • User password : "nemo"


Create a new Kit

In QtCreator menu "Options/Build & Run", in tab "Kits":

  • Select "MerSDK-sailfishOS-i486-x86"
  • "Clone"
  • select "Clone of MerSDK-sailfishOS-i486-x86" and change :
    • Name : "Butterfly"
    • Device type : "Generic Linux Device"
    • Device : "Butterfly"

Add the kit to the project

If the project is opened, click on the "Projects" icon on the left tab (CTRL+4 shortcut). Click "Add Kit", and select "Butterfly"

Compile/Run

Run the project as usual. Take care the kit "Buttefly" is selected

Debug

Debugging seems to work (I never debugged a QML app yet, so don't know if it is fully functionnal). However, as stated in the SDK known issues (https://sailfishos.org/wiki/SDK_Alpha_Qt5_Known_Issues), to be able to do it, first run this command:

sudo zypper in qt5-qtdeclarative-plugin-qmlinspector

It will install the missing package that is needed.

Then simply press "F5" or click on the debug button in QtCreator to build/deploy/run with debugging support. You can place breakpoints and see QML/js console messages.

Known issues

  • icon is not shown : replace in the "Other files/HelloWorld.desktop" file the "Icon=" by one icon that exist, for example "icon-launcher-default" (default icon-launcher-gallery don't exist in the emulator)
  • program crash when run from the icon : replace in the "Other files/HelloWorld.desktop" file the "Exec=" line by : "invoker --type=j -s /usr/bin/HelloWorld"
  • cannot deploy as RPM, only by copying binaries (due to having selected a ""Generic Linux Device", and not a Mer Emulator)
Personal tools