Add binary build stuff to editor
This commit is contained in:
parent
ad297f0c09
commit
0168fb4079
2 changed files with 41 additions and 2 deletions
38
wip-duuqnd/editor/binary-build.lisp
Normal file
38
wip-duuqnd/editor/binary-build.lisp
Normal file
|
@ -0,0 +1,38 @@
|
|||
(in-package #:editor)
|
||||
|
||||
(defun batch-help ()
|
||||
(format t "Usage: c6le <path to tty or pts>~%")
|
||||
(format t "This editor is intended to be used on a different terminal than it's started
|
||||
from, please supply a terminal to run on. For testing on a terminal emulator,
|
||||
open it, check which pts it's running on using \"ps\", run a command like
|
||||
\"clear; while true; do sleep 1000;done\", then start the editor in another
|
||||
terminal giving the pts as a command-line parameter.~%"))
|
||||
|
||||
(defun main (arguments)
|
||||
(format t "C64 Livecoding editor, v~A~%"
|
||||
#.(asdf:component-version (asdf:find-system '#:user-side-compiler)))
|
||||
(let ((tty (and (first arguments)
|
||||
(probe-file (first arguments)))))
|
||||
(unless tty
|
||||
(batch-help)
|
||||
(abort))
|
||||
(let ((*terminal-path* tty))
|
||||
(make-editor))
|
||||
(editor-loop)))
|
||||
|
||||
(defun batch-main ()
|
||||
(restart-bind
|
||||
((abort
|
||||
(lambda ()
|
||||
(sb-ext:exit :code -1))))
|
||||
(main (uiop:command-line-arguments))))
|
||||
|
||||
(defun build ()
|
||||
(assert (not (member :swank *features*)))
|
||||
(usc:usc-init)
|
||||
(sb-ext:save-lisp-and-die "c6le"
|
||||
:toplevel #'batch-main
|
||||
:executable t
|
||||
:save-runtime-options t
|
||||
:root-structures 'batch-main
|
||||
:compression t))
|
|
@ -1,8 +1,9 @@
|
|||
;;;; editor.asd
|
||||
|
||||
(asdf:defsystem #:editor
|
||||
:version "0.0.1"
|
||||
:version "0.1.0"
|
||||
:serial t
|
||||
:depends-on (#:user-side-compiler #:trivial-gray-streams)
|
||||
:components ((:file "package")
|
||||
(:file "editor")))
|
||||
(:file "editor")
|
||||
(:file "binary-build")))
|
||||
|
|
Loading…
Add table
Reference in a new issue