diff --git a/platforms/sailfish/download-rpms.lisp b/platforms/sailfish/download-rpms.lisp deleted file mode 100644 index 98e5737..0000000 --- a/platforms/sailfish/download-rpms.lisp +++ /dev/null @@ -1,101 +0,0 @@ -;;; 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 cc (&rest args) - (apply 'concatenate 'string args)) - -(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*))) - (to-dir* (if devel to-dir-devel to-dir))) - (unless (probe-file (cc to-dir* rpm)) - (let ((s (ext:run-program "wget" (list (cc url rpm) "-P" to-dir*)))) - (loop :for line = (read-line s nil nil) - :while line :do (princ line) (terpri) - :finally (close s)))))))) - -(run) - diff --git a/platforms/sailfish/qt5.15-installation.md b/platforms/sailfish/qt5.15-installation.md new file mode 100644 index 0000000..528cd89 --- /dev/null +++ b/platforms/sailfish/qt5.15-installation.md @@ -0,0 +1,33 @@ +# Installation of optional Qt5.15 directly on device + +Important: this requires **SailfishOS 4.5**. + +Go to this site [chumrpm.netlify.app](https://chumrpm.netlify.app/) and +download/install **sailfishos-chum-gui** (you don't need the gui, but it's +practical to see what's installed on your phone). + +Important: choose **4.5.0.19** as chum-gui version, this is guaranteed +to work with Qt5.15 (not all versions have all required rpms we need). + +Above app will add the `chum` repo we will need here. + +Just install the following packages (that's all we need here): +``` +$ devel-su zypper install qt-runner +$ devel-su zypper install opt-qt5-qtdeclarative-devel +$ devel-su zypper install opt-qt5-qtconnectivity-devel +$ devel-su zypper install opt-qt5-qtlocation-devel +$ devel-su zypper install opt-qt5-qtmultimedia-devel +$ devel-su zypper install opt-qt5-qtquickcontrols2-devel +$ devel-su zypper install opt-qt5-qtsensors-devel +``` +In one occasion (opt-qtdeclarative-devel) it will say: +``` +Problem: This request will break your system! +nothing provides 'pkgconfig(android-headers)' needed by the to be installed libhybris-devel +``` +You can safely ignore this warning, nothing will really break, just choose: +``` +Solution 3: break libhybris-devel by ignoring some of its dependencies +``` +Now you should be able to build/install the `lqml` executable and library. diff --git a/platforms/sailfish/qt5.15-rpm-installation.md b/platforms/sailfish/qt5.15-rpm-installation.md deleted file mode 100644 index b101f22..0000000 --- a/platforms/sailfish/qt5.15-rpm-installation.md +++ /dev/null @@ -1,50 +0,0 @@ -# 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 -being tedious (I'm not a SailfishOS expert and have very limited experience). - -To download all rpms (on desktop Linux), set architecture (default: `armv7hl`) -in file `download-rpms.lisp` and run it in ECL: -``` -$ ecl -shell download-rpms.lisp # will download to 'rpms//' -``` - - -## Installing all base rpms - -Copy the rpms to device (see `sshfs`) and install with (beware that this will -give some unmet dependencies): -``` -$ cd rpms/ -$ ./install.sh -``` - -On missing SailfishOS lib dependencies, search for package providing the lib -with: -``` -$ zypper search # omit 'lib' if not found -``` -and install with: -``` -$ devel-su zypper install -``` -Repeat until above `install.sh` is successful. - - -## Installing devel rpms - -First ensure that `pkgconfig` is already installed: -``` -$ devel-su zypper install pkgconfig -``` -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: -``` -$ cd ../-devel/ -$ ./extract-and-copy.sh -``` -Now you should be able to compile lqml, using this qmake: `/opt/qt5/bin/qmake`. diff --git a/platforms/sailfish/rpms/aarch64-devel/extract-and-copy.sh b/platforms/sailfish/rpms/aarch64-devel/extract-and-copy.sh deleted file mode 100755 index c36a8de..0000000 --- a/platforms/sailfish/rpms/aarch64-devel/extract-and-copy.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -for rpm in *.rpm; do - rpm2cpio $rpm | cpio -idmv -done - -devel-su cp -r opt/* /opt/ diff --git a/platforms/sailfish/rpms/aarch64/install.sh b/platforms/sailfish/rpms/aarch64/install.sh deleted file mode 100755 index d2d555f..0000000 --- a/platforms/sailfish/rpms/aarch64/install.sh +++ /dev/null @@ -1 +0,0 @@ -devel-su rpm -U --force *.rpm diff --git a/platforms/sailfish/rpms/armv7hl-devel/extract-and-copy.sh b/platforms/sailfish/rpms/armv7hl-devel/extract-and-copy.sh deleted file mode 100755 index c36a8de..0000000 --- a/platforms/sailfish/rpms/armv7hl-devel/extract-and-copy.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -for rpm in *.rpm; do - rpm2cpio $rpm | cpio -idmv -done - -devel-su cp -r opt/* /opt/ diff --git a/platforms/sailfish/rpms/armv7hl/install.sh b/platforms/sailfish/rpms/armv7hl/install.sh deleted file mode 100755 index d2d555f..0000000 --- a/platforms/sailfish/rpms/armv7hl/install.sh +++ /dev/null @@ -1 +0,0 @@ -devel-su rpm -U --force *.rpm diff --git a/readme-sailfish.md b/readme-sailfish.md index 1a9ffd9..e0046df 100644 --- a/readme-sailfish.md +++ b/readme-sailfish.md @@ -8,30 +8,28 @@ 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 -doing it directly on the device (only this route is 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. +doing it directly on the device (only this route is described here). No bloated +SDK or similar is needed. After connecting your Sailfish device via USB, open 2 console tabs on Linux: ### Tab 1: shell ``` -ssh -L4005:127.0.0.1:4005 defaultuser@192.168.2.15` +$ ssh -L4005:127.0.0.1:4005 defaultuser@192.168.2.15` ``` You need to manually do `source ~/.bashrc` for e.g. your personal aliases to work. ### Tab 2: file access ``` -mkdir ~/phone -sshfs defaultuser@192.168.2.15: ~/phone +$ mkdir ~/phone +$ sshfs defaultuser@192.168.2.15: ~/phone ``` First try to compile/install ECL (tab 1) just like you would do on the desktop. Then follow the description -[qt5.15-rpm-installation](platforms/sailfish/qt5.15-rpm-installation.md). +[qt5.15-rpm-installation](platforms/sailfish/qt5.15-installation.md). Add an alias in `~/.bashrc` on the device: ``` @@ -47,7 +45,7 @@ Run `qt-runner` without arguments to check the following 2 settings: Now you should be able to build/install lqml using `qmake` from above installation. Note that you always need to start the apps using `qt-runner`: ``` -qt-runner lqml run.lisp +$ qt-runner lqml run.lisp ``` For your final apps, just compile them in `build/`, rename `app` accordingly @@ -56,7 +54,7 @@ resources, nothing else needs to be installed. If you want to run a compiled but not installed app, you need to pass the path: ``` -qt-runner ./my-app +$ qt-runner ./my-app ``` @@ -65,7 +63,7 @@ Developing with Slime directly on device Using the 2 console tabs as described above, you can start Swank in tab 1: ``` -qt-runner lqml run.lisp -slime +$ qt-runner lqml run.lisp -slime ``` Add `-auto` for QML auto reload (just like on the desktop). @@ -87,9 +85,9 @@ For the desktop icon see example for `cl-repl` in Tips ---- -You should always kill `sshfs` after you are done using it: +You should always kill `sshfs` (desktop Linux) after you are done using it: ``` -pkill sshfs +$ pkill sshfs ``` diff --git a/screenshots/cl-repl-sailfish.jpg b/screenshots/cl-repl-sailfish.jpg new file mode 100644 index 0000000..ddb764e Binary files /dev/null and b/screenshots/cl-repl-sailfish.jpg differ