mirror of
https://gitlab.com/eql/lqml.git
synced 2025-12-06 10:31:34 -08:00
example 'cl-repl': add 'settings/colors.lisp', default '.eclrc'; upgrade LQML version number
This commit is contained in:
parent
cb04d9e3a2
commit
b96d377926
8 changed files with 100 additions and 4 deletions
|
|
@ -17,5 +17,6 @@
|
||||||
(:file "lisp/curl")
|
(:file "lisp/curl")
|
||||||
(:file "lisp/dialogs")
|
(:file "lisp/dialogs")
|
||||||
(:file "lisp/editor")
|
(:file "lisp/editor")
|
||||||
|
(:file "lisp/ini")
|
||||||
(:file "lisp/main")))
|
(:file "lisp/main")))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,9 @@ ios {
|
||||||
|
|
||||||
assets.files = $$files($$PWD/platforms/ios/assets)
|
assets.files = $$files($$PWD/platforms/ios/assets)
|
||||||
QMAKE_BUNDLE_DATA += assets
|
QMAKE_BUNDLE_DATA += assets
|
||||||
|
local.files = $$files($$PWD/platforms/ios/local-assets)
|
||||||
|
QMAKE_BUNDLE_DATA += local
|
||||||
|
|
||||||
QMAKE_ASSET_CATALOGS += platforms/ios/Assets.xcassets
|
QMAKE_ASSET_CATALOGS += platforms/ios/Assets.xcassets
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
35
examples/cl-repl/lisp/ini.lisp
Normal file
35
examples/cl-repl/lisp/ini.lisp
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
(in-package :qml)
|
||||||
|
|
||||||
|
(export
|
||||||
|
(list #+android '*shell-output*
|
||||||
|
#+android 'shell))
|
||||||
|
|
||||||
|
;;; add function 'shell' (android only)
|
||||||
|
|
||||||
|
#+android
|
||||||
|
(defvar *shell-output* nil)
|
||||||
|
|
||||||
|
#+android
|
||||||
|
(defun shell (command)
|
||||||
|
"Run shell commands; example:
|
||||||
|
(shell \"df -h\")"
|
||||||
|
(let ((s (ext:run-program "sh" (list "-c" command))))
|
||||||
|
(setf *shell-output*
|
||||||
|
(loop :for line = (read-line s nil nil)
|
||||||
|
:while line collect line)))
|
||||||
|
(princ (x:join *shell-output* #\Newline))
|
||||||
|
(values))
|
||||||
|
|
||||||
|
#+android
|
||||||
|
(progn
|
||||||
|
;; copied asset files are read-only by default
|
||||||
|
(shell "chmod 664 settings/*.lisp"))
|
||||||
|
|
||||||
|
;;; create default '.eclrc'
|
||||||
|
|
||||||
|
#+mobile
|
||||||
|
(let ((ecl-rc (merge-pathnames ".eclrc")))
|
||||||
|
(unless (probe-file ecl-rc)
|
||||||
|
(with-open-file (s ecl-rc :direction :output)
|
||||||
|
(format s "(x:when-it (probe-file \"settings/colors.lisp\")~
|
||||||
|
~% (load x:it))"))))
|
||||||
|
|
@ -3,6 +3,6 @@
|
||||||
(ignore-errors ; don't hang on startup
|
(ignore-errors ; don't hang on startup
|
||||||
(load (merge-pathnames ".eclrc")))
|
(load (merge-pathnames ".eclrc")))
|
||||||
|
|
||||||
#+(or android ios)
|
#+mobile
|
||||||
(when qml::*remote-ip*
|
(when qml::*remote-ip*
|
||||||
(qsingle-shot 1000 'auto-reload-qml))
|
(qsingle-shot 1000 'auto-reload-qml))
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
(in-package :editor)
|
||||||
|
|
||||||
|
(setf *text-color* "black")
|
||||||
|
(setf *background-color* "white")
|
||||||
|
(setf *selected-text-color* "white")
|
||||||
|
(setf *selection-color* "firebrick")
|
||||||
|
(setf *parenthesis-color* "lightslategray")
|
||||||
|
(setf *string-color* "saddlebrown")
|
||||||
|
(setf *comment-color* "lightslategray")
|
||||||
|
(setf *lisp-keyword-color* "#c05050")
|
||||||
|
(setf *eql-keyword-color* "#5050c0")
|
||||||
|
(setf *keyword-color* "#409090")
|
||||||
|
|
||||||
|
(setf *output-text-color* "black")
|
||||||
|
(setf *output-background-color* "lavender")
|
||||||
|
(setf *output-string-color* "saddlebrown")
|
||||||
|
(setf *output-value-color* "#2020ff")
|
||||||
|
(setf *output-trace-color* "darkmagenta")
|
||||||
|
(setf *output-error-color* "red")
|
||||||
|
|
||||||
|
(progn
|
||||||
|
(apply-colors)
|
||||||
|
(q! |clear| ui:*output-model*)
|
||||||
|
(values))
|
||||||
|
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
(in-package :editor)
|
||||||
|
|
||||||
|
(setf *text-color* "black")
|
||||||
|
(setf *background-color* "white")
|
||||||
|
(setf *selected-text-color* "white")
|
||||||
|
(setf *selection-color* "firebrick")
|
||||||
|
(setf *parenthesis-color* "lightslategray")
|
||||||
|
(setf *string-color* "saddlebrown")
|
||||||
|
(setf *comment-color* "lightslategray")
|
||||||
|
(setf *lisp-keyword-color* "#c05050")
|
||||||
|
(setf *eql-keyword-color* "#5050c0")
|
||||||
|
(setf *keyword-color* "#409090")
|
||||||
|
|
||||||
|
(setf *output-text-color* "black")
|
||||||
|
(setf *output-background-color* "lavender")
|
||||||
|
(setf *output-string-color* "saddlebrown")
|
||||||
|
(setf *output-value-color* "#2020ff")
|
||||||
|
(setf *output-trace-color* "darkmagenta")
|
||||||
|
(setf *output-error-color* "red")
|
||||||
|
|
||||||
|
(progn
|
||||||
|
(apply-colors)
|
||||||
|
(q! |clear| ui:*output-model*)
|
||||||
|
(values))
|
||||||
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
#include <QQuickView>
|
#include <QQuickView>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
const char LQML::version[] = "22.5.2"; // May 2022
|
const char LQML::version[] = "22.8.1"; // August 2022
|
||||||
|
|
||||||
extern "C" void ini_LQML(cl_object);
|
extern "C" void ini_LQML(cl_object);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -263,6 +263,9 @@
|
||||||
(defvar *assets* #+android "assets:/lib/"
|
(defvar *assets* #+android "assets:/lib/"
|
||||||
#+ios "assets/")
|
#+ios "assets/")
|
||||||
|
|
||||||
|
#+ios
|
||||||
|
(defvar *local-assets* "local-assets/")
|
||||||
|
|
||||||
#+ios
|
#+ios
|
||||||
(progn
|
(progn
|
||||||
;; adapt paths to iOS specific values
|
;; adapt paths to iOS specific values
|
||||||
|
|
@ -326,8 +329,12 @@
|
||||||
(merge-pathnames "**/*.*" (user-homedir-pathname))))))
|
(merge-pathnames "**/*.*" (user-homedir-pathname))))))
|
||||||
(unless (probe-file (merge-pathnames "encodings/"))
|
(unless (probe-file (merge-pathnames "encodings/"))
|
||||||
#+ios
|
#+ios
|
||||||
(let ((dir (namestring (merge-pathnames *assets* *bundle-root*))))
|
(flet ((dir (assets)
|
||||||
(copy-asset-files dir dir))
|
(namestring (merge-pathnames assets *bundle-root*))))
|
||||||
|
(let ((assets (dir *assets*))
|
||||||
|
(local-assets (dir *local-assets*)))
|
||||||
|
(copy-asset-files assets assets)
|
||||||
|
(copy-asset-files local-assets local-assets)))
|
||||||
#+android
|
#+android
|
||||||
(unless (probe-file (merge-pathnames "encodings/"))
|
(unless (probe-file (merge-pathnames "encodings/"))
|
||||||
(copy-asset-files))))
|
(copy-asset-files))))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue