# HG changeset patch # User # Date 2020-06-25 00:29:13 # Node ID 4530ce7bb303a07acf2bf8c08f97617667565ba3 # Parent cd6f7adb5ee3d513e37a833cf40e4ba34a235447 Remove buildapp diff --git a/Makefile b/Makefile --- a/Makefile +++ b/Makefile @@ -1,10 +1,6 @@ BIN = txt2web -PKG = $(BIN) -SYSTEM = $(BIN) -DIST = txt2web.tar.xz - -LISP = sbcl +DIST = $(BIN).tar.xz all: $(BIN) @@ -13,11 +9,7 @@ dist: $(DIST) graphs: diagrams.png $(BIN): *.asd src/*.lisp src/*.ps strings/*.sexp - buildapp.$(LISP) --asdf-path .\ - --asdf-tree .qlot/dists\ - --load-system $(SYSTEM)\ - --entry $(PKG):entry-point\ - --output $(BIN) + sbcl --load build.lisp -- $(BIN) install-deps: sbcl --load install-deps.lisp diff --git a/build.lisp b/build.lisp new file mode 100644 --- /dev/null +++ b/build.lisp @@ -0,0 +1,10 @@ +(let ((root (asdf:system-source-directory :txt2web))) + (asdf:initialize-source-registry + `(:source-registry + :ignore-inherited-configuration + (:directory ,root) + (:tree ,(format nil "~A~A" root ".qlot/dists"))))) + +(asdf:load-system :txt2web) +(uiop:register-image-restore-hook 'txt2web::entry-point-no-args nil) +(uiop:dump-image "txt2web" :executable t) diff --git a/examples/txt2gam-game.txt b/examples/txt2gam-game.txt --- a/examples/txt2gam-game.txt +++ b/examples/txt2gam-game.txt @@ -68,7 +68,7 @@ IF OBJ 'Конструктор': DELOBJ 'Конструктор' ' - Вот тебе конструктор.' ' - Спасибо, брат.' - DELACT + DELACT $SELACT END END IF OBJ 'Плюшевый медведь': @@ -76,7 +76,7 @@ IF OBJ 'Плюшевый медведь': DELOBJ 'Плюшевый медведь' ' - Вот тебе плюшевый медведь.' ' - Спасибо, брат.' - DELACT + DELACT $SELACT END END IF OBJ 'Вязальный набор': @@ -84,7 +84,7 @@ IF OBJ 'Вязальный набор': DELOBJ 'Вязальный набор' ' - Вот тебе вязальный набор.' ' - Спасибо, сынок.' - DELACT + DELACT $SELACT END END IF OBJ 'Инструменты': @@ -92,7 +92,7 @@ IF OBJ 'Инструменты': DELOBJ 'Инструменты' ' - Вот тебе инструменты.' ' - Спасибо, сын.' - DELACT + DELACT $SELACT END END ACT 'Идти в порт':GOTO 'Работа' diff --git a/src/main.lisp b/src/main.lisp --- a/src/main.lisp +++ b/src/main.lisp @@ -4,13 +4,14 @@ (defvar *app-name* "") (defun entry-point-no-args () + (format t "~A~%" uiop:*command-line-arguments*) (entry-point uiop:*command-line-arguments*)) (defun entry-point (args) - (setf *app-name* (first args)) + (setf *app-name* (uiop:argv0)) (let ((*package* (find-package :txt2web))) (catch :terminate - (let ((compiler (apply #'make-instance 'compiler (parse-opts (rest args))))) + (let ((compiler (apply #'make-instance 'compiler (parse-opts args)))) (write-compiled-file compiler)))) (values))