android/example: clean up the init scripts
Move the ASDF cache initialization below it's inclusion and don't be so noisy with swank. Also add the function sysinit which downloads and installs the Quicklisp and replaces it's interpreted gunzip with our precompiled deflate.
This commit is contained in:
parent
35a6e91488
commit
899a88a727
2 changed files with 16 additions and 12 deletions
|
|
@ -7,17 +7,13 @@
|
|||
(setq *default-directory*
|
||||
*default-pathname-defaults*)
|
||||
(defvar *ecl-home* *default-directory*)
|
||||
(ext:setenv "USER-CACHE"
|
||||
(namestring (merge-pathnames #P"../cache/" *ecl-home*)))
|
||||
(setf asdf:*user-cache* (merge-pathnames #P"../cache/" *default-pathname-defaults*))
|
||||
|
||||
(format t "Loading the modules~%")
|
||||
(require :ASDF)
|
||||
(require :SOCKETS)
|
||||
(require :SERVE-EVENT)
|
||||
(require '#:asdf)
|
||||
(require '#:sockets)
|
||||
(require '#:serve-event)
|
||||
|
||||
;; swank probes sys:serve-event.fas (which doesn't exist)
|
||||
;; (pushnew :SERVE-EVENT *features*)
|
||||
(setf asdf:*user-cache* (merge-pathnames #P"../cache/" *default-pathname-defaults*))
|
||||
|
||||
(pushnew (namestring *default-pathname-defaults*)
|
||||
asdf:*central-registry*)
|
||||
|
|
@ -50,7 +46,6 @@
|
|||
(let* ((socket (connection.socket-io connection))
|
||||
(inputs (list socket #+(or) stdin))
|
||||
(ready (wait-for-input inputs)))
|
||||
(describe (list 'hobaa connection stdin socket inputs ready))
|
||||
(cond ((eq ready :interrupt)
|
||||
(check-slime-interrupts))
|
||||
((member socket ready)
|
||||
|
|
@ -86,8 +81,7 @@
|
|||
(swank:create-server :port 4005
|
||||
:dont-close t
|
||||
;; :style nil #|:spawn|#
|
||||
))
|
||||
))
|
||||
))))
|
||||
|
||||
(format t "Initialization done~%")
|
||||
(force-output)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
(setq *default-directory*
|
||||
*default-pathname-defaults*)
|
||||
|
||||
(format t "user.lisp 1~%")
|
||||
(defun sysinfo (&optional (out *standard-output*))
|
||||
"Print the current environment to a stream."
|
||||
(declare (stream out))
|
||||
|
|
@ -49,4 +48,15 @@ Current time:~25t" (/ internal-time-units-per-second) *gensym-counter*)
|
|||
(format out "~a" (get-universal-time))
|
||||
(format out "~%~75~~%") (room) (values))
|
||||
|
||||
(defun sysinit ()
|
||||
(format t "Loading the quicklisp subsystem~%")
|
||||
(require '#:ecl-quicklisp)
|
||||
(require '#:deflate)
|
||||
(require '#:ql-minitar)
|
||||
;; Replace the interpreted function with the precompiled equivalent
|
||||
;; from DEFLATE
|
||||
(eval (read-from-string
|
||||
"(setf (symbol-function 'ql-gunzipper:gunzip) #'deflate:gunzip))")))
|
||||
|
||||
(sysinfo)
|
||||
;; (sysinit)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue