racket-installer now returns list of installed files

This commit is contained in:
retropikzel 2025-06-28 07:26:44 +03:00
parent 2310094354
commit 1b6c0fb9da

View file

@ -1955,20 +1955,18 @@
;; a file that sets language to r7rs and includes the .sld file ;; a file that sets language to r7rs and includes the .sld file
(define (racket-installer impl cfg library dir) (define (racket-installer impl cfg library dir)
(let* ((source-rkt-file (let* ((source-rkt-file
(string-append dir (make-path dir
"/" (string-append (path-strip-extension (get-library-file cfg library))
(path-strip-extension (get-library-file cfg library)) ".rkt")))
".rkt"))
(install-dir (get-install-source-dir impl cfg)) (install-dir (get-install-source-dir impl cfg))
(dest-rkt-file (dest-rkt-file
(string-append install-dir (make-path install-dir
"/" (string-append (library->path cfg library) ".rkt")))
(library->path cfg library) ".rkt"))
(path (make-path install-dir dest-rkt-file)) (path (make-path install-dir dest-rkt-file))
(include-filename (string-append (include-filename (string-append
(path-strip-directory (path-strip-directory (path-strip-extension path))
(path-strip-extension path)) ".sld"))
".sld"))) (installed-files (default-installer impl cfg library dir)))
(with-output-to-file (with-output-to-file
source-rkt-file source-rkt-file
(lambda () (lambda ()
@ -1979,8 +1977,8 @@
#\newline #\newline
"(include \"" include-filename "\")" "(include \"" include-filename "\")"
#\newline)))) #\newline))))
(default-installer impl cfg library dir) (install-file cfg source-rkt-file dest-rkt-file)
(install-file cfg source-rkt-file dest-rkt-file))) (cons dest-rkt-file installed-files)))
;; installers should return the list of installed files ;; installers should return the list of installed files
(define (lookup-installer installer) (define (lookup-installer installer)