From fcbce01ebb5bd8315ef681ec0a1b6206e2d06506 Mon Sep 17 00:00:00 2001 From: Hans Dijkema Date: Thu, 13 Nov 2025 09:33:26 +0100 Subject: [PATCH] Windows support --- private/webui-wire-download.rkt | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/private/webui-wire-download.rkt b/private/webui-wire-download.rkt index cc52441..6e80e53 100644 --- a/private/webui-wire-download.rkt +++ b/private/webui-wire-download.rkt @@ -56,12 +56,15 @@ (define (webui-wire-exists?) (let ((os (system-type 'os*))) - (if (eq? os 'linux) - (webui-wire-exists-linux?) - (error - (format - "Currently not implemented operating system '~a'" os)) - ) + (cond [(eq? os 'linux) + (webui-wire-exists-linux?)] + [(eq? os 'windows) + (webui-wire-exists-windows?)] + [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) (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) (let* ((url (string->url link)) (port-in (get-pure-port url #:redirections 10))