summaryrefslogtreecommitdiff
path: root/build.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'build.lisp')
-rw-r--r--build.lisp34
1 files changed, 13 insertions, 21 deletions
diff --git a/build.lisp b/build.lisp
index 9e98804..4552239 100644
--- a/build.lisp
+++ b/build.lisp
@@ -1,29 +1,21 @@
-(ql:quickload :imbricate)
-
-(defpackage #:imbricate.run
- (:use #:cl))
-
-(in-package :imbricate.run)
-
-(defun print-help ()
- (format t "USAGE: imbricate SOURCE-DIR TARGET-DIR SHEET-TITLE~%~%")
- (format t " SOURCE-DIR a directory containing png files. Non png files are skipped~%")
- (format t " TARGET-DIR a directory where the tilesheet is to be built.~%")
- (format t " SHEET-TITLE a name used for this sheet and its meta info~%~%"))
+(ql:register-local-projects)
+(dolist (dir ql:*local-project-directories*)
+ (push dir asdf:*central-registry*))
+(ql:quickload :imbricate-run)
#+sbcl
-(progn
- (defun main ()
- (unless (= 4 (length sb-ext:*posix-argv*))
- (print-help)
- (uiop:quit))
- (destructuring-bind (src target title) (cdr sb-ext:*posix-argv*)
- (imbricate:imbricate-and-save src target title)
- (uiop:quit)))
+(progn
+ (sb-ext:save-lisp-and-die #p"imbricate" :toplevel #'imbricate.run:main :executable t :compression t))
- (sb-ext:save-lisp-and-die #p"imbricate" :toplevel #'main :executable t :compression t))
+#+ecl
+(progn
+ (asdf:make-build :imbricate-run
+ :type :program
+ :move-here #P"./"
+ :epilogue-code '(imbricate.run:main))
+ (ext:exit))