I've set up a temporary Github project to maintain the work in progress on Miroil. It is here:
This contains forks of two projects: Mir and QtMir. These can be kept in step with the growing Miroil API.
So that these can be used together, the default branch (
mir-1.9-miroil) of Mir is based upon Mir 1.8, and the default branch (
miroil) of QtMir is based on
This is work I started last year and have been continued by "erlend-g" this year.
The problem and the approach
Currently QtMir can only build against Mir 1.x as it depends on some APIs that were removed in Mir 2.x. Miroil is intended to replace the missing functionality by moving some logic from QtMir to Miroil.
By publishing the functionality as new, cleaner APIs in Miroil this will make it possible to use QtMir on Mir 2.x. This is important for UBports as QtMir is the library that Lomiri uses to work on Mir.
By basing this work in progress on Mir 1.x, it is possible to make incremental changes to both Miroil and QtMir while everything keeps running. In particular, it is possible to run the QtMir demo and tests (but see below) following changes to these projects.
Getting and building the source
QtMir has a bunch of dependencies that are not in the Ubuntu archive, so the best approach I've found is to take an Ubuntu 16.04 system (installed on an old laptop) and add the UBports archive. (It is also possible to a VM, but this stack needs 3D acceleration enabled, and there may be other quirks.)
So, on a 16.04 system:
sudo apt-add-repository http://repo.ubports.com/ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4BD4B4D6DBB583F1 sudo apt update sudo apt dist-upgrade
Next, add some development tools and clone and build Mir:
sudo apt install devscripts equivs git git clone --recursive https://github.com/MirOil-for-Lomiri/mir.git cd mir sed -i /.*wlcs.*/d debian/control mk-build-deps -i -s sudo mkdir build cd build cmake -DMIR_ENABLE_WLCS_TESTS=off .. make -4
Then install in /usr/local:
sudo make install sudo ldconfig
Clone QtMir, get the remaining dependencies and build:
git clone https://github.com/MirOil-for-Lomiri/qtmir.git cd qtmir mk-build-deps -i -s sudo mkdir -p cmake-build-debug cd cmake-build-debug cmake -DCMAKE_INSTALL_PREFIX=/usr/local .. make -j 4 all test
Note that one of the tests crashes:
Test #9: ApplicationManager ...............***Exception: SegFault 0.28 sec. That happens on the upstream branch too and I've not investigated further.
Then install in /usr/local:
sudo make install sudo ldconfig sudo ln -s /usr/local/share/glib-2.0/schemas/com.canonical.qtmir.gschema.xml /usr/share/glib-2.0/schemas/ sudo glib-compile-schemas /usr/share/glib-2.0/schemas/
Running the demo
The demos are in the
export QT_QPA_PLATFORM_PLUGIN_PATH=/usr/local/lib/qt5/plugins/platforms export QML2_IMPORT_PATH=/usr/local/lib/qt5/qml export QT_QPA_PLATFORM=mirserver export MIR_SERVER_ENABLE_MIRCLIENT= export MIR_SERVER_CURSOR=null qmlscene demos/qml-demo-shell/qml-demo-shell.qml
I'm in the process of syncing the Mir branch with the changes upstream, and have re-sync'ed the QtMir branch. I've invited @mariogrip and "erlend-g" to join the project, and anyone else interested in helping should contact me.
Hi! I've started working on this... How should I work with this?
Create a branch and then send you PR? Or push changes directly into miroil branch?
Any way I don't have permission to push to a new branch....
Hi @erlend, thanks.
Please make PRs and I'll review as I get time. And also sync the work back to upstream MirOil branch.
I can also add you to the MirOil-for-Lomiri project to make that a little easier (need your github ID for that).
I do want to do an update about this work as:
- it is now possible to use a 20.04 base using the http://repo2.ubports.com/ repository; and,
- QtMir has migrated to gitlab (but I still need to sync with the right branch)
Okey... Shall I wait until you have updated it to 20.04? or can I start now?
What do you think?
Github id is: 58894514 (erlend-g)
@erlend don't wait for me.
I still haven't got write permission to qtmir... Need it to create a branch... I tried forking the project but that does not work since i have already forked ubports/qtmir. I can't fork it more that once.
Can you fix that?
@alan_g Yes,Works.. Thank You!