Skip to content

Commit

Permalink
Note binary hash on launch.
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinmera committed Jan 4, 2024
1 parent f770180 commit 4c5b494
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions backends/nxgl/context.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@
(unwind-protect (finalize main)
(nxgl:shutdown)))))

(defmethod version ((_ (eql :binary)))
"?")

(defun system-username ()
(nxgl:username))

Expand Down
2 changes: 1 addition & 1 deletion main.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
(standalone-logging-handler)
(v:output-here)
(v:info :trial.main "GENESIS")
(v:info :trail.main "Launching version ~a" (version :app))
(v:info :trail.main "Launching version ~a (~a)" (version :app) (version :binary))
(when (string= "true" (uiop:getenv "TRIAL_QUIT_AFTER_INIT"))
(let ((context (getf initargs :context)))
(setf (getf initargs :context) (list* :visible NIL context))))
Expand Down
5 changes: 5 additions & 0 deletions toolkit.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@
(asdf:component-version (asdf:find-system +app-system+))
(when commit (subseq commit 0 7)))))

(defmethod version ((_ (eql :binary)))
(with-output-to-string (out)
(loop for o across (sha3:sha3-digest-file (first (uiop:raw-command-line-arguments)) :output-bit-length 224)
do (format out "~2,'0X" o))))

(let ((cache NIL))
(defun data-root (&optional (app +app-system+))
(if (deploy:deployed-p)
Expand Down
1 change: 1 addition & 0 deletions trial.asd
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@
:quickhull
:convex-covering
:machine-state/opengl
:sha3
(:feature :windows :com-on)))

#+sbcl
Expand Down

0 comments on commit 4c5b494

Please sign in to comment.