mirror of
https://gitlab.com/eql/lqml.git
synced 2025-12-05 18:20:33 -08:00
revisions
This commit is contained in:
parent
7b68d1c064
commit
e0c4d1c7f4
16 changed files with 65 additions and 73 deletions
|
|
@ -3,8 +3,10 @@
|
||||||
:depends-on ()
|
:depends-on ()
|
||||||
:components ((:file "lisp/package")
|
:components ((:file "lisp/package")
|
||||||
(:file "lisp/ui-vars")
|
(:file "lisp/ui-vars")
|
||||||
|
#+mobile
|
||||||
(:file "lisp/swank-quicklisp")
|
(:file "lisp/swank-quicklisp")
|
||||||
(:file "lisp/eval")
|
(:file "lisp/eval")
|
||||||
|
#+mobile
|
||||||
(:file "lisp/qml-reload/auto-reload-mobile")
|
(:file "lisp/qml-reload/auto-reload-mobile")
|
||||||
(:file "lisp/curl")
|
(:file "lisp/curl")
|
||||||
(:file "lisp/main")))
|
(:file "lisp/main")))
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,9 @@
|
||||||
|
|
||||||
(in-package :qml)
|
(in-package :qml)
|
||||||
|
|
||||||
#+(or android ios)
|
|
||||||
(defvar *reload-all* nil)
|
(defvar *reload-all* nil)
|
||||||
(defvar *edited-file* nil)
|
(defvar *edited-file* nil)
|
||||||
|
|
||||||
#+(or android ios)
|
|
||||||
(defun remote-ip ()
|
(defun remote-ip ()
|
||||||
(terpri *query-io*)
|
(terpri *query-io*)
|
||||||
(princ "Please enter WiFi IP of desktop computer (hit RET to skip): "
|
(princ "Please enter WiFi IP of desktop computer (hit RET to skip): "
|
||||||
|
|
@ -15,27 +13,20 @@
|
||||||
(unless (x:empty-string ip)
|
(unless (x:empty-string ip)
|
||||||
(format nil "http://~A:8080/" ip))))
|
(format nil "http://~A:8080/" ip))))
|
||||||
|
|
||||||
#+(or android ios)
|
|
||||||
(defvar *remote-ip* #+interpreter nil
|
(defvar *remote-ip* #+interpreter nil
|
||||||
#-interpreter #.(remote-ip))
|
#-interpreter #.(remote-ip))
|
||||||
|
|
||||||
#+(or android ios)
|
|
||||||
(defun load* (file)
|
(defun load* (file)
|
||||||
(load (make-string-input-stream (curl (x:cc *remote-ip* file)))))
|
(load (make-string-input-stream (curl (x:cc *remote-ip* file)))))
|
||||||
|
|
||||||
(export 'load*)
|
|
||||||
|
|
||||||
#+(or android ios)
|
|
||||||
(defun load-on-reloaded ()
|
(defun load-on-reloaded ()
|
||||||
(load* "lisp/qml-reload/on-reloaded.lisp"))
|
(load* "lisp/qml-reload/on-reloaded.lisp"))
|
||||||
|
|
||||||
#+(or android ios)
|
|
||||||
(defun qml:view-status-changed (status)
|
(defun qml:view-status-changed (status)
|
||||||
(when (and (= 1 status)
|
(when (and (= 1 status)
|
||||||
(reload-main-p))
|
(reload-main-p))
|
||||||
(load-on-reloaded)))
|
(load-on-reloaded)))
|
||||||
|
|
||||||
#+(or android ios)
|
|
||||||
(defun reload-main-p ()
|
(defun reload-main-p ()
|
||||||
(prog1
|
(prog1
|
||||||
(or *reload-all*
|
(or *reload-all*
|
||||||
|
|
@ -43,7 +34,6 @@
|
||||||
(when (eql :once *reload-all*)
|
(when (eql :once *reload-all*)
|
||||||
(setf *reload-all* nil))))
|
(setf *reload-all* nil))))
|
||||||
|
|
||||||
#+(or android ios)
|
|
||||||
(let ((secs 0)
|
(let ((secs 0)
|
||||||
(ini t))
|
(ini t))
|
||||||
(defun auto-reload-qml ()
|
(defun auto-reload-qml ()
|
||||||
|
|
@ -70,5 +60,6 @@
|
||||||
(setf secs curr)))))
|
(setf secs curr)))))
|
||||||
(qsingle-shot 250 'auto-reload-qml)))
|
(qsingle-shot 250 'auto-reload-qml)))
|
||||||
|
|
||||||
#+(or android ios)
|
(export
|
||||||
(export 'auto-reload-qml)
|
(list 'load*
|
||||||
|
'auto-reload-qml))
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
(in-package :qml)
|
(in-package :qml)
|
||||||
|
|
||||||
#+(and (or android ios) (not interpreter))
|
#-interpreter
|
||||||
(ffi:clines "extern void init_lib_ASDF(cl_object);")
|
(ffi:clines "extern void init_lib_ASDF(cl_object);")
|
||||||
|
|
||||||
(defun %sym (symbol package)
|
(defun %sym (symbol package)
|
||||||
|
|
@ -10,14 +10,12 @@
|
||||||
|
|
||||||
;;; Quicklisp setup
|
;;; Quicklisp setup
|
||||||
|
|
||||||
#+(or android ios)
|
|
||||||
(defun ensure-asdf ()
|
(defun ensure-asdf ()
|
||||||
(unless (find-package :asdf)
|
(unless (find-package :asdf)
|
||||||
(ffi:c-inline nil nil :void "ecl_init_module(NULL, init_lib_ASDF)" :one-liner t)
|
(ffi:c-inline nil nil :void "ecl_init_module(NULL, init_lib_ASDF)" :one-liner t)
|
||||||
(in-package :qml-user))
|
(in-package :qml-user))
|
||||||
:asdf)
|
:asdf)
|
||||||
|
|
||||||
#+(or android ios)
|
|
||||||
(defun quicklisp ()
|
(defun quicklisp ()
|
||||||
(ensure-asdf)
|
(ensure-asdf)
|
||||||
(unless (find-package :quicklisp)
|
(unless (find-package :quicklisp)
|
||||||
|
|
@ -36,7 +34,6 @@
|
||||||
|
|
||||||
;;; Swank setup
|
;;; Swank setup
|
||||||
|
|
||||||
#+(or android ios)
|
|
||||||
(defun swank/create-server (interface port dont-close style)
|
(defun swank/create-server (interface port dont-close style)
|
||||||
(funcall (%sym 'create-server :swank)
|
(funcall (%sym 'create-server :swank)
|
||||||
:interface interface
|
:interface interface
|
||||||
|
|
@ -44,7 +41,6 @@
|
||||||
:dont-close dont-close
|
:dont-close dont-close
|
||||||
:style style))
|
:style style))
|
||||||
|
|
||||||
#+(or android ios)
|
|
||||||
(defun start-swank (&key (port 4005) (interface "0.0.0.0") (style :spawn)
|
(defun start-swank (&key (port 4005) (interface "0.0.0.0") (style :spawn)
|
||||||
(load-contribs t) (setup t) (delete t) (quiet t)
|
(load-contribs t) (setup t) (delete t) (quiet t)
|
||||||
(dont-close t) log-events)
|
(dont-close t) log-events)
|
||||||
|
|
@ -64,20 +60,17 @@
|
||||||
"SLIME-listener"
|
"SLIME-listener"
|
||||||
(lambda () (swank/create-server interface port dont-close style)))))
|
(lambda () (swank/create-server interface port dont-close style)))))
|
||||||
|
|
||||||
#+(or android ios)
|
|
||||||
(defun stop-swank (&optional (port 4005))
|
(defun stop-swank (&optional (port 4005))
|
||||||
(when (find-package :swank)
|
(when (find-package :swank)
|
||||||
(funcall (%sym 'stop-server :swank) port)
|
(funcall (%sym 'stop-server :swank) port)
|
||||||
:stopped))
|
:stopped))
|
||||||
|
|
||||||
#+(or android ios)
|
|
||||||
(progn
|
(progn
|
||||||
;; be careful not to use :s, :q in your mobile app code
|
;; be careful not to use :s, :q in your mobile app code
|
||||||
;; ios simulator note: wrap :s and :q in qrun* (would crash otherwise)
|
;; ios simulator note: wrap :s and :q in qrun* (would crash otherwise)
|
||||||
(define-symbol-macro :s (start-swank))
|
(define-symbol-macro :s (start-swank))
|
||||||
(define-symbol-macro :q (quicklisp)))
|
(define-symbol-macro :q (quicklisp)))
|
||||||
|
|
||||||
#+(or android ios)
|
|
||||||
(export (list #+ios
|
(export (list #+ios
|
||||||
'start-swank
|
'start-swank
|
||||||
'stop-swank
|
'stop-swank
|
||||||
|
|
|
||||||
|
|
@ -7,24 +7,27 @@
|
||||||
(list "/ecl-android/" "/ecl-ios/")
|
(list "/ecl-android/" "/ecl-ios/")
|
||||||
(list :android :ios)))
|
(list :android :ios)))
|
||||||
|
|
||||||
|
#+(or android ios)
|
||||||
|
(pushnew :mobile *features*)
|
||||||
|
|
||||||
;;; copy Swank and ECL contrib files (mobile only)
|
;;; copy Swank and ECL contrib files (mobile only)
|
||||||
|
|
||||||
(defun cc (&rest args)
|
(defun cc (&rest args)
|
||||||
(apply 'concatenate 'string args))
|
(apply 'concatenate 'string args))
|
||||||
|
|
||||||
#+(or android ios)
|
#+mobile
|
||||||
(defvar *assets* #+android "../platforms/android/assets/lib/"
|
(defvar *assets* #+android "../platforms/android/assets/lib/"
|
||||||
#+ios "../platforms/ios/assets/Library/")
|
#+ios "../platforms/ios/assets/Library/")
|
||||||
|
|
||||||
#+(or android ios)
|
#+mobile
|
||||||
(defun find-swank ()
|
(defun find-swank ()
|
||||||
(probe-file (cc *assets* "quicklisp/local-projects/slime/swank.lisp")))
|
(probe-file (cc *assets* "quicklisp/local-projects/slime/swank.lisp")))
|
||||||
|
|
||||||
#+(or android ios)
|
#+mobile
|
||||||
(defun shell (command)
|
(defun shell (command)
|
||||||
(ext:run-program "sh" (list "-c" command)))
|
(ext:run-program "sh" (list "-c" command)))
|
||||||
|
|
||||||
#+(or android ios)
|
#+mobile
|
||||||
(progn
|
(progn
|
||||||
(unless (find-swank)
|
(unless (find-swank)
|
||||||
(let ((to (cc *assets* "quicklisp/local-projects/slime/")))
|
(let ((to (cc *assets* "quicklisp/local-projects/slime/")))
|
||||||
|
|
@ -36,7 +39,7 @@
|
||||||
(shell (cc "cp " lib "*.doc " *assets*))
|
(shell (cc "cp " lib "*.doc " *assets*))
|
||||||
(shell (cc "cp -r " lib "encodings " *assets*)))))
|
(shell (cc "cp -r " lib "encodings " *assets*)))))
|
||||||
|
|
||||||
#+(or android ios)
|
#+mobile
|
||||||
(unless (find-swank)
|
(unless (find-swank)
|
||||||
(error "Swank files missing, please see <LQML root>/slime/src/readme-sources.md"))
|
(error "Swank files missing, please see <LQML root>/slime/src/readme-sources.md"))
|
||||||
|
|
||||||
|
|
@ -59,7 +62,7 @@
|
||||||
(dolist (file (list "package" "x" "ecl-ext" "ini" "qml")) ; load LQML symbols
|
(dolist (file (list "package" "x" "ecl-ext" "ini" "qml")) ; load LQML symbols
|
||||||
(load (merge-pathnames file "src/lisp/")))
|
(load (merge-pathnames file "src/lisp/")))
|
||||||
|
|
||||||
#-(or android ios)
|
#-mobile
|
||||||
(progn
|
(progn
|
||||||
(require :ecl-curl)
|
(require :ecl-curl)
|
||||||
(asdf:make-build "app"
|
(asdf:make-build "app"
|
||||||
|
|
@ -68,7 +71,7 @@
|
||||||
:move-here (cc *current* "build/tmp/")
|
:move-here (cc *current* "build/tmp/")
|
||||||
:init-name "ini_app"))
|
:init-name "ini_app"))
|
||||||
|
|
||||||
#+(or android ios)
|
#+mobile
|
||||||
(progn
|
(progn
|
||||||
(pushnew :interpreter *features*)
|
(pushnew :interpreter *features*)
|
||||||
(defvar *asdf-system* "app")
|
(defvar *asdf-system* "app")
|
||||||
|
|
@ -83,11 +86,11 @@
|
||||||
|
|
||||||
;;; rename lib
|
;;; rename lib
|
||||||
|
|
||||||
(let* ((from #-(or android ios) (cc *current* "build/tmp/app--all-systems.a")
|
(let* ((from #-mobile (cc *current* "build/tmp/app--all-systems.a")
|
||||||
#+(or android ios) (cc *library-path* "app--all-systems.a"))
|
#+mobile (cc *library-path* "app--all-systems.a"))
|
||||||
(to "libapp.a")
|
(to "libapp.a")
|
||||||
(to* #-(or android ios) (cc *current* "build/tmp/" to)
|
(to* #-mobile (cc *current* "build/tmp/" to)
|
||||||
#+(or android ios) (cc *library-path* to)))
|
#+mobile (cc *library-path* to)))
|
||||||
(when (probe-file to*)
|
(when (probe-file to*)
|
||||||
(delete-file to*))
|
(delete-file to*))
|
||||||
(rename-file from to))
|
(rename-file from to))
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,8 @@ $ cd ..
|
||||||
$ ./copy.sh advanced-qml-auto-reload
|
$ ./copy.sh advanced-qml-auto-reload
|
||||||
```
|
```
|
||||||
|
|
||||||
See also [../../slime/src/readme-sources](../../slime/src/readme-sources.md) for
|
See also [../../slime/src/readme-sources](../../slime/src/readme-sources.md)
|
||||||
installing the Slime sources where this example can find them.
|
for installing the Slime sources where this example can find them.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,9 @@
|
||||||
(list "/ecl-android/" "/ecl-ios/")
|
(list "/ecl-android/" "/ecl-ios/")
|
||||||
(list :android :ios)))
|
(list :android :ios)))
|
||||||
|
|
||||||
|
#+(or android ios)
|
||||||
|
(pushnew :mobile *features*)
|
||||||
|
|
||||||
(require :asdf)
|
(require :asdf)
|
||||||
|
|
||||||
(push (merge-pathnames "../")
|
(push (merge-pathnames "../")
|
||||||
|
|
@ -26,14 +29,14 @@
|
||||||
(defun cc (&rest args)
|
(defun cc (&rest args)
|
||||||
(apply 'concatenate 'string args))
|
(apply 'concatenate 'string args))
|
||||||
|
|
||||||
#-(or android ios)
|
#-mobile
|
||||||
(asdf:make-build "app"
|
(asdf:make-build "app"
|
||||||
:monolithic t
|
:monolithic t
|
||||||
:type :static-library
|
:type :static-library
|
||||||
:move-here (cc *current* "build/tmp/")
|
:move-here (cc *current* "build/tmp/")
|
||||||
:init-name "ini_app")
|
:init-name "ini_app")
|
||||||
|
|
||||||
#+(or android ios)
|
#+mobile
|
||||||
(progn
|
(progn
|
||||||
(pushnew :interpreter *features*)
|
(pushnew :interpreter *features*)
|
||||||
(defvar *asdf-system* "app")
|
(defvar *asdf-system* "app")
|
||||||
|
|
@ -47,11 +50,11 @@
|
||||||
(load "platforms/shared/make"))
|
(load "platforms/shared/make"))
|
||||||
|
|
||||||
;; rename lib
|
;; rename lib
|
||||||
(let* ((from #-(or android ios) (cc *current* "build/tmp/app--all-systems.a")
|
(let* ((from #-mobile (cc *current* "build/tmp/app--all-systems.a")
|
||||||
#+(or android ios) (cc *library-path* "app--all-systems.a"))
|
#+mobile (cc *library-path* "app--all-systems.a"))
|
||||||
(to "libapp.a")
|
(to "libapp.a")
|
||||||
(to* #-(or android ios) (cc *current* "build/tmp/" to)
|
(to* #-mobile (cc *current* "build/tmp/" to)
|
||||||
#+(or android ios) (cc *library-path* to)))
|
#+mobile (cc *library-path* to)))
|
||||||
(when (probe-file to*)
|
(when (probe-file to*)
|
||||||
(delete-file to*))
|
(delete-file to*))
|
||||||
(rename-file from to))
|
(rename-file from to))
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,10 @@
|
||||||
:depends-on ()
|
:depends-on ()
|
||||||
:components ((:file "lisp/package")
|
:components ((:file "lisp/package")
|
||||||
(:file "lisp/ui-vars")
|
(:file "lisp/ui-vars")
|
||||||
|
#+mobile
|
||||||
(:file "lisp/swank-quicklisp")
|
(:file "lisp/swank-quicklisp")
|
||||||
(:file "lisp/eval")
|
(:file "lisp/eval")
|
||||||
|
#+mobile
|
||||||
(:file "lisp/qml-reload/auto-reload-mobile")
|
(:file "lisp/qml-reload/auto-reload-mobile")
|
||||||
(:file "lisp/curl")
|
(:file "lisp/curl")
|
||||||
(:file "lisp/main")))
|
(:file "lisp/main")))
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
(in-package :qml)
|
(in-package :qml)
|
||||||
|
|
||||||
#+(or android ios)
|
|
||||||
(defun remote-ip ()
|
(defun remote-ip ()
|
||||||
(terpri *query-io*)
|
(terpri *query-io*)
|
||||||
(princ "Please enter WiFi IP of desktop computer (hit RET to skip): "
|
(princ "Please enter WiFi IP of desktop computer (hit RET to skip): "
|
||||||
|
|
@ -11,22 +10,16 @@
|
||||||
(unless (x:empty-string ip)
|
(unless (x:empty-string ip)
|
||||||
(format nil "http://~A:8080/" ip))))
|
(format nil "http://~A:8080/" ip))))
|
||||||
|
|
||||||
#+(or android ios)
|
|
||||||
(defvar *remote-ip* #+interpreter nil
|
(defvar *remote-ip* #+interpreter nil
|
||||||
#-interpreter #.(remote-ip))
|
#-interpreter #.(remote-ip))
|
||||||
|
|
||||||
#+(or android ios)
|
|
||||||
(defun load* (file)
|
(defun load* (file)
|
||||||
(load (make-string-input-stream (curl (x:cc *remote-ip* file)))))
|
(load (make-string-input-stream (curl (x:cc *remote-ip* file)))))
|
||||||
|
|
||||||
(export 'load*)
|
|
||||||
|
|
||||||
#+(or android ios)
|
|
||||||
(defun qml:view-status-changed (status)
|
(defun qml:view-status-changed (status)
|
||||||
(when (= 1 status)
|
(when (= 1 status)
|
||||||
(load* "lisp/qml-reload/on-reloaded.lisp")))
|
(load* "lisp/qml-reload/on-reloaded.lisp")))
|
||||||
|
|
||||||
#+(or android ios)
|
|
||||||
(let ((secs 0)
|
(let ((secs 0)
|
||||||
(ini t))
|
(ini t))
|
||||||
(defun auto-reload-qml ()
|
(defun auto-reload-qml ()
|
||||||
|
|
@ -45,5 +38,6 @@
|
||||||
(setf secs curr)))
|
(setf secs curr)))
|
||||||
(qsingle-shot 250 'auto-reload-qml)))
|
(qsingle-shot 250 'auto-reload-qml)))
|
||||||
|
|
||||||
#+(or android ios)
|
(export
|
||||||
(export 'auto-reload-qml)
|
(list 'load*
|
||||||
|
'auto-reload-qml))
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
(in-package :qml)
|
(in-package :qml)
|
||||||
|
|
||||||
#+(and (or android ios) (not interpreter))
|
#-interpreter
|
||||||
(ffi:clines "extern void init_lib_ASDF(cl_object);")
|
(ffi:clines "extern void init_lib_ASDF(cl_object);")
|
||||||
|
|
||||||
(defun %sym (symbol package)
|
(defun %sym (symbol package)
|
||||||
|
|
@ -10,14 +10,12 @@
|
||||||
|
|
||||||
;;; Quicklisp setup
|
;;; Quicklisp setup
|
||||||
|
|
||||||
#+(or android ios)
|
|
||||||
(defun ensure-asdf ()
|
(defun ensure-asdf ()
|
||||||
(unless (find-package :asdf)
|
(unless (find-package :asdf)
|
||||||
(ffi:c-inline nil nil :void "ecl_init_module(NULL, init_lib_ASDF)" :one-liner t)
|
(ffi:c-inline nil nil :void "ecl_init_module(NULL, init_lib_ASDF)" :one-liner t)
|
||||||
(in-package :qml-user))
|
(in-package :qml-user))
|
||||||
:asdf)
|
:asdf)
|
||||||
|
|
||||||
#+(or android ios)
|
|
||||||
(defun quicklisp ()
|
(defun quicklisp ()
|
||||||
(ensure-asdf)
|
(ensure-asdf)
|
||||||
(unless (find-package :quicklisp)
|
(unless (find-package :quicklisp)
|
||||||
|
|
@ -36,7 +34,6 @@
|
||||||
|
|
||||||
;;; Swank setup
|
;;; Swank setup
|
||||||
|
|
||||||
#+(or android ios)
|
|
||||||
(defun swank/create-server (interface port dont-close style)
|
(defun swank/create-server (interface port dont-close style)
|
||||||
(funcall (%sym 'create-server :swank)
|
(funcall (%sym 'create-server :swank)
|
||||||
:interface interface
|
:interface interface
|
||||||
|
|
@ -44,7 +41,6 @@
|
||||||
:dont-close dont-close
|
:dont-close dont-close
|
||||||
:style style))
|
:style style))
|
||||||
|
|
||||||
#+(or android ios)
|
|
||||||
(defun start-swank (&key (port 4005) (interface "0.0.0.0") (style :spawn)
|
(defun start-swank (&key (port 4005) (interface "0.0.0.0") (style :spawn)
|
||||||
(load-contribs t) (setup t) (delete t) (quiet t)
|
(load-contribs t) (setup t) (delete t) (quiet t)
|
||||||
(dont-close t) log-events)
|
(dont-close t) log-events)
|
||||||
|
|
@ -64,20 +60,17 @@
|
||||||
"SLIME-listener"
|
"SLIME-listener"
|
||||||
(lambda () (swank/create-server interface port dont-close style)))))
|
(lambda () (swank/create-server interface port dont-close style)))))
|
||||||
|
|
||||||
#+(or android ios)
|
|
||||||
(defun stop-swank (&optional (port 4005))
|
(defun stop-swank (&optional (port 4005))
|
||||||
(when (find-package :swank)
|
(when (find-package :swank)
|
||||||
(funcall (%sym 'stop-server :swank) port)
|
(funcall (%sym 'stop-server :swank) port)
|
||||||
:stopped))
|
:stopped))
|
||||||
|
|
||||||
#+(or android ios)
|
|
||||||
(progn
|
(progn
|
||||||
;; be careful not to use :s, :q in your mobile app code
|
;; be careful not to use :s, :q in your mobile app code
|
||||||
;; ios simulator note: wrap :s and :q in qrun* (would crash otherwise)
|
;; ios simulator note: wrap :s and :q in qrun* (would crash otherwise)
|
||||||
(define-symbol-macro :s (start-swank))
|
(define-symbol-macro :s (start-swank))
|
||||||
(define-symbol-macro :q (quicklisp)))
|
(define-symbol-macro :q (quicklisp)))
|
||||||
|
|
||||||
#+(or android ios)
|
|
||||||
(export (list #+ios
|
(export (list #+ios
|
||||||
'start-swank
|
'start-swank
|
||||||
'stop-swank
|
'stop-swank
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
#:*flick-output*
|
#:*flick-output*
|
||||||
#:*history-back*
|
#:*history-back*
|
||||||
#:*history-forward*
|
#:*history-forward*
|
||||||
|
#:*main*
|
||||||
#:*progress*
|
#:*progress*
|
||||||
#:*repl-input*
|
#:*repl-input*
|
||||||
#:*repl-output*
|
#:*repl-output*
|
||||||
|
|
@ -14,6 +15,7 @@
|
||||||
(defparameter *flick-output* "flick_output")
|
(defparameter *flick-output* "flick_output")
|
||||||
(defparameter *history-back* "history_back")
|
(defparameter *history-back* "history_back")
|
||||||
(defparameter *history-forward* "history_forward")
|
(defparameter *history-forward* "history_forward")
|
||||||
|
(defparameter *main* "main")
|
||||||
(defparameter *progress* "progress")
|
(defparameter *progress* "progress")
|
||||||
(defparameter *repl-input* "repl_input")
|
(defparameter *repl-input* "repl_input")
|
||||||
(defparameter *repl-output* "repl_output")
|
(defparameter *repl-output* "repl_output")
|
||||||
|
|
|
||||||
|
|
@ -7,24 +7,27 @@
|
||||||
(list "/ecl-android/" "/ecl-ios/")
|
(list "/ecl-android/" "/ecl-ios/")
|
||||||
(list :android :ios)))
|
(list :android :ios)))
|
||||||
|
|
||||||
|
#+(or android ios)
|
||||||
|
(pushnew :mobile *features*)
|
||||||
|
|
||||||
;;; copy Swank and ECL contrib files (mobile only)
|
;;; copy Swank and ECL contrib files (mobile only)
|
||||||
|
|
||||||
(defun cc (&rest args)
|
(defun cc (&rest args)
|
||||||
(apply 'concatenate 'string args))
|
(apply 'concatenate 'string args))
|
||||||
|
|
||||||
#+(or android ios)
|
#+mobile
|
||||||
(defvar *assets* #+android "../platforms/android/assets/lib/"
|
(defvar *assets* #+android "../platforms/android/assets/lib/"
|
||||||
#+ios "../platforms/ios/assets/Library/")
|
#+ios "../platforms/ios/assets/Library/")
|
||||||
|
|
||||||
#+(or android ios)
|
#+mobile
|
||||||
(defun find-swank ()
|
(defun find-swank ()
|
||||||
(probe-file (cc *assets* "quicklisp/local-projects/slime/swank.lisp")))
|
(probe-file (cc *assets* "quicklisp/local-projects/slime/swank.lisp")))
|
||||||
|
|
||||||
#+(or android ios)
|
#+mobile
|
||||||
(defun shell (command)
|
(defun shell (command)
|
||||||
(ext:run-program "sh" (list "-c" command)))
|
(ext:run-program "sh" (list "-c" command)))
|
||||||
|
|
||||||
#+(or android ios)
|
#+mobile
|
||||||
(progn
|
(progn
|
||||||
(unless (find-swank)
|
(unless (find-swank)
|
||||||
(let ((to (cc *assets* "quicklisp/local-projects/slime/")))
|
(let ((to (cc *assets* "quicklisp/local-projects/slime/")))
|
||||||
|
|
@ -36,7 +39,7 @@
|
||||||
(shell (cc "cp " lib "*.doc " *assets*))
|
(shell (cc "cp " lib "*.doc " *assets*))
|
||||||
(shell (cc "cp -r " lib "encodings " *assets*)))))
|
(shell (cc "cp -r " lib "encodings " *assets*)))))
|
||||||
|
|
||||||
#+(or android ios)
|
#+mobile
|
||||||
(unless (find-swank)
|
(unless (find-swank)
|
||||||
(error "Swank files missing, please see <LQML root>/slime/src/readme-sources.md"))
|
(error "Swank files missing, please see <LQML root>/slime/src/readme-sources.md"))
|
||||||
|
|
||||||
|
|
@ -59,7 +62,7 @@
|
||||||
(dolist (file (list "package" "x" "ecl-ext" "ini" "qml")) ; load LQML symbols
|
(dolist (file (list "package" "x" "ecl-ext" "ini" "qml")) ; load LQML symbols
|
||||||
(load (merge-pathnames file "src/lisp/")))
|
(load (merge-pathnames file "src/lisp/")))
|
||||||
|
|
||||||
#-(or android ios)
|
#-mobile
|
||||||
(progn
|
(progn
|
||||||
(require :ecl-curl)
|
(require :ecl-curl)
|
||||||
(asdf:make-build "app"
|
(asdf:make-build "app"
|
||||||
|
|
@ -68,7 +71,7 @@
|
||||||
:move-here (cc *current* "build/tmp/")
|
:move-here (cc *current* "build/tmp/")
|
||||||
:init-name "ini_app"))
|
:init-name "ini_app"))
|
||||||
|
|
||||||
#+(or android ios)
|
#+mobile
|
||||||
(progn
|
(progn
|
||||||
(pushnew :interpreter *features*)
|
(pushnew :interpreter *features*)
|
||||||
(defvar *asdf-system* "app")
|
(defvar *asdf-system* "app")
|
||||||
|
|
@ -83,11 +86,11 @@
|
||||||
|
|
||||||
;;; rename lib
|
;;; rename lib
|
||||||
|
|
||||||
(let* ((from #-(or android ios) (cc *current* "build/tmp/app--all-systems.a")
|
(let* ((from #-mobile (cc *current* "build/tmp/app--all-systems.a")
|
||||||
#+(or android ios) (cc *library-path* "app--all-systems.a"))
|
#+mobile (cc *library-path* "app--all-systems.a"))
|
||||||
(to "libapp.a")
|
(to "libapp.a")
|
||||||
(to* #-(or android ios) (cc *current* "build/tmp/" to)
|
(to* #-mobile (cc *current* "build/tmp/" to)
|
||||||
#+(or android ios) (cc *library-path* to)))
|
#+mobile (cc *library-path* to)))
|
||||||
(when (probe-file to*)
|
(when (probe-file to*)
|
||||||
(delete-file to*))
|
(delete-file to*))
|
||||||
(rename-file from to))
|
(rename-file from to))
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import "ext/" as Ext
|
||||||
Item {
|
Item {
|
||||||
width: 300
|
width: 300
|
||||||
height: 500
|
height: 500
|
||||||
|
objectName: "main"
|
||||||
|
|
||||||
Ext.Repl {}
|
Ext.Repl {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,6 @@
|
||||||
|
|
||||||
(setf *features* (remove :interpreter *features*))
|
(setf *features* (remove :interpreter *features*))
|
||||||
|
|
||||||
#+(or android ios)
|
|
||||||
(load (merge-pathnames (format nil "platforms/~A/cross-compile"
|
(load (merge-pathnames (format nil "platforms/~A/cross-compile"
|
||||||
#+android "android"
|
#+android "android"
|
||||||
#+ios "ios")))
|
#+ios "ios")))
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Info
|
||||||
|
|
||||||
This is meant for the Swank server on mobile.
|
This is meant for the Swank server on mobile.
|
||||||
|
|
||||||
Please donwload latest [Slime sources](https://github.com/slime/slime/releases)
|
Please download latest [Slime sources](https://github.com/slime/slime/releases)
|
||||||
and put them in this directory, that is, put the contents of `slime-x.x/`
|
and put them in this directory, that is, put the contents of `slime-x.x/`
|
||||||
in this directory.
|
in this directory.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -239,6 +239,9 @@
|
||||||
;;; mobile ini
|
;;; mobile ini
|
||||||
|
|
||||||
#+(or android ios)
|
#+(or android ios)
|
||||||
|
(pushnew :mobile *features*)
|
||||||
|
|
||||||
|
#+mobile
|
||||||
(defvar *assets* #+android "assets:/lib/"
|
(defvar *assets* #+android "assets:/lib/"
|
||||||
#+ios "assets/")
|
#+ios "assets/")
|
||||||
|
|
||||||
|
|
@ -263,7 +266,7 @@
|
||||||
(ext:setenv (car el) (namestring (merge-pathnames (cdr el)
|
(ext:setenv (car el) (namestring (merge-pathnames (cdr el)
|
||||||
(user-homedir-pathname))))))
|
(user-homedir-pathname))))))
|
||||||
|
|
||||||
#+(or android ios)
|
#+mobile
|
||||||
(defun copy-asset-files (&optional (dir-name *assets*) origin)
|
(defun copy-asset-files (&optional (dir-name *assets*) origin)
|
||||||
"Copy asset files to home directory."
|
"Copy asset files to home directory."
|
||||||
(flet ((directory-p (path)
|
(flet ((directory-p (path)
|
||||||
|
|
@ -290,7 +293,7 @@
|
||||||
(return-from copy-asset-files))))))
|
(return-from copy-asset-files))))))
|
||||||
t)
|
t)
|
||||||
|
|
||||||
#+(or android ios)
|
#+mobile
|
||||||
(defun %ini-mobile ()
|
(defun %ini-mobile ()
|
||||||
;; internal use, see 'main.cpp'
|
;; internal use, see 'main.cpp'
|
||||||
(ext:install-bytecodes-compiler)
|
(ext:install-bytecodes-compiler)
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,9 @@
|
||||||
(list "/ecl-android/" "/ecl-ios/")
|
(list "/ecl-android/" "/ecl-ios/")
|
||||||
(list :android :ios)))
|
(list :android :ios)))
|
||||||
|
|
||||||
|
#+(or android ios)
|
||||||
|
(pushnew :mobile *features*)
|
||||||
|
|
||||||
;;; compile ASDF system
|
;;; compile ASDF system
|
||||||
|
|
||||||
(require :asdf)
|
(require :asdf)
|
||||||
|
|
@ -17,7 +20,7 @@
|
||||||
(setf *default-pathname-defaults*
|
(setf *default-pathname-defaults*
|
||||||
(merge-pathnames "../../")) ; LQML root
|
(merge-pathnames "../../")) ; LQML root
|
||||||
|
|
||||||
#-(or android ios)
|
#-mobile
|
||||||
(asdf:make-build "lqml"
|
(asdf:make-build "lqml"
|
||||||
:monolithic t
|
:monolithic t
|
||||||
:type :static-library
|
:type :static-library
|
||||||
|
|
@ -26,7 +29,7 @@
|
||||||
#+darwin "macos")
|
#+darwin "macos")
|
||||||
:init-name "ini_LQML")
|
:init-name "ini_LQML")
|
||||||
|
|
||||||
#+(or android ios)
|
#+mobile
|
||||||
(progn
|
(progn
|
||||||
(pushnew :interpreter *features*)
|
(pushnew :interpreter *features*)
|
||||||
(defvar *asdf-system* "lqml")
|
(defvar *asdf-system* "lqml")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue