This commit is contained in:
2026-04-07 13:46:34 +02:00
parent bf99518ea4
commit e1390a205b
4 changed files with 174 additions and 13 deletions

View File

@@ -4,6 +4,7 @@
racket/runtime-path
ffi/unsafe
setup/dirs
"downloader.rkt"
)
(provide while
@@ -55,18 +56,12 @@
(do-for-f))))))
(define-runtime-path lib-path "..")
(define (build-lib-path)
(let ((os-type (system-type 'os*)))
(if (eq? os-type 'windows)
(build-path lib-path "lib" "dll")
(let* ((arch (symbol->string (system-type 'arch)))
(subdir (string-append (symbol->string os-type) "-" arch)))
(let ((path (build-path lib-path "lib" subdir)))
path)))))
(soundlibs-directory))
(define (get-lib* libs-to-try orig-libs versions)
(unless (soundlibs-available?)
(download-soundlibs))
(if (null? libs-to-try)
(error (format "Cannot find library, tried ~a" orig-libs))
(ffi-lib (car libs-to-try) versions
@@ -77,4 +72,4 @@
(define (get-lib libs-to-try versions)
(get-lib* libs-to-try libs-to-try versions))
) ; end of module
) ; end of module