changelog shortlog graph tags branches changeset files revisions annotate raw help

Mercurial > demo / tools/build-image.lisp

changeset 39: 1ef551e24009
parent: 2015d7277629
author: Richard Westhaver <ellis@rwest.io>
date: Thu, 11 Apr 2024 18:58:35 -0400
permissions: -rw-r--r--
description: added musicbrainz db example
1 (in-package :cl-user)
2 
3 (load "tools/prepare-image.lisp")
4 
5 (defvar *image-load-hook-contents* (uiop:read-file-string "tools/init.lisp"))
6 (defvar *hook-loaded-p* nil)
7 
8 (defun image-load-hook ()
9  ;; On MacOS, the TMPDIR variable can change between sessions.
10  (uiop:setup-temporary-directory)
11  ;; If we used this image to deliver another image, we don't
12  ;; want to load the same hook twice
13  (unless *hook-loaded-p*
14  (load (make-string-input-stream *image-load-hook-contents*))
15  (setf *hook-loaded-p* t)))
16 
17 (compile 'image-load-hook)
18 
19 (pushnew 'image-load-hook sb-ext:*init-hooks*)
20 
21 (format t "Got command line arguments: ~S" (uiop:raw-command-line-arguments))
22 
23 (sb-ext:save-lisp-and-die
24  (namestring
25  (make-pathname
26  #+win32 :type #+win32 "exe"
27  :defaults #P"build/sbcl-console"))
28  :executable t)