Add Qt executable and run-qt target - runtime issues remain
ober
226705d19f92f755c01e5c47ac557bcda5308d85
--- a/Makefile +++ b/Makefile @@ -25,6 +25,9 @@ rebuild: run: build $(SCHEME) $(LIBDIRS) --script main.ss +run-qt: build + $(SCHEME) $(LIBDIRS) --script qt-main.ss + # Qt backend build target build-qt: build @echo "╔════════════════════════════════════════════════════════════════╗" --- a/lib/jerboa-emacs/qt/sci-shim.sls +++ b/lib/jerboa-emacs/qt/sci-shim.sls @@ -59,7 +59,6 @@ (jerboa-emacs core) (chez-scintilla constants) (chez-scintilla scintilla) (chez-qt qt) (std sugar) (jerboa core) (jerboa runtime)) - (def SCI_REPLACESEL 2170) (def (sci-send sci msg (wparam 0) (lparam 0)) (qt-scintilla-send-message sci msg wparam lparam)) (def (sci-send/string sci msg str (wparam 0)) new file mode 100755 --- /dev/null +++ b/qt-main.ss @@ -0,0 +1,23 @@ +#!/usr/bin/env scheme-script +#!chezscheme +;;; qt-main.ss — Qt executable entry point for jerboa-emacs + +(import (except (chezscheme) make-hash-table hash-table? iota 1+ 1- + getenv path-extension path-absolute? thread? + make-mutex mutex? mutex-name) + (jerboa core) + (std sugar) + (jerboa-emacs core) + (jerboa-emacs qt/app) + (jerboa-emacs qt/main)) + +;;; Entry point +(define (main args) + (displayln "Starting jerboa-emacs Qt...") + (let ((exit-code (qt-main args))) + (displayln (string-append "jerboa-emacs Qt exited with code: " + (number->string exit-code))) + exit-code)) + +;;; Run +(exit (main (command-line))) --- a/src/jerboa-emacs/qt/sci-shim.ss +++ b/src/jerboa-emacs/qt/sci-shim.ss @@ -50,7 +50,6 @@ :std/sugar) ;; SCI_REPLACESEL constant -(def SCI_REPLACESEL 2170) ;; Helpers (def (sci-send sci msg (wparam 0) (lparam 0))