several fixes and improvements for SailfishOS install

This commit is contained in:
pls.153 2023-10-10 14:45:06 +02:00
parent c264025a60
commit 8c85e8a1ee
10 changed files with 155 additions and 88 deletions

1
.gitignore vendored
View file

@ -30,3 +30,4 @@ qrc_*.cpp
assets assets
android-build android-build
*.tgz *.tgz
*.rpm

View file

@ -1,4 +1,4 @@
QT += bluetooth sql network # positioning QT += bluetooth sql network
TEMPLATE = lib TEMPLATE = lib
CONFIG += c++17 plugin release no_keywords CONFIG += c++17 plugin release no_keywords
DEFINES += PLUGIN DEFINES += PLUGIN

View file

@ -0,0 +1,99 @@
;;; download (using wget) all rpms for qt5.15 app development
;;;
;;; note that some files in the list have 2 versions, depending on the arch
;;; (you will see 'not found' for those files, which is not an error)
;; set arch here
(defvar *arch* (nth 0 '("armv7hl" "aarch64")))
(defvar *url* "https://repo.sailfishos.org/obs/sailfishos:/chum/4.5.0.19_~A/~A/")
(defvar *files*
'("opt-kf5-karchive-5.108.0-1.5.2.jolla.~A.rpm"
"opt-kf5-kauth-5.108.0-1.4.1.jolla.~A.rpm"
"opt-kf5-kbookmarks-5.108.0-1.4.1.jolla.~A.rpm"
"opt-kf5-kcodecs-5.108.0-1.5.1.jolla.~A.rpm"
"opt-kf5-kcompletion-5.108.0-1.4.1.jolla.~A.rpm"
"opt-kf5-kconfig-5.108.0-1.5.1.jolla.~A.rpm"
"opt-kf5-kconfig-core-5.108.0-1.5.1.jolla.~A.rpm"
"opt-kf5-kconfig-gui-5.108.0-1.5.1.jolla.~A.rpm"
"opt-kf5-kconfigwidgets-5.108.0-1.5.1.jolla.~A.rpm"
"opt-kf5-kcoreaddons-5.108.0-1.5.1.jolla.~A.rpm"
"opt-kf5-kcrash-5.108.0-1.4.1.jolla.~A.rpm"
"opt-kf5-kdbusaddons-5.108.0-1.5.1.jolla.~A.rpm"
"opt-kf5-kguiaddons-5.108.0-1.5.1.jolla.~A.rpm"
"opt-kf5-ki18n-5.108.0-1.5.1.jolla.~A.rpm"
"opt-kf5-kiconthemes-5.108.0-1.5.1.jolla.~A.rpm"
"opt-kf5-kio-core-5.108.0-1.7.1.jolla.~A.rpm"
"opt-kf5-kio-core-libs-5.108.0-1.7.1.jolla.~A.rpm"
"opt-kf5-kio-file-widgets-5.108.0-1.7.1.jolla.~A.rpm"
"opt-kf5-kio-gui-5.108.0-1.7.1.jolla.~A.rpm"
"opt-kf5-kio-widgets-5.108.0-1.7.1.jolla.~A.rpm"
"opt-kf5-kio-widgets-libs-5.108.0-1.7.1.jolla.~A.rpm"
"opt-kf5-kirigami2-5.108.0-1.6.1.jolla.~A.rpm"
"opt-kf5-kitemviews-5.108.0-1.5.1.jolla.~A.rpm"
"opt-kf5-kjobwidgets-5.108.0-1.4.1.jolla.~A.rpm"
"opt-kf5-knotifications-5.108.0-1.5.1.jolla.~A.rpm"
"opt-kf5-kquickcharts-5.108.0-1.5.1.jolla.~A.rpm"
"opt-kf5-kservice-5.108.0-1.4.1.jolla.~A.rpm"
"opt-kf5-kwallet-5.108.0-1.4.1.jolla.~A.rpm"
"opt-kf5-kwallet-libs-5.108.0-1.4.1.jolla.~A.rpm"
"opt-kf5-kwidgetsaddons-5.108.0-1.5.1.jolla.~A.rpm"
"opt-kf5-kwindowsystem-5.108.0-1.5.1.jolla.~A.rpm"
"opt-kf5-kxmlgui-5.108.0-1.4.1.jolla.~A.rpm"
"opt-kf5-solid-5.108.0-1.4.1.jolla.~A.rpm"
"opt-plasma-integration-5.27.4+git1-1.2.7.jolla.~A.rpm" ; armv7hl
"opt-plasma-integration-5.27.4+git1-1.2.6.jolla.~A.rpm" ; aarch64
"opt-qt5-qtbase-5.15.10+kde137-1.3.1.jolla.~A.rpm"
"opt-qt5-qtbase-common-5.15.10+kde137-1.3.1.jolla.noarch.rpm"
"opt-qt5-qtbase-devel-5.15.10+kde137-1.3.1.jolla.~A.rpm"
"opt-qt5-qtbase-gui-5.15.10+kde137-1.3.1.jolla.~A.rpm"
"opt-qt5-qtconnectivity-5.15.10+kde4-1.3.1.jolla.~A.rpm"
"opt-qt5-qtconnectivity-devel-5.15.10+kde4-1.3.1.jolla.~A.rpm"
"opt-qt5-qtdeclarative-5.15.10+kde29-1.3.1.jolla.~A.rpm"
"opt-qt5-qtdeclarative-devel-5.15.10+kde29-1.3.1.jolla.~A.rpm"
"opt-qt5-qtdeclarative-tools-5.15.10+kde29-1.3.1.jolla.~A.rpm"
"opt-qt5-qtgraphicaleffects-5.15.10-1.3.1.jolla.~A.rpm"
"opt-qt5-qtimageformats-5.15.10+kde9-1.3.1.jolla.~A.rpm"
"opt-qt5-qtlocation-5.15.10+kde4-1.5.1.jolla.~A.rpm"
"opt-qt5-qtlocation-devel-5.15.10+kde4-1.5.1.jolla.~A.rpm"
"opt-qt5-qtmultimedia-5.15.10+kde3-1.3.1.jolla.~A.rpm"
"opt-qt5-qtmultimedia-devel-5.15.10+kde3-1.3.1.jolla.~A.rpm"
"opt-qt5-qtquickcontrols-5.15.10-1.3.1.jolla.~A.rpm"
"opt-qt5-qtquickcontrols2-5.15.10+kde6-1.3.1.jolla.~A.rpm"
"opt-qt5-qtquickcontrols2-devel-5.15.10+kde6-1.3.1.jolla.~A.rpm"
"opt-qt5-qtsensors-5.15.10-1.3.1.jolla.~A.rpm"
"opt-qt5-qtsensors-devel-5.15.10-1.3.1.jolla.~A.rpm"
"opt-qt5-qtsvg-5.15.10+kde8-1.3.1.jolla.~A.rpm"
"opt-qt5-qtwayland-5.15.10+kde52-1.3.1.jolla.~A.rpm"
"opt-qt5-qtwebchannel-5.15.10+kde3-1.3.1.jolla.~A.rpm"
"opt-qt5-qtwebsockets-5.15.10+kde2-1.3.1.jolla.~A.rpm"
"opt-qt5-qtwebview-5.15.10-1.3.2.jolla.~A.rpm"
"opt-qt5-rpm-macros-5.15.10-1.4.1.jolla.noarch.rpm"
"opt-qt5-sfos-maliit-platforminputcontext-1.0.1-1.1.4.jolla.~A.rpm" ; armv7hl
"opt-qt5-sfos-maliit-platforminputcontext-1.0.1-1.1.3.jolla.~A.rpm" ; aarch64
"qqc2-breeze-style-5.27.4+git1-1.2.8.jolla.~A.rpm" ; armv7hl
"qqc2-breeze-style-5.27.4+git1-1.2.7.jolla.~A.rpm" ; aarch64
"qt-runner-0.4.0-1.6.1.jolla.~A.rpm"))
(defun run ()
(let ((to-dir (format nil "rpms/~A/" *arch*))
(to-dir-devel (format nil "rpms/~A-devel/" *arch*)))
(ensure-directories-exist to-dir)
(dolist (file *files*)
(let* ((noarch (search "noarch" file))
(devel (search "devel" file))
(url (format nil *url* *arch* (if noarch "noarch" *arch*)))
(rpm (if noarch
file
(format nil file *arch*))))
(unless (probe-file (concatenate 'string to-dir rpm))
(let ((s (ext:run-program "wget" (list (concatenate 'string url rpm)
"-P"
(if devel to-dir-devel to-dir)))))
(loop :for line = (read-line s nil nil)
:while line :do (princ line) (terpri)
:finally (close s))))))))
(run)

View file

@ -1,105 +1,49 @@
Manual installation of Qt5.15 rpms directly on device # Manual installation of Qt5.15 rpms directly on device
-----------------------------------------------------
Important: this requires **SailfishOS 4.5**.
Please note that this is not a straightforward way to install, and may turn out Please note that this is not a straightforward way to install, and may turn out
being tedious (I'm not a SailfishOS expert and have very limited experience). being tedious (I'm not a SailfishOS expert and have very limited experience).
(for **armv7hl**, replace with **aarch64** for 64bit) To download all rpms (on desktop Linux), set architecture (default: `armv7hl`)
in file `donwload-rpms.lisp` and run it in ECL:
Download from repo (see file list at bottom):
``` ```
https://repo.sailfishos.org/obs/sailfishos:/chum/4.5.0.19_armv7hl/armv7hl/ ecl -shell download-rpms.lisp ; will download to 'rpms/<arch>/'
``` ```
Download all files in one directory and install with:
## Installing all base rpms
Copy the rpms to device (see `sshfs`) and install with (beware that this will
give some unmet dependencies):
``` ```
$ devel-su rpm -U --force *.rpm $ ./install.sh
``` ```
On missing SailfishOS lib dependencies, search for package providing the lib On missing SailfishOS lib dependencies, search for package providing the lib
with: with:
``` ```
$ zypper search <name> $ zypper search <name> # omit 'lib' if not found
``` ```
and install with: and install with:
``` ```
$ devel-su zypper install <name> $ devel-su zypper install <name from search>
``` ```
Repeat until above `install.sh` is successful.
To force package install even with missing dependencies - may occur with rpms
that require e.g. `pkgconfig(...)`, even with standard `pkgconfig` already ## Installing devel rpms
installed - you can extract the rpm locally with:
First ensure that `pkgconfig` is already installed:
``` ```
$ rpm2cpio <rpm> | cpio -idmv devel-su zypper install pkgconfig
``` ```
and copy the extracted files under `/opt/` and `/usr/`: All `*-devel` packages must be extracted and copied manually, because they all
have missing `pkgconfig(...)` dependencies (which we won't need anyway).
To do the above, just run the following scipt:
``` ```
$ devel-su cp -r opt/* /opt/ cd ../<arch>-devel/
$ devel-su cp -r usr/* /usr/ ./extract-and-copy.sh
```
File list to download:
```
opt-kf5-karchive-5.108.0-1.5.2.jolla.armv7hl.rpm
opt-kf5-kauth-5.108.0-1.4.1.jolla.armv7hl.rpm
opt-kf5-kbookmarks-5.108.0-1.4.1.jolla.armv7hl.rpm
opt-kf5-kcodecs-5.108.0-1.5.1.jolla.armv7hl.rpm
opt-kf5-kcompletion-5.108.0-1.4.1.jolla.armv7hl.rpm
opt-kf5-kconfig-5.108.0-1.5.1.jolla.armv7hl.rpm
opt-kf5-kconfig-core-5.108.0-1.5.1.jolla.armv7hl.rpm
opt-kf5-kconfig-gui-5.108.0-1.5.1.jolla.armv7hl.rpm
opt-kf5-kconfigwidgets-5.108.0-1.5.1.jolla.armv7hl.rpm
opt-kf5-kcoreaddons-5.108.0-1.5.1.jolla.armv7hl.rpm
opt-kf5-kcrash-5.108.0-1.4.1.jolla.armv7hl.rpm
opt-kf5-kdbusaddons-5.108.0-1.5.1.jolla.armv7hl.rpm
opt-kf5-kguiaddons-5.108.0-1.5.1.jolla.armv7hl.rpm
opt-kf5-ki18n-5.108.0-1.5.1.jolla.armv7hl.rpm
opt-kf5-kiconthemes-5.108.0-1.5.1.jolla.armv7hl.rpm
opt-kf5-kio-core-5.108.0-1.7.1.jolla.armv7hl.rpm
opt-kf5-kio-core-libs-5.108.0-1.7.1.jolla.armv7hl.rpm
opt-kf5-kio-file-widgets-5.108.0-1.7.1.jolla.armv7hl.rpm
opt-kf5-kio-gui-5.108.0-1.7.1.jolla.armv7hl.rpm
opt-kf5-kio-widgets-5.108.0-1.7.1.jolla.armv7hl.rpm
opt-kf5-kio-widgets-libs-5.108.0-1.7.1.jolla.armv7hl.rpm
opt-kf5-kirigami2-5.108.0-1.6.1.jolla.armv7hl.rpm
opt-kf5-kitemviews-5.108.0-1.5.1.jolla.armv7hl.rpm
opt-kf5-kjobwidgets-5.108.0-1.4.1.jolla.armv7hl.rpm
opt-kf5-knotifications-5.108.0-1.5.1.jolla.armv7hl.rpm
opt-kf5-kquickcharts-5.108.0-1.5.1.jolla.armv7hl.rpm
opt-kf5-kservice-5.108.0-1.4.1.jolla.armv7hl.rpm
opt-kf5-kwallet-5.108.0-1.4.1.jolla.armv7hl.rpm
opt-kf5-kwallet-libs-5.108.0-1.4.1.jolla.armv7hl.rpm
opt-kf5-kwidgetsaddons-5.108.0-1.5.1.jolla.armv7hl.rpm
opt-kf5-kwindowsystem-5.108.0-1.5.1.jolla.armv7hl.rpm
opt-kf5-kxmlgui-5.108.0-1.4.1.jolla.armv7hl.rpm
opt-kf5-solid-5.108.0-1.4.1.jolla.armv7hl.rpm
opt-plasma-integration-5.27.4\+git1-1.2.7.jolla.armv7hl.rpm
opt-qt5-qtbase-5.15.10\+kde137-1.3.1.jolla.armv7hl.rpm
opt-qt5-qtbase-common-5.15.10\+kde137-1.3.1.jolla.noarch.rpm
opt-qt5-qtbase-devel-5.15.10+kde137-1.3.1.jolla.armv7hl.rpm
opt-qt5-qtbase-gui-5.15.10\+kde137-1.3.1.jolla.armv7hl.rpm
opt-qt5-qtconnectivity-5.15.10\+kde4-1.3.1.jolla.armv7hl.rpm
opt-qt5-qtconnectivity-devel-5.15.10+kde4-1.3.1.jolla.armv7hl.rpm
opt-qt5-qtdeclarative-5.15.10\+kde29-1.3.1.jolla.armv7hl.rpm
opt-qt5-qtdeclarative-devel-5.15.10+kde29-1.3.1.jolla.armv7hl.rpm
opt-qt5-qtdeclarative-tools-5.15.10+kde29-1.3.1.jolla.armv7hl.rpm
opt-qt5-qtgraphicaleffects-5.15.10-1.3.1.jolla.armv7hl.rpm
opt-qt5-qtimageformats-5.15.10+kde9-1.3.1.jolla.armv7hl.rpm
opt-qt5-qtlocation-5.15.10\+kde4-1.5.1.jolla.armv7hl.rpm
opt-qt5-qtlocation-devel-5.15.10+kde4-1.5.1.jolla.armv7hl.rpm
opt-qt5-qtmultimedia-5.15.10+kde3-1.3.1.jolla.armv7hl.rpm
opt-qt5-qtmultimedia-devel-5.15.10+kde3-1.3.1.jolla.armv7hl.rpm
opt-qt5-qtquickcontrols-5.15.10-1.3.1.jolla.armv7hl.rpm
opt-qt5-qtquickcontrols2-5.15.10\+kde6-1.3.1.jolla.armv7hl.rpm
opt-qt5-qtquickcontrols2-devel-5.15.10+kde6-1.3.1.jolla.armv7hl.rpm
opt-qt5-qtsensors-5.15.10-1.3.1.jolla.armv7hl.rpm
opt-qt5-qtsvg-5.15.10\+kde8-1.3.1.jolla.armv7hl.rpm
opt-qt5-qtwayland-5.15.10\+kde52-1.3.1.jolla.armv7hl.rpm
opt-qt5-qtwebchannel-5.15.10\+kde3-1.3.1.jolla.armv7hl.rpm
opt-qt5-qtwebengine-5.15.14-1.2307312104.armv7hl.rpm
opt-qt5-qtwebsockets-5.15.10+kde2-1.3.1.jolla.armv7hl.rpm
opt-qt5-qtwebview-5.15.10-1.3.2.jolla.armv7hl.rpm
opt-qt5-rpm-macros-5.15.10-1.4.1.jolla.noarch.rpm
opt-qt5-sfos-maliit-platforminputcontext-1.0.1-1.1.4.jolla.armv7hl.rpm
qqc2-breeze-style-5.27.4\+git1-1.2.8.jolla.armv7hl.rpm
qt-runner-0.4.0-1.6.1.jolla.armv7hl.rpm
``` ```
Now you should be able to compile lqml, using this qmake: `/opt/qt5/bin/qmake`.

View file

@ -0,0 +1,7 @@
#/bin/sh
for rpm in *.rpm; do
rpm2cpio $rpm | cpio -idmv
done
devel-su cp -r opt/* /opt/

View file

@ -0,0 +1 @@
devel-su rpm -U --force *.rpm

View file

@ -0,0 +1,7 @@
#/bin/sh
for rpm in *.rpm; do
rpm2cpio $rpm | cpio -idmv
done
devel-su cp -r opt/* /opt/

View file

@ -0,0 +1 @@
devel-su rpm -U --force *.rpm

View file

@ -1,10 +1,17 @@
Building ECL + LQML Building ECL + LQML
------------------- -------------------
*Please note that using the optional Qt5.15 libs (otherwise lqml would not
compile) means that we won't have native look & feel, and integration with
SailfishOS is not optimal, but this seems the only feasible way to run it,
because backporting everything to Qt5.6 (from native SailfishOS) is not a
realistic option.*
If you run Linux on your desktop, the simplest way to build and develop is just If you run Linux on your desktop, the simplest way to build and develop is just
doing it directly on the device (only this route is described here - no bloated doing it directly on the device (only this route is described here).
SDK or similar is needed, but Qt5.15 installation may result being tedious, but
I got it to work like described here). No bloated SDK or similar is needed, although Qt5.15 devel installation is a
little tedious. Anyway I got it to work as described here.
After connecting your Sailfish device via USB, open 2 console tabs on Linux: After connecting your Sailfish device via USB, open 2 console tabs on Linux:

View file

@ -73,7 +73,7 @@ SailfishOS note
On Sailfish it runs using **Qt5.15** and **qt-runner**, so it's not really On Sailfish it runs using **Qt5.15** and **qt-runner**, so it's not really
'native' (in a pure sense) and doesn't have native look and feel, but that's 'native' (in a pure sense) and doesn't have native look and feel, but that's
the only feasable way to run it on that platform, see the only feasible way to run it on that platform, see
[readme-sailfish](readme-sailfish.md). [readme-sailfish](readme-sailfish.md).