Reply
Thread Tools
Posts: 1,548 | Thanked: 7,510 times | Joined on Apr 2010 @ Czech Republic
#1
Based on the excellent Building PySide for the BB Playbook tablet guide from the Blackberry-Py project, I've started working on a PySide to BB10 using the final NDK.

PySide enables to use the power of the whole Qt library from applications written completely in Python without any need for compiling anything. It also looks like Python applications should be easily publishable to the Blackberry AppWorld application repository so long as all dependencies are included in the package.

My progress so far is recorded on this wiki page:
http://modrana.org/trac/wiki/BB10

What's working:
  • compiling Qt, Shiboken & PySide using the BB10 NDK
  • compiling Shiboken & PySide against the on-device Qt libs (resulting in much smaller package size)
  • packaging
  • installing to device

What isn't:
  • the example application segfaults when started

More info about the segfault
After the application package is installed on the device & the icon is
clicked a black window briefly shows up and vanishes.
The log in /accounts/1000/appdata/<appname>/logs/log has a this single line:

Process 30396593 (python3.2) terminated SIGSEGV code=1 fltno=11
ip=783abf7c(/base/lib/libcpp.so.4 at _ZNKSt6locale9_GetfacetEj+0x27)
mapaddr=0002bf7c. ref=00000010

The error is still the same, regardless if the Qt libs are custom
compiled & bundled or on-device Qt libs are used.

Even more info about the issue on a corresponding Blackberry-Py mailing list post.

Any help with resolving this issue will be much appreciated !
__________________
modRana: a flexible GPS navigation system
Mieru: a flexible manga and comic book reader
Universal Components - a solution for native looking yet component set independent QML appliactions (QtQuick Controls 2 & Silica supported as backends)
 

The Following 13 Users Say Thank You to MartinK For This Useful Post:
Posts: 1,548 | Thanked: 7,510 times | Joined on Apr 2010 @ Czech Republic
#2
I got it working in the end & I'm now porting Mieru to BB10.

What is working:
  • PySide
  • packaging
  • Qt Components

I plan to properly document the whole lot when I have some time once the BB10 app submission deadline is over.
__________________
modRana: a flexible GPS navigation system
Mieru: a flexible manga and comic book reader
Universal Components - a solution for native looking yet component set independent QML appliactions (QtQuick Controls 2 & Silica supported as backends)

Last edited by MartinK; 2013-01-18 at 21:01.
 

The Following 5 Users Say Thank You to MartinK For This Useful Post:
Posts: 103 | Thanked: 211 times | Joined on Sep 2011
#3
It would be fantastic if you could cook a distutils based hello world that covers dependency resolution and deployment to BB10 device.

By the way, Symbian or Meego Conponents?
 

The Following 2 Users Say Thank You to inean For This Useful Post:
coderus's Avatar
Posts: 6,436 | Thanked: 12,699 times | Joined on Nov 2011 @ Ängelholm, Sweden
#4
Symbian or MeeGo?? Cascades, afaik.
__________________
Telegram | Openrepos | GitHub | Revolut donations
 

The Following User Says Thank You to coderus For This Useful Post:
Posts: 1,548 | Thanked: 7,510 times | Joined on Apr 2010 @ Czech Republic
#5
Originally Posted by inean View Post
It would be fantastic if you could cook a distutils based hello world that covers dependency resolution and deployment to BB10 device.
I'll document the whole lot once the todays application submission deadline is over.

I plan to publish all patches/changes, together with all relevant compiled binaries.

Originally Posted by inean View Post
By the way, Symbian or Meego Conponents?
I actually got both working, first the Symbian ones and then the MeeGo ones. In the end, I used the MeeGo components as that's what my applications are using currently, so I don't have to change the code too much.

These are the Symbian Qt Components:
http://qt.gitorious.org/~conny/qt-co...s/commits/bb10

And these are the MeeGo ones:
http://gitorious.org/~inean/qt-compo...-qt-components
You need a few initial modifications to get them work.
I also needed to do quite a lot of tweaking with styles & component sizes so that it is usable with the high-DPI screen on the BB10 device.

Originally Posted by coderus View Post
Symbian or MeeGo?? Cascades, afaik.
Actually, there is a separate project that works on Python bindings for the Cascades UI, called Tart. My PySide work is based on the PySide port to Playbook they did last summer.

I've also made a few screenshots yesterday of Mieru running on BB10:













More screenshots are available from this folder.
__________________
modRana: a flexible GPS navigation system
Mieru: a flexible manga and comic book reader
Universal Components - a solution for native looking yet component set independent QML appliactions (QtQuick Controls 2 & Silica supported as backends)
 

The Following 3 Users Say Thank You to MartinK For This Useful Post:
Posts: 1,548 | Thanked: 7,510 times | Joined on Apr 2010 @ Czech Republic
#6
In other news I've submitted Mieru to AppWorld yesterday & applied for the Limited Edition Trade-up.

So, what did I actually submit ?

The resulting signed package package was 6.9 MB and included:
  • Mieru
  • the PySide Qt bindings
  • high-DPI tweaked Ineans Qt Components
  • cut-down Qt-Components-Graphics theme
  • libmagic & 2MB magic.mgc database file
  • unrar
  • 768x1280 portrait spashscreen

The application is fully functional:
  • automatic screen rotation & rotation locking works
  • the application correctly saves & restores its state (history, las open chapter & page, options)
  • opening external links in browser works
  • pinch to zoom works

The application starts in about 5 to 6 seconds. From this, about 1200 ms is importing PySide & related stuff, Mieru itself starts in < 400ms. The remaining 4 seconds are taken by the declarative view & co starting up. This is similar to the behavior on Maemo 5 & Harmattan - Python code is started almost immediately, but Qt takes some time to actually show anything on the screen.

BTW, the high-DPI screen on the Dev Alpha device is very good for reading manga/comic books. Mos standart pages are pretty much readable when using fit-to-screen and all are readable without issues with fit-to-width, as can be seen on the screenshots.

I've also compiled a gallery of Mieru at the time of release: see for yourself

The Mieru BB10 adaptation currently lives in the bb10 branch on Github.
__________________
modRana: a flexible GPS navigation system
Mieru: a flexible manga and comic book reader
Universal Components - a solution for native looking yet component set independent QML appliactions (QtQuick Controls 2 & Silica supported as backends)
 

The Following 2 Users Say Thank You to MartinK For This Useful Post:
Posts: 1,548 | Thanked: 7,510 times | Joined on Apr 2010 @ Czech Republic
#7
A couple of updates

BB10 Qt Components source
Based on modified Ineans Qt Components, modified to work with the high-DPI screen & to correctly react to BB10 device orientation changes:
https://qt.gitorious.org/~martink/qt...nts/trees/bb10
See the README about how to build & use the components.

PySide for BB10 source
I've pushed the PySide source code modified to build & run on BB10 to Github:
https://github.com/M4rtinK/shiboken-bb10/tree/bb10
https://github.com/M4rtinK/pyside-bb10/tree/bb10
See this mailing list post for a short guide how all this fits together.

An example application/package template
To see how the final result should look like, check out the Mieru application example:
http://modrana.org/platforms/bb10/ex...xample_1.0.zip

From the included README file:
Code:
Mieru BB10 example
==================

This is an example of a fully functional BB10 application (Mieru),
that uses PySide Qt Components.

Just add your own debug token, build a package & deploy. :)

Contents
========
* Mieru, the flexible manga and comic book reader
* working PySide Qt4 bindings
* modified bbpy files
* working MeeGo QtComponents
* cut-down QtComponents theme
* a working bar-descriptor.xml
* a splashscreen & icon
* cross compiled libmagic & unrar
* package building script & QtC plugin strip script
__________________
modRana: a flexible GPS navigation system
Mieru: a flexible manga and comic book reader
Universal Components - a solution for native looking yet component set independent QML appliactions (QtQuick Controls 2 & Silica supported as backends)
 

The Following 3 Users Say Thank You to MartinK For This Useful Post:
Posts: 1,548 | Thanked: 7,510 times | Joined on Apr 2010 @ Czech Republic
#8
The PySide based Mieru manga & comic book reader port to BB10 is now available from the BalckBerry (App)World !

To install it, visit the Mieru page in World, search for "Mieru" in appworld or just scan this QrCode with the World application



(to switch to the QrCode scanning mode in the World application, swipe from the upper border of the screen and in the menu that shows up, select read barcode)

Testing & feedback is welcome !
__________________
modRana: a flexible GPS navigation system
Mieru: a flexible manga and comic book reader
Universal Components - a solution for native looking yet component set independent QML appliactions (QtQuick Controls 2 & Silica supported as backends)

Last edited by MartinK; 2013-02-16 at 23:55.
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 12:43.