maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Competitors (https://talk.maemo.org/forumdisplay.php?f=4)
-   -   [ANNOUNCE] PySide for BB10 (https://talk.maemo.org/showthread.php?t=88608)

MartinK 2013-01-10 11:14

[ANNOUNCE] PySide for BB10
 
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 ! :)

MartinK 2013-01-18 20:57

Re: [ANNOUNCE] PySide for BB10
 
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. :)

inean 2013-01-21 10:34

Re: [ANNOUNCE] PySide for BB10
 
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? ;)

coderus 2013-01-21 10:42

Re: [ANNOUNCE] PySide for BB10
 
Symbian or MeeGo?? Cascades, afaik.

MartinK 2013-01-21 11:25

Re: [ANNOUNCE] PySide for BB10
 
Quote:

Originally Posted by inean (Post 1316271)
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.

Quote:

Originally Posted by inean (Post 1316271)
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.

Quote:

Originally Posted by coderus (Post 1316273)
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:
http://www.modrana.org/images/bb10/m...G_00000003.png
http://www.modrana.org/images/bb10/m...G_00000004.png
http://www.modrana.org/images/bb10/m...G_00000001.png

http://www.modrana.org/images/bb10/m...G_00000014.png
http://www.modrana.org/images/bb10/m...G_00000025.png

http://www.modrana.org/images/bb10/m...G_00000017.png

http://www.modrana.org/images/bb10/m...G_00000016.png

http://www.modrana.org/images/bb10/m...G_00000027.png

More screenshots are available from this folder.

MartinK 2013-01-22 15:21

Re: [ANNOUNCE] PySide for BB10
 
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.

MartinK 2013-01-28 19:04

Re: [ANNOUNCE] PySide for BB10
 
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


MartinK 2013-02-16 23:48

Re: [ANNOUNCE] PySide for BB10
 
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

http://modrana.org/images/qrcodes/mi...rld_qrcode.png

(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 ! :)


All times are GMT. The time now is 11:54.

vBulletin® Version 3.8.8