Windows...
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -4,6 +4,7 @@
|
||||
ffi/unsafe/define
|
||||
ffi/unsafe/atomic
|
||||
ffi/unsafe/os-thread
|
||||
ffi/unsafe/cvector
|
||||
racket/async-channel
|
||||
racket/runtime-path
|
||||
racket/port
|
||||
@@ -131,35 +132,6 @@
|
||||
"QtWebEngineProcess.exe"
|
||||
"QtWebEngineProcess"))
|
||||
|
||||
(set! quiet-call
|
||||
(when (or (eq? os 'windows) (eq? os 'linux))
|
||||
(putenv "QT_PLUGIN_PATH"
|
||||
(path->string (build-path os-lib-dir)))
|
||||
(putenv "QTWEBENGINEPROCESS_PATH"
|
||||
(path->string (build-path os-lib-dir webengine-process)))
|
||||
(putenv "QTWEBENGINE_RESOURCES_PATH"
|
||||
(path->string (build-path os-lib-dir "resources")))
|
||||
(putenv "QTWEBENGINE_LOCALES_PATH"
|
||||
(path->string (build-path os-lib-dir "translations" "qtwebengine_locales")))
|
||||
(putenv "RKT_WEBVIEW_PRG"
|
||||
(let ((p
|
||||
(path->string (build-path os-lib-dir rktwebview-prg)))
|
||||
)
|
||||
(displayln p)
|
||||
p
|
||||
))
|
||||
(when (eq? os 'linux)
|
||||
(putenv "QT_QPA_PLATFORM" "xcb")
|
||||
(putenv "LD_LIBRARY_PATH"
|
||||
(string-append
|
||||
(path->string (build-path os-lib-dir)) ":"
|
||||
(path->string (build-path os-lib-dir "platforms"))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;;; Preload libraries
|
||||
|
||||
#|
|
||||
@@ -209,6 +181,8 @@
|
||||
|
||||
(define-ffi-definer define-rktwebview webview-lib)
|
||||
|
||||
|
||||
|
||||
;;; Callbacks from the OS library
|
||||
|
||||
;(define callback-box (box '()))
|
||||
@@ -300,6 +274,9 @@
|
||||
)
|
||||
)
|
||||
|
||||
;RKTWEBVIEW_EXPORT void rkt_webview_env(const char *env_cmds[]);
|
||||
(define-rktwebview rkt_webview_env
|
||||
(_fun _cvector -> _void))
|
||||
|
||||
;RKTWEBVIEW_QT_EXPORT void rkt_webview_init(int &argc, char **argv);
|
||||
(define-rktwebview rkt_webview_init
|
||||
@@ -458,6 +435,34 @@
|
||||
; 'done)))))
|
||||
; (f)))))
|
||||
|
||||
(define rkt_env
|
||||
(when (or (eq? os 'windows) (eq? os 'linux))
|
||||
(let ((env (list (string-append "QT_PLUGIN_PATH=" (path->string (build-path os-lib-dir)))
|
||||
(string-append "QTWEBENGINEPROCESS_PATH=" (path->string (build-path os-lib-dir webengine-process)))
|
||||
(string-append "QTWEBENGINE_RESOURCES_PATH=" (path->string (build-path os-lib-dir "resources")))
|
||||
(string-append "QTWEBENGINE_LOCALES_PATH=" (path->string (build-path os-lib-dir "translations" "qtwebengine_locales")))
|
||||
(string-append "RKT_WEBVIEW_PRG=" (path->string (build-path os-lib-dir rktwebview-prg))))))
|
||||
(when (eq? os 'linux)
|
||||
(set! env (append
|
||||
env
|
||||
(list
|
||||
(string-append "QT_QPA_PLATFORM=" "xcb")
|
||||
(string-append "LD_LIBRARY_PATH="
|
||||
(string-append
|
||||
(path->string (build-path os-lib-dir)) ":"
|
||||
(path->string (build-path os-lib-dir "platforms"))
|
||||
)))))
|
||||
)
|
||||
(append env (list #f)))))
|
||||
|
||||
;(define env_array (_array _string/utf-8 (length rkt_env)))
|
||||
|
||||
;(let ((i 0))
|
||||
; (while (< i (length rkt_env))
|
||||
; (array-set! env_array i (list-ref rkt_env i))
|
||||
; (set! i (+ i 1))))
|
||||
|
||||
(rkt_webview_env (list->cvector rkt_env _string/utf-8))
|
||||
(rkt_webview_init)
|
||||
|
||||
|
||||
@@ -493,7 +498,7 @@
|
||||
(set! waiting (- waiting 1))
|
||||
)
|
||||
)
|
||||
(sleep 0.001)
|
||||
(sleep 0.005)
|
||||
(f))
|
||||
))
|
||||
(f)))
|
||||
|
||||
Reference in New Issue
Block a user