Reordering FFI libs
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
|
||||
(require ffi/unsafe
|
||||
ffi/unsafe/define
|
||||
setup/dirs
|
||||
"../utils/utils.rkt"
|
||||
)
|
||||
|
||||
@@ -45,22 +44,30 @@
|
||||
)
|
||||
|
||||
|
||||
;(define-ffi-definer define-tag-lib
|
||||
; (ffi-lib "tag" '("0" #f)
|
||||
; #:get-lib-dirs (lambda ()
|
||||
; (cons (build-path ".") (get-lib-search-dirs)))
|
||||
; #:fail (lambda ()
|
||||
; (ffi-lib (get-lib-path "tag.dll")))
|
||||
; ))d
|
||||
;(define-runtime-path lib-path "..");
|
||||
;
|
||||
;(define libs (let ((os-type (system-type 'os*)))
|
||||
; (if (eq? os-type 'windows)
|
||||
; (list
|
||||
; (build-path lib-path "lib" "dll" "tag")
|
||||
; (build-path lib-path "lib" "dll" "tag_c"))
|
||||
; (let* ((arch (symbol->string (system-type 'arch)))
|
||||
; (subdir (string-append (symbol->string os-type) "-" arch)))
|
||||
; (list
|
||||
; (build-path lib-path "lib" subdir "libtag")
|
||||
; (build-path lib-path "lib" subdir "libtag_c"))))))
|
||||
|
||||
(define-ffi-definer define-tag-c-lib
|
||||
(ffi-lib "libtag_c" '("2" #f)
|
||||
#:get-lib-dirs (lambda ()
|
||||
(cons (build-path ".") (get-lib-search-dirs)))
|
||||
#:fail (lambda ()
|
||||
(let ((path (get-lib-path "tag_c.dll")))
|
||||
(ffi-lib path)))
|
||||
))
|
||||
;(define (get-lib l)
|
||||
; (ffi-lib l '("2" #f)
|
||||
; #:get-lib-dirs (λ ()
|
||||
; (cons (build-path ".") (get-lib-search-dirs)))
|
||||
; #:fail (λ ()
|
||||
; (error (format "Cannot find library ~a" l)))
|
||||
; ))
|
||||
|
||||
(define libtag (get-lib '("tag" "libtag") '("2" #f)))
|
||||
(define libtag_c (get-lib '("tag_c" "libtag_c") '("#2" #f)))
|
||||
(define-ffi-definer define-tag-c-lib libtag_c)
|
||||
|
||||
(define TagLib_File_Type
|
||||
(_enum '(
|
||||
|
||||
Reference in New Issue
Block a user