Make use of quicklisp bundle
This commit is contained in:
parent
7da4422d5c
commit
2d67fc9e31
47 changed files with 43 additions and 42 deletions
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
Makefile
|
||||
RPMS
|
||||
*.list
|
||||
*.a
|
||||
*.o
|
||||
harbour-sextant
|
||||
|
|
@ -10,11 +10,11 @@
|
|||
# - translation filenames have to be changed
|
||||
|
||||
LISP_FILES = make.lisp \
|
||||
lisp/dependencies.lisp \
|
||||
lisp/app.lisp \
|
||||
lisp/app.asd
|
||||
lisp/system-index.txt \
|
||||
lisp/local-projects/sextant/sextant.lisp \
|
||||
lisp/local-projects/sextant/sextant.asd
|
||||
|
||||
lisp.output = libapp.a
|
||||
lisp.output = libsextant.a
|
||||
lisp.commands = eql5 -platform minimal $$PWD/make.lisp
|
||||
lisp.input = LISP_FILES
|
||||
lisp.CONFIG = combine target_predeps
|
||||
|
|
@ -25,13 +25,13 @@ QMAKE_EXTRA_COMPILERS += lisp
|
|||
TARGET = harbour-sextant
|
||||
|
||||
CONFIG += sailfishapp
|
||||
LIBS += -L. -lapp -lecl -leql5
|
||||
LIBS += -L. -lsextant -lecl -leql5
|
||||
QT += widgets qml multimedia network quick sql
|
||||
|
||||
norepl|standalone:lisp.commands = eql5 -platform minimal $$PWD/make.lisp norepl
|
||||
|
||||
standalone {
|
||||
CONFIG += link_prl
|
||||
QT += widgets qml multimedia network quick sql
|
||||
LIBS -= -lecl -leql5
|
||||
LIBS += -l:libecl.a -l:libeclatomic.a -l:libeclgc.a -l:libeclgmp.a -l:libeclffi.a -l:libeql5.a
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
(:CREATION-TIME #A((20) BASE-CHAR . "2021-12-09T20:15:49Z") :REQUESTED-SYSTEMS
|
||||
(:CREATION-TIME #A((20) BASE-CHAR . "2021-12-10T09:48:14Z") :REQUESTED-SYSTEMS
|
||||
("alexandria") :LISP-INFO
|
||||
(:MACHINE-INSTANCE "LPT-9DQ8RQ2-LN" :MACHINE-TYPE #A((6) BASE-CHAR . "X86-64")
|
||||
:MACHINE-VERSION
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
(require :ecl-quicklisp)
|
||||
(ql:quickload :alexandria)
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
(defsystem app
|
||||
(defsystem sextant
|
||||
:serial t
|
||||
:defsystem-depends-on (:asdf-package-system)
|
||||
:class :package-inferred-system
|
||||
|
|
@ -6,4 +6,4 @@
|
|||
(proclaim '(optimize (debug 3) (safety 3) (speed 0)))
|
||||
(funcall thunk))
|
||||
:depends-on ("alexandria")
|
||||
:components ((:file "app")))
|
||||
:components ((:file "sextant")))
|
||||
|
|
@ -1,17 +1,14 @@
|
|||
(defpackage :app
|
||||
(defpackage :sextant
|
||||
(:use :cl :eql)
|
||||
(:export #:start-slynk
|
||||
#:stop-slynk
|
||||
#:start
|
||||
#:reload-qml))
|
||||
(in-package :app)
|
||||
(:export #:start))
|
||||
(in-package :sextant)
|
||||
|
||||
(qrequire :quick)
|
||||
|
||||
(defun sym (symbol package)
|
||||
(intern (symbol-name symbol) package))
|
||||
|
||||
#+app-repl
|
||||
#+sextant-repl
|
||||
(defun start-slynk ()
|
||||
(unless (find-package :slynk)
|
||||
(require :ecl-quicklisp)
|
||||
|
|
@ -19,13 +16,13 @@
|
|||
(funcall (sym 'create-server :slynk)
|
||||
:interface "0.0.0.0" :port 4005 :dont-close t :style :spawn))
|
||||
|
||||
#+app-repl
|
||||
#+sextant-repl
|
||||
(defun stop-slynk ()
|
||||
(when (find-package :slynk)
|
||||
(funcall (sym 'stop-server :slynk) 4005)))
|
||||
|
||||
(defun start ()
|
||||
#+app-repl
|
||||
#+sextant-repl
|
||||
(start-slynk)
|
||||
(qconnect qml:*quick-view* "statusChanged(QQuickView::Status)"
|
||||
(lambda (status)
|
||||
|
|
@ -33,15 +30,6 @@
|
|||
(#.|QQuickView.Ready|
|
||||
(qml-reloaded))))))
|
||||
|
||||
(defun reload-qml (&optional (url "http://localhost:8000/"))
|
||||
"Reload QML file from an url, directly on the device."
|
||||
(qrun*
|
||||
(let ((src (|toString| (|source| qml:*quick-view*))))
|
||||
(if (x:starts-with qml:*root* src)
|
||||
(|setSource| qml:*quick-view* (qnew "QUrl(QString)" (x:string-substitute url qml:*root* src)))
|
||||
(qml:reload))
|
||||
(|toString| (|source| qml:*quick-view*)))))
|
||||
|
||||
(defun qml-reloaded ()
|
||||
;; re-ini
|
||||
)
|
||||
16
make.lisp
16
make.lisp
|
|
@ -1,24 +1,20 @@
|
|||
#-eql5
|
||||
(error "Please use the EQL5 executable")
|
||||
|
||||
(require :cmp)
|
||||
|
||||
(unless (member "norepl" (ext:command-args) :test #'string=)
|
||||
(push :app-repl *features*))
|
||||
(push :sextant-repl *features*))
|
||||
|
||||
(load "lisp/dependencies")
|
||||
(load "lisp/bundle.lisp")
|
||||
|
||||
(push "lisp/" asdf:*central-registry*)
|
||||
|
||||
(asdf:make-build "app"
|
||||
(asdf:make-build "sextant"
|
||||
:monolithic t
|
||||
:type :static-library
|
||||
:move-here "./"
|
||||
:init-name "init_app")
|
||||
:init-name "init_sextant")
|
||||
|
||||
(let ((lib-name "libapp.a"))
|
||||
(let ((lib-name "libsextant.a"))
|
||||
(when (probe-file lib-name)
|
||||
(delete-file lib-name))
|
||||
(rename-file (x:cc "app--all-systems" ".a") lib-name))
|
||||
(rename-file (x:cc "sextant--all-systems" ".a") lib-name))
|
||||
|
||||
(eql:qquit)
|
||||
|
|
|
|||
|
|
@ -19,8 +19,12 @@ Source100: harbour-sextant.yaml
|
|||
Requires: sailfishsilica-qt5 >= 0.10.9
|
||||
BuildRequires: pkgconfig(sailfishapp) >= 1.0.2
|
||||
BuildRequires: pkgconfig(Qt5Core)
|
||||
BuildRequires: pkgconfig(Qt5Widgets)
|
||||
BuildRequires: pkgconfig(Qt5Qml)
|
||||
BuildRequires: pkgconfig(Qt5Multimedia)
|
||||
BuildRequires: pkgconfig(Qt5Network)
|
||||
BuildRequires: pkgconfig(Qt5Quick)
|
||||
BuildRequires: pkgconfig(Qt5Sql)
|
||||
BuildRequires: ecl
|
||||
BuildRequires: eql5
|
||||
BuildRequires: qt5-plugin-platform-minimal
|
||||
|
|
|
|||
|
|
@ -21,8 +21,12 @@ Builder: qmake5
|
|||
PkgConfigBR:
|
||||
- sailfishapp >= 1.0.2
|
||||
- Qt5Core
|
||||
- Qt5Widgets
|
||||
- Qt5Qml
|
||||
- Qt5Multimedia
|
||||
- Qt5Network
|
||||
- Qt5Quick
|
||||
- Qt5Sql
|
||||
|
||||
# Build dependencies without a pkgconfig setup can be listed here
|
||||
PkgBR:
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
#include <QQuickView>
|
||||
#include <QTextCodec>
|
||||
|
||||
extern "C" void init_app (cl_object);
|
||||
extern "C" void init_sextant (cl_object);
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
|
@ -31,8 +31,13 @@ int main(int argc, char *argv[])
|
|||
QTextCodec::setCodecForLocale(utf8);
|
||||
|
||||
EQL eql;
|
||||
eql.exec (init_app);
|
||||
eql_fun ("qml:ini-sailfish", Q_ARG (QUrl, SailfishApp::pathToMainQml ()),
|
||||
eql.exec (init_sextant);
|
||||
|
||||
QUrl url = SailfishApp::pathToMainQml();
|
||||
if (argc > 1)
|
||||
url = argv[argc - 1];
|
||||
|
||||
eql_fun ("qml:ini-sailfish", Q_ARG (QUrl, url),
|
||||
Q_ARG (QUrl, SailfishApp::pathTo ("")),
|
||||
Q_ARG (QQuickView*, view.data ()), Q_ARG(bool, true));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue