Windows support

This commit is contained in:
2025-11-13 09:33:26 +01:00
parent a86b4a0cda
commit fcbce01ebb

View File

@@ -56,12 +56,15 @@
(define (webui-wire-exists?) (define (webui-wire-exists?)
(let ((os (system-type 'os*))) (let ((os (system-type 'os*)))
(if (eq? os 'linux) (cond [(eq? os 'linux)
(webui-wire-exists-linux?) (webui-wire-exists-linux?)]
(error [(eq? os 'windows)
(format (webui-wire-exists-windows?)]
"Currently not implemented operating system '~a'" os)) [else
) (error
(format
"Currently not implemented operating system '~a'" os))]
)
) )
) )
@@ -97,6 +100,14 @@
) )
) )
(define (webui-wire-exists-windows?)
(let ((webui-wire-exe (get-webui-wire-cmd 'windows)))
(if (file-exists? webui-wire-exe)
#t
(download-webui-wire-windows))
)
)
(define (download-webui-wire-linux) (define (download-webui-wire-linux)
(let* ((download-link (current-webui-wire-link)) (let* ((download-link (current-webui-wire-link))
@@ -106,6 +117,14 @@
) )
) )
(define (download-webui-wire-windows)
(let* ((download-link (current-webui-wire-link))
(filepath (do-download download-link "webui-wire.exe")))
(displayln filepath)
#t
)
)
(define (do-download link filename) (define (do-download link filename)
(let* ((url (string->url link)) (let* ((url (string->url link))
(port-in (get-pure-port url #:redirections 10)) (port-in (get-pure-port url #:redirections 10))