revisions for SailfishOS (SFOS)

This commit is contained in:
pls.153 2023-10-15 21:33:39 +02:00
parent e5eb3dd731
commit b3c4c08387
12 changed files with 41 additions and 16 deletions

View file

@ -10,6 +10,9 @@
#+(or android ios)
(pushnew :mobile *features*)
(when (probe-file "/etc/sailfish-release")
(pushnew :sfos *features*))
;;; copy Swank and ECL contrib files (mobile only)
(defun cc (&rest args)

View file

@ -9,6 +9,9 @@
#+(or android ios)
(pushnew :mobile *features*)
(when (probe-file "/etc/sailfish-release")
(pushnew :sfos *features*))
(require :asdf)
(require :cmp)

View file

@ -10,6 +10,9 @@
#+(or android ios)
(pushnew :mobile *features*)
(when (probe-file "/etc/sailfish-release")
(pushnew :sfos *features*))
;;; copy ECL '*.doc' and 'encodings/' (mobile only)
(defun cc (&rest args)

View file

@ -9,12 +9,12 @@
(list "/ecl-android" "/ecl-ios")
(list :android :ios)))
(when (probe-file "/etc/sailfish-release")
(pushnew :sailfish *features*))
#+(or android ios sailfish)
#+(or android ios)
(pushnew :mobile *features*)
(when (probe-file "/etc/sailfish-release")
(pushnew :sfos *features*))
;;; compile ASDF system
(require :asdf)

View file

@ -12,6 +12,9 @@
#+(or android ios)
(pushnew :mobile *features*)
(when (probe-file "/etc/sailfish-release")
(pushnew :sfos *features*))
;;; copy Swank and ECL contrib files (mobile only)
(defun cc (&rest args)

View file

@ -10,6 +10,9 @@
#+(or android ios)
(pushnew :mobile *features*)
(when (probe-file "/etc/sailfish-release")
(pushnew :sfos *features*))
;;; copy Swank and ECL contrib files (mobile only)
(defun cc (&rest args)

View file

@ -6,12 +6,12 @@
(defun ini ()
#+android
(qt:ini-positioning qt:*cpp*)
#+ios
#+(or ios sfos)
(q> |active| ui:*position-source* t)
#+mobile
#+(or android ios sfos)
(update-my-position))
#+mobile
#+(or android ios sfos)
(defun last-gps-position ()
(let* ((pos #+android (qrun* (qt:last-position qt:*cpp*)) ; 'qrun*': return value
#+ios (qjs |lastPosition| ui:*position-source*))
@ -20,7 +20,7 @@
(setf (third pos) (parse-integer time))) ; see QML
pos))
#+mobile
#+(or android ios sfos)
(defun update-my-position (&optional (sec 60)) ; try for 1 min
"Mobile only: update position from GPS of mobile device."
;; see also Timer in 'qml/ext/Radios.qml'
@ -35,7 +35,7 @@
(set-position (lora:my-num) pos)
(send-to-radio)))))
#+mobile
#+(or android ios sfos)
(defun send-to-radio ()
(if lora:*config-complete*
(unless (getf *positions* (lora:my-num))
@ -90,12 +90,12 @@
(defun activate-map ()
(unless (q< |active| ui:*map-loader*)
(q> |active| ui:*map-loader* t)
#+mobile
#+(or android ios sfos)
(destructuring-bind (lat lon time)
(last-gps-position)
(unless (zerop lat)
(qjs |setCenter| ui:*map* (list lat lon))))
#-mobile
#-(or android ios sfos)
(let ((my-pos (position* (lora:my-num))))
(when my-pos
(qjs |setCenter| ui:*map* my-pos)))))

View file

@ -14,6 +14,9 @@
#+(or android ios)
(pushnew :mobile *features*)
(when (probe-file "/etc/sailfish-release")
(pushnew :sfos *features*))
;;; copy Swank and ECL contrib files (mobile only)
(defun cc (&rest args)

View file

@ -10,6 +10,9 @@
#+(or android ios)
(pushnew :mobile *features*)
(when (probe-file "/etc/sailfish-release")
(pushnew :sfos *features*))
;;; copy Swank and ECL contrib files (mobile only)
(defun cc (&rest args)

View file

@ -10,7 +10,7 @@ Important: choose **4.5.0.19** as **SailfishOS** version, this is guaranteed
to work with Qt5.15 (not all versions have all required rpms we need).
Above app will add the [chum](https://repo.sailfishos.org/obs/sailfishos:/chum/)
repo that we need here.
repo that we need here (so just run it once to have it set up).
Install the following packages:
```

View file

@ -17,8 +17,11 @@ After connecting your Sailfish device via USB, open 2 console tabs on Linux:
```
$ 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.
I needed to do
```
$ cp .bash_profile .profile
```
in order to have `.bashrc` loaded on `ssh` login.
### Tab 2: file access
```
@ -26,6 +29,8 @@ $ 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

View file

@ -636,7 +636,6 @@ cl_object mobile_p() {
STATIC_SYMBOL_PKG (s_android, "ANDROID", "KEYWORD")
STATIC_SYMBOL_PKG (s_ios, "IOS", "KEYWORD")
STATIC_SYMBOL_PKG (s_sfos, "SFOS", "KEYWORD")
ecl_process_env()->nvalues = 1;
cl_object l_ret = ECL_NIL;
QString platform = qGuiApp->platformName();
if (platform == QStringLiteral("android")) {
@ -646,7 +645,7 @@ cl_object mobile_p() {
} else if (QFile::exists("/etc/sailfish-release")) {
l_ret = s_sfos;
}
return l_ret;
ecl_return1(ecl_process_env(), l_ret);
}
cl_object pixel_ratio() {