#lang racket (require racket/gui "gui.rkt" simple-ini/class racket-sound racket-webview racket/runtime-path "utils.rkt" ) (define-runtime-path rkt-gui-dir "gui") (ao-set-async-mode! 'ffi) (define log-file (build-path (find-system-path 'home-dir) ".rktplayer.log")) (sl-log-to-file log-file) (displayln (format "Logging to file ~a" log-file)) (define (run) (let* ((ini (new ini% [file 'rktplayer])) (context (new wv-context% [base-path rkt-gui-dir] [ini ini] [file-getter (webview-standard-file-getter rkt-gui-dir #:not-exist (λ (file base-path path) (dbg-rktplayer "FILE:~a, ~a, ~a" file base-path path) (if (string-prefix? file "/tmp/cover-image") (begin (dbg-rktplayer "RETURNING FILE") file) path)) )] )) (window (new rktplayer% [wv-context context])) ) window) ) ;(run)