compile roswell scripts

This commit is contained in:
LordMZTE 2023-05-19 16:23:34 +02:00
parent 19b83f34e5
commit e1a734d9b3
Signed by: LordMZTE
GPG key ID: B64802DC33A64FF6
3 changed files with 29 additions and 16 deletions

View file

@ -1,5 +1,8 @@
#!/usr/bin/env -S ros -Q --
#|-*- mode:lisp -*-|#
#|
exec ros -Q -- $0 "$@"
|#
(progn ;;init forms
(ros:ensure-asdf)
#+quicklisp(ql:quickload '(uiop trivial-raw-io) :silent t))

View file

@ -12,14 +12,12 @@
(build-path (output-bin-path) "bin" bin))
;; Symlink interpreted scripts
(mklink "scripts/map-touch-display.rkt" (bin-path "map-touch-display"))
(mklink "scripts/playvid.ros" (bin-path "playvid"))
(mklink "scripts/start-joshuto.sh" (bin-path "start-joshuto"))
(mklink "scripts/startriver.sh" (bin-path "startriver"))
(mklink "scripts/swank-repl.ros" (bin-path "swank-repl"))
(mklink "scripts/update-nvim-plugins.rkt" (bin-path "update-nvim-plugins"))
(mklink "scripts/withjava.sh" (bin-path "withjava"))
;; Compile Zig scripts
;; Compile scripts
(install-rust "scripts/i3status")
(install-zig "scripts/mzteinit")
(install-zig "scripts/openbrowser")
@ -27,4 +25,6 @@
(install-zig "scripts/prompt")
(install-zig "scripts/randomwallpaper")
(install-zig "scripts/vinput")
(install-roswell "scripts/playvid.ros")
null)

View file

@ -7,7 +7,8 @@
rm
copy
install-zig
install-rust)
install-rust
install-roswell)
;; Whether to log calls or not
(define log-calls (make-parameter #t))
@ -33,17 +34,26 @@
(define-logging copy copy-directory/files)
(define-logging install-zig
(λ (path)
(parameterize ([current-directory path] [log-calls #f])
(cmd "zig" "build" "-p" (output-bin-path) "-Doptimize=ReleaseFast"))))
(λ (path)
(parameterize ([current-directory path] [log-calls #f])
(cmd "zig" "build" "-p" (output-bin-path) "-Doptimize=ReleaseFast"))))
(define-logging install-rust
(λ (path)
(parameterize ([current-directory path] [log-calls #f])
(cmd "cargo"
"-Z"
"unstable-options"
"build"
"--release"
"--out-dir"
(build-path (output-bin-path) "bin")))))
(λ (path)
(parameterize ([current-directory path] [log-calls #f])
(cmd "cargo"
"-Z"
"unstable-options"
"build"
"--release"
"--out-dir"
(build-path (output-bin-path) "bin")))))
(define-logging
install-roswell
(λ (path)
(parameterize ([log-calls #f])
(match-let*-values ([(_ filename _) (split-path path)]
[(outpath)
(build-path (output-bin-path) "bin" (path-replace-extension filename ""))])
(cmd "ros" "dump" "executable" path "-o" outpath)))))