From fef57f54476bd9dbb535ab900dd5c2462cecadbc Mon Sep 17 00:00:00 2001 From: polos Date: Thu, 14 Sep 2017 13:17:44 +0200 Subject: [PATCH] build wrapper functions by default (no more optionally) --- README-1.md | 10 +--- ...NOWN-ISSUES.md => README-3-KNOWN-ISSUES.md | 0 README-3-OPTIONAL.md | 55 ------------------- examples/0-Tutorial/1.lisp | 3 - examples/0-Tutorial/2.lisp | 3 - examples/0-Tutorial/3.lisp | 3 - examples/0-Tutorial/4.lisp | 3 - examples/2-clock.lisp | 3 - examples/3-main-window.lisp | 3 - examples/4-wiggly-widget.lisp | 3 - examples/5-colliding-mice.lisp | 3 - examples/6-download.lisp | 3 - examples/7-Sokoban/eql-sokoban.lisp | 7 +-- examples/8-OpenGL/main-window.lisp | 3 - .../9-simple-lisp-editor/local-server.lisp | 3 - .../M-modules/multimedia/camera/camera.lisp | 3 - .../video-graphics-item.lisp | 3 - .../multimedia/video-widget/video-widget.lisp | 3 - .../quick/Tic-Tac-Toe/tic-tac-toe.lisp | 3 - .../quick/item-model/abstract-model.lisp | 3 - .../quick/item-model/list-model.lisp | 3 - .../quick/painted-item/painted-item.lisp | 3 - .../M-modules/quick/palindrome-1/run.lisp | 3 - .../quick/palindrome-2/palindrome.lisp | 3 - .../M-modules/quick/qml-lisp/example.lisp | 3 - .../quick/quickwidget/quickwidget.lisp | 3 - examples/M-modules/quick/sokoban/sokoban.lisp | 3 - .../quick/table-view/table-view.lisp | 3 - examples/M-modules/sql/sqlite.lisp | 3 - .../web-kit-engine/web-kit-engine.lisp | 3 - examples/M-modules/webengine/minimal.lisp | 3 - .../Examples-Browser/examples-browser.lisp | 3 - examples/M-modules/webkit/dom.lisp | 3 - examples/M-modules/webkit/plugin-widget.lisp | 3 - examples/M-modules/webkit/strip-html.lisp | 3 - examples/M-modules/webkit/webkit-bridge.lisp | 3 - examples/X-extras/CLOS-encapsulation.lisp | 3 - examples/X-extras/calculator.lisp | 3 - examples/X-extras/lcd.lisp | 3 - examples/X-extras/make-qimage.lisp | 3 - .../X-extras/move-blocks/move-blocks.lisp | 3 - examples/X-extras/palindrome/palindrome.lisp | 3 - examples/X-extras/primes-thread.lisp | 3 - examples/X-extras/qimage/qimage.lisp | 3 - examples/X-extras/screenshot/screenshot.lisp | 3 - examples/X-extras/storage-info.lisp | 3 - src/eql.cpp | 2 +- src/eql5.pro | 4 +- src/gen/webengine/_q_methods.h | 16 +++--- src/make-wrappers.lisp | 28 ---------- src/make.lisp | 30 ++++++++-- src/rebuild | 5 -- 52 files changed, 41 insertions(+), 242 deletions(-) rename README-4-KNOWN-ISSUES.md => README-3-KNOWN-ISSUES.md (100%) delete mode 100644 README-3-OPTIONAL.md delete mode 100644 src/make-wrappers.lisp diff --git a/README-1.md b/README-1.md index 0416c9c..75cb3e7 100644 --- a/README-1.md +++ b/README-1.md @@ -18,7 +18,7 @@ Build (for the impatient) In `src/` do: ``` - $ ecl -shell make + $ ecl -shell make # will take a while $ qmake eql5.pro # comment out all modules you don't need $ make $ sudo make install # Unix only @@ -28,9 +28,6 @@ Now you should be able to run `eql5`. If there are problems, or you want more info, see detailed instructions below. -N.B. If the above runs, please don't forget to integrate the -**wrapper functions**, see `README-3-OPTIONAL`, needed for serious development. - Tested with: @@ -313,11 +310,6 @@ You might want to put this in your `~/.eclrc` file: eql:*break-on-errors* t) ``` -It is **highly recommended** to integrate the wrapper functions, see -`README-3-OPTIONAL`. -This will make all Qt functions real Lisp functions, which also means symbol -tab-completion, both in Emacs/Slime and with `ecl-readline`. - Please see also example `examples/X-extras/CLOS-encapsulation.lisp` for encapsulation of Qt classes in Lisp classes or structs (that is, Lisp classes that behave like a Qt class if passed to Qt functions). diff --git a/README-4-KNOWN-ISSUES.md b/README-3-KNOWN-ISSUES.md similarity index 100% rename from README-4-KNOWN-ISSUES.md rename to README-3-KNOWN-ISSUES.md diff --git a/README-3-OPTIONAL.md b/README-3-OPTIONAL.md deleted file mode 100644 index 5ad8a1f..0000000 --- a/README-3-OPTIONAL.md +++ /dev/null @@ -1,55 +0,0 @@ - -### Wrapper functions - -(for manual loading, see `src/lisp/all-wrappers.lisp`) - -Examples: - -``` - (|show| widget) - - (|toString| (|currentTime.QTime|)) ; static function -``` - - -### Integrate them permanently - -Build EQL5 as usual, then run (in `src/`) - -``` - $ eql5 make-wrappers.lisp -``` - -``` - $ touch tmp/eql.o # Windows: del tmp/eql.obj -``` - -``` - $ qmake eql_lib.pro - $ make # MSVC: nmake - $ sudo make install # Unix only -``` - -Note: The resulting shared library should be stripped (automatically done by -`make install`); this will reduce its size considerably. - --- - -The convenience macro `x:do-with` has been adapted to work with the wrappers: - -``` - (x:do-with item - (|setTextAlignment| 0 |Qt.AlignRight|) - (|setText| 0 "123")) -``` - --- - -Normally not needed, but if you want to generate the wrappers for your -Qt version (much different from Qt 5.5) do: - -``` - $ cd src/lisp - $ eql5 define-all-wrappers.lisp -``` - diff --git a/examples/0-Tutorial/1.lisp b/examples/0-Tutorial/1.lisp index 5ef4ad9..ced3c0d 100644 --- a/examples/0-Tutorial/1.lisp +++ b/examples/0-Tutorial/1.lisp @@ -1,6 +1,3 @@ -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - ;;; Ported Qt Widgets Tutorial - Creating a Window (in-package :eql-user) diff --git a/examples/0-Tutorial/2.lisp b/examples/0-Tutorial/2.lisp index e66bdc4..d9f07be 100644 --- a/examples/0-Tutorial/2.lisp +++ b/examples/0-Tutorial/2.lisp @@ -1,6 +1,3 @@ -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - ;;; Ported Qt Widgets Tutorial - Child Widgets (in-package :eql-user) diff --git a/examples/0-Tutorial/3.lisp b/examples/0-Tutorial/3.lisp index 7195c56..06eadf9 100644 --- a/examples/0-Tutorial/3.lisp +++ b/examples/0-Tutorial/3.lisp @@ -1,6 +1,3 @@ -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - ;;; Ported Qt Widgets Tutorial - Using Layouts (in-package :eql-user) diff --git a/examples/0-Tutorial/4.lisp b/examples/0-Tutorial/4.lisp index 3165f74..201fd33 100644 --- a/examples/0-Tutorial/4.lisp +++ b/examples/0-Tutorial/4.lisp @@ -1,6 +1,3 @@ -#-qt-wrapper-functions -(load (in-home "src/lisp/all-wrappers")) - ;;; Ported Qt Widgets Tutorial - Nested Layouts (in-package :eql-user) diff --git a/examples/2-clock.lisp b/examples/2-clock.lisp index 781aa49..33ed482 100644 --- a/examples/2-clock.lisp +++ b/examples/2-clock.lisp @@ -1,8 +1,5 @@ ;;; This is (kind of) a port of the Qt Script Example "Clock" -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - (defpackage :clock (:use :common-lisp :eql) (:export diff --git a/examples/3-main-window.lisp b/examples/3-main-window.lisp index ec35222..74581fc 100644 --- a/examples/3-main-window.lisp +++ b/examples/3-main-window.lisp @@ -1,6 +1,3 @@ -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - (defpackage :main-window (:use :common-lisp :eql) (:export diff --git a/examples/4-wiggly-widget.lisp b/examples/4-wiggly-widget.lisp index 8a58565..287df79 100644 --- a/examples/4-wiggly-widget.lisp +++ b/examples/4-wiggly-widget.lisp @@ -1,8 +1,5 @@ ;;; This is a port of the Qt Example "Wiggly Widget" -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - (defpackage :wiggly-widget (:nicknames :wiggly) (:use :common-lisp :eql) diff --git a/examples/5-colliding-mice.lisp b/examples/5-colliding-mice.lisp index 29c74e9..6db0c12 100644 --- a/examples/5-colliding-mice.lisp +++ b/examples/5-colliding-mice.lisp @@ -7,9 +7,6 @@ ;;; The good news: if a seg.fault happens (in C++), just choose the restart option "Abort" (below "Continue"), ;;; and the application will continue to run. -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - (defpackage :colliding-mice (:nicknames :mice) (:use :common-lisp :eql) diff --git a/examples/6-download.lisp b/examples/6-download.lisp index ca2c269..6a7ad63 100644 --- a/examples/6-download.lisp +++ b/examples/6-download.lisp @@ -1,6 +1,3 @@ -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - (unless (eql:qrequire :network) (error "EQL module :network could not be found/loaded") (eql:qq)) diff --git a/examples/7-Sokoban/eql-sokoban.lisp b/examples/7-Sokoban/eql-sokoban.lisp index 7419c95..95237d1 100644 --- a/examples/7-Sokoban/eql-sokoban.lisp +++ b/examples/7-Sokoban/eql-sokoban.lisp @@ -11,16 +11,13 @@ ;;; ;;; (because of multiple inheritance from both QObject and QGraphicsItem) ;;; -;;; If you use the wrapper functions instead (see "src/lisp/all-wrappers"), -;;; this cast is done automatically: +;;; If you use the wrapper functions instead, this cast is done +;;; automatically: ;;; ;;; (|setPos| graphics-text-item '(0 0))) ;;; ;;; ------------------------------------------------------------------------ -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - (load (eql:in-home "examples/7-Sokoban/3rd-party/sokoban")) (load (eql:in-home "examples/7-Sokoban/3rd-party/levels")) diff --git a/examples/8-OpenGL/main-window.lisp b/examples/8-OpenGL/main-window.lisp index 0076309..2c22bc8 100644 --- a/examples/8-OpenGL/main-window.lisp +++ b/examples/8-OpenGL/main-window.lisp @@ -1,8 +1,5 @@ ;;; This is a port of the Qt OpenGL Example "Grabber" -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - (require :gl-widget (eql:in-home "examples/8-OpenGL/gl-widget")) (defpackage :main-window diff --git a/examples/9-simple-lisp-editor/local-server.lisp b/examples/9-simple-lisp-editor/local-server.lisp index c4701bc..642adce 100644 --- a/examples/9-simple-lisp-editor/local-server.lisp +++ b/examples/9-simple-lisp-editor/local-server.lisp @@ -1,8 +1,5 @@ ;;; copyright (c) Polos Ruetz -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - (unless (eql:qrequire :network) (error "[EQL] module :network required") (eql:qq)) diff --git a/examples/M-modules/multimedia/camera/camera.lisp b/examples/M-modules/multimedia/camera/camera.lisp index 4cc9c45..576d17e 100644 --- a/examples/M-modules/multimedia/camera/camera.lisp +++ b/examples/M-modules/multimedia/camera/camera.lisp @@ -1,8 +1,5 @@ ;;; port of example "camera" (QtMultimediaWidgets) -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - (qrequire :multimedia) (require :ui (in-home "examples/M-modules/multimedia/camera/ui/ui-camera")) diff --git a/examples/M-modules/multimedia/video-graphics-item/video-graphics-item.lisp b/examples/M-modules/multimedia/video-graphics-item/video-graphics-item.lisp index d2bf251..2e0ec69 100644 --- a/examples/M-modules/multimedia/video-graphics-item/video-graphics-item.lisp +++ b/examples/M-modules/multimedia/video-graphics-item/video-graphics-item.lisp @@ -1,8 +1,5 @@ ;; port of Qt example "videographicsitem" (QtMultimediaWidgets) -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - (qrequire :multimedia) (require :ui (in-home "examples/M-modules/multimedia/video-graphics-item/ui/ui-video-graphics-item")) diff --git a/examples/M-modules/multimedia/video-widget/video-widget.lisp b/examples/M-modules/multimedia/video-widget/video-widget.lisp index 9f423e8..cfb3363 100644 --- a/examples/M-modules/multimedia/video-widget/video-widget.lisp +++ b/examples/M-modules/multimedia/video-widget/video-widget.lisp @@ -1,8 +1,5 @@ ;; port of Qt example "videowidget" (QtMultimediaWidgets) -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - (qrequire :multimedia) (require :ui (in-home "examples/M-modules/multimedia/video-widget/ui/ui-video-widget")) diff --git a/examples/M-modules/quick/Tic-Tac-Toe/tic-tac-toe.lisp b/examples/M-modules/quick/Tic-Tac-Toe/tic-tac-toe.lisp index ec5589e..fa243a3 100644 --- a/examples/M-modules/quick/Tic-Tac-Toe/tic-tac-toe.lisp +++ b/examples/M-modules/quick/Tic-Tac-Toe/tic-tac-toe.lisp @@ -5,9 +5,6 @@ ;;; The JS game logic has been ported to Lisp. ;;; -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - (qrequire :quick) (require :qml-lisp "qml-lisp") diff --git a/examples/M-modules/quick/item-model/abstract-model.lisp b/examples/M-modules/quick/item-model/abstract-model.lisp index 8defdc6..681709a 100644 --- a/examples/M-modules/quick/item-model/abstract-model.lisp +++ b/examples/M-modules/quick/item-model/abstract-model.lisp @@ -1,8 +1,5 @@ ;;; abstract item model (please see README.txt) -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - (qrequire :quick) (require :qml-lisp "qml-lisp") diff --git a/examples/M-modules/quick/item-model/list-model.lisp b/examples/M-modules/quick/item-model/list-model.lisp index 6b5737e..6186893 100644 --- a/examples/M-modules/quick/item-model/list-model.lisp +++ b/examples/M-modules/quick/item-model/list-model.lisp @@ -1,8 +1,5 @@ ;;; string-list model -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - (qrequire :quick) (require :qml-lisp "qml-lisp") diff --git a/examples/M-modules/quick/painted-item/painted-item.lisp b/examples/M-modules/quick/painted-item/painted-item.lisp index fe066c4..c4104f4 100644 --- a/examples/M-modules/quick/painted-item/painted-item.lisp +++ b/examples/M-modules/quick/painted-item/painted-item.lisp @@ -5,9 +5,6 @@ ;;; See also "lib/qml_lisp.*" for PaintedItem. ;;; -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - (qrequire :quick) (require :qml-lisp "qml-lisp") diff --git a/examples/M-modules/quick/palindrome-1/run.lisp b/examples/M-modules/quick/palindrome-1/run.lisp index f8a3c08..3f65e38 100644 --- a/examples/M-modules/quick/palindrome-1/run.lisp +++ b/examples/M-modules/quick/palindrome-1/run.lisp @@ -1,8 +1,5 @@ ;;; QQuickView running QML -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - (qrequire :quick) (require :properties "properties") diff --git a/examples/M-modules/quick/palindrome-2/palindrome.lisp b/examples/M-modules/quick/palindrome-2/palindrome.lisp index 4662679..03e6d01 100644 --- a/examples/M-modules/quick/palindrome-2/palindrome.lisp +++ b/examples/M-modules/quick/palindrome-2/palindrome.lisp @@ -1,8 +1,5 @@ ;;; palindrome -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - (qrequire :quick) (require :qml-lisp "qml-lisp") diff --git a/examples/M-modules/quick/qml-lisp/example.lisp b/examples/M-modules/quick/qml-lisp/example.lisp index c9b2f25..ba33924 100644 --- a/examples/M-modules/quick/qml-lisp/example.lisp +++ b/examples/M-modules/quick/qml-lisp/example.lisp @@ -1,8 +1,5 @@ ;;; QQuickView loading Lisp enabled QML -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - (qrequire :quick) (require :qml-lisp "qml-lisp") diff --git a/examples/M-modules/quick/quickwidget/quickwidget.lisp b/examples/M-modules/quick/quickwidget/quickwidget.lisp index fcf8415..26d169e 100644 --- a/examples/M-modules/quick/quickwidget/quickwidget.lisp +++ b/examples/M-modules/quick/quickwidget/quickwidget.lisp @@ -2,9 +2,6 @@ ;;; ;;; (for a native QML container, use QQuickView) -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - (qrequire :quick) (defun example-url (name) diff --git a/examples/M-modules/quick/sokoban/sokoban.lisp b/examples/M-modules/quick/sokoban/sokoban.lisp index 40b01b8..8f55111 100644 --- a/examples/M-modules/quick/sokoban/sokoban.lisp +++ b/examples/M-modules/quick/sokoban/sokoban.lisp @@ -4,9 +4,6 @@ ;;; Use CHANGE-LEVEL to directly change the level index. ;;; -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - (qrequire :quick) (require :sokoban "3rd-party/sokoban") diff --git a/examples/M-modules/quick/table-view/table-view.lisp b/examples/M-modules/quick/table-view/table-view.lisp index 0c075de..6211596 100644 --- a/examples/M-modules/quick/table-view/table-view.lisp +++ b/examples/M-modules/quick/table-view/table-view.lisp @@ -1,9 +1,6 @@ ;;; this is (kind of) a simplified port of the "tableview" C++/QML example ;;; (see also README.txt) -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - (qrequire :quick) (require :qml-lisp "qml-lisp") diff --git a/examples/M-modules/sql/sqlite.lisp b/examples/M-modules/sql/sqlite.lisp index a56a71e..f88c41b 100644 --- a/examples/M-modules/sql/sqlite.lisp +++ b/examples/M-modules/sql/sqlite.lisp @@ -1,6 +1,3 @@ -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - (in-package :eql-user) (setf *break-on-errors* t) diff --git a/examples/M-modules/web-kit-engine/web-kit-engine.lisp b/examples/M-modules/web-kit-engine/web-kit-engine.lisp index ff6cc42..db1c5ad 100644 --- a/examples/M-modules/web-kit-engine/web-kit-engine.lisp +++ b/examples/M-modules/web-kit-engine/web-kit-engine.lisp @@ -2,9 +2,6 @@ ;;; ;;; "Just For Fun" -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - (qrequire :webkit) (qrequire :webengine) diff --git a/examples/M-modules/webengine/minimal.lisp b/examples/M-modules/webengine/minimal.lisp index d79dde8..fdc767c 100644 --- a/examples/M-modules/webengine/minimal.lisp +++ b/examples/M-modules/webengine/minimal.lisp @@ -1,8 +1,5 @@ ;;; simple WebEngine example -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - (qrequire :webengine) (defvar *view* (qnew "QWebEngineView")) diff --git a/examples/M-modules/webkit/Examples-Browser/examples-browser.lisp b/examples/M-modules/webkit/Examples-Browser/examples-browser.lisp index e9969c6..e73f548 100644 --- a/examples/M-modules/webkit/Examples-Browser/examples-browser.lisp +++ b/examples/M-modules/webkit/Examples-Browser/examples-browser.lisp @@ -9,9 +9,6 @@ ;;; ;;; Once downloaded, the application files are cached locally (to be run offline). -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - (qrequire :webkit) (qrequire :network) diff --git a/examples/M-modules/webkit/dom.lisp b/examples/M-modules/webkit/dom.lisp index ba10e0e..9b65663 100644 --- a/examples/M-modules/webkit/dom.lisp +++ b/examples/M-modules/webkit/dom.lisp @@ -1,8 +1,5 @@ ;;; This is a port of Qt example "webkit/domtraversal/" -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - (qrequire :webkit) (in-package :eql-user) diff --git a/examples/M-modules/webkit/plugin-widget.lisp b/examples/M-modules/webkit/plugin-widget.lisp index c66f7ae..9317f80 100644 --- a/examples/M-modules/webkit/plugin-widget.lisp +++ b/examples/M-modules/webkit/plugin-widget.lisp @@ -7,9 +7,6 @@ ;;; Note: Adding QNetworkRequest to the plugin widget would allow to get ;;; any data from the web, but this is not shown here. -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - (qrequire :webkit) (in-package :eql-user) diff --git a/examples/M-modules/webkit/strip-html.lisp b/examples/M-modules/webkit/strip-html.lisp index 16eef45..6082723 100644 --- a/examples/M-modules/webkit/strip-html.lisp +++ b/examples/M-modules/webkit/strip-html.lisp @@ -32,9 +32,6 @@ ;;; (iterate-elements "A" (|setOuterXml| element text)) ; unlink ;;; -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - #+win32 (si:trap-fpe 'floating-point-underflow nil) ; for QWebInspector (qrequire :webkit) diff --git a/examples/M-modules/webkit/webkit-bridge.lisp b/examples/M-modules/webkit/webkit-bridge.lisp index b888ab6..091a709 100644 --- a/examples/M-modules/webkit/webkit-bridge.lisp +++ b/examples/M-modules/webkit/webkit-bridge.lisp @@ -2,9 +2,6 @@ ;;; ;;; depends on small plugin, see "lib/" -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - #+win32 (si:trap-fpe 'floating-point-underflow nil) ; for QWebInspector (qrequire :webkit) diff --git a/examples/X-extras/CLOS-encapsulation.lisp b/examples/X-extras/CLOS-encapsulation.lisp index d505637..0bdf332 100644 --- a/examples/X-extras/CLOS-encapsulation.lisp +++ b/examples/X-extras/CLOS-encapsulation.lisp @@ -1,6 +1,3 @@ -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - (in-package :eql-user) ;; define class or struct diff --git a/examples/X-extras/calculator.lisp b/examples/X-extras/calculator.lisp index 5305a96..e5eeb50 100644 --- a/examples/X-extras/calculator.lisp +++ b/examples/X-extras/calculator.lisp @@ -3,9 +3,6 @@ ;;; - displays exact value + float value ;;; - runs visual automations -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - (defpackage :calculator (:nicknames :clc) (:use :common-lisp :eql) diff --git a/examples/X-extras/lcd.lisp b/examples/X-extras/lcd.lisp index e571c28..56f739e 100644 --- a/examples/X-extras/lcd.lisp +++ b/examples/X-extras/lcd.lisp @@ -1,8 +1,5 @@ ;;; LCD pixel color test (inspired by a "comp.lang.lisp" thread) -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - (in-package :eql-user) (defun lcd-test () diff --git a/examples/X-extras/make-qimage.lisp b/examples/X-extras/make-qimage.lisp index 7c28316..959c1f7 100644 --- a/examples/X-extras/make-qimage.lisp +++ b/examples/X-extras/make-qimage.lisp @@ -2,9 +2,6 @@ ;;; Contributed by Mark Cox, please see LICENSE-MAKE-QIMAGE.txt ;;; -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - (defpackage "MAKE-QIMAGE-EXAMPLE" (:use "COMMON-LISP" "EQL") diff --git a/examples/X-extras/move-blocks/move-blocks.lisp b/examples/X-extras/move-blocks/move-blocks.lisp index 35c74cf..b8f3185 100644 --- a/examples/X-extras/move-blocks/move-blocks.lisp +++ b/examples/X-extras/move-blocks/move-blocks.lisp @@ -5,9 +5,6 @@ ;;; ;;; N.B: If you load this file in Slime, you need to use QLOAD instead of LOAD! -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - (in-package :eql-user) (setf *break-on-errors* t) diff --git a/examples/X-extras/palindrome/palindrome.lisp b/examples/X-extras/palindrome/palindrome.lisp index 6c89ea0..4fbe0b6 100644 --- a/examples/X-extras/palindrome/palindrome.lisp +++ b/examples/X-extras/palindrome/palindrome.lisp @@ -2,9 +2,6 @@ ;;; ;;; N.B: If you load this file in Slime, you need to use QLOAD instead of LOAD! -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - (in-package :eql-user) (require :definitions "definitions") diff --git a/examples/X-extras/primes-thread.lisp b/examples/X-extras/primes-thread.lisp index afbe849..83e8ab2 100644 --- a/examples/X-extras/primes-thread.lisp +++ b/examples/X-extras/primes-thread.lisp @@ -16,9 +16,6 @@ ;;; (resulting in better performance). ;;; -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - (defvar *tree-widget* (qnew "QTreeWidget" "alternatingRowColors" t "size" '(500 300))) diff --git a/examples/X-extras/qimage/qimage.lisp b/examples/X-extras/qimage/qimage.lisp index 13f8d05..32e2901 100644 --- a/examples/X-extras/qimage/qimage.lisp +++ b/examples/X-extras/qimage/qimage.lisp @@ -8,9 +8,6 @@ ;;; ;;; optionally pass image file as command line argument -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - (defpackage :image-manipulation (:nicknames :img) (:use :common-lisp :eql) diff --git a/examples/X-extras/screenshot/screenshot.lisp b/examples/X-extras/screenshot/screenshot.lisp index 7acdbe8..57fdf39 100644 --- a/examples/X-extras/screenshot/screenshot.lisp +++ b/examples/X-extras/screenshot/screenshot.lisp @@ -1,8 +1,5 @@ ;;; Screenshot with countdown -#-qt-wrapper-functions -(load (in-home "src/lisp/all-wrappers")) - (in-package :eql-user) (defvar *pixmap* (qnew "QPixmap(QString)" (in-home "examples/X-extras/screenshot/camera.png"))) diff --git a/examples/X-extras/storage-info.lisp b/examples/X-extras/storage-info.lisp index 56b9031..221175c 100644 --- a/examples/X-extras/storage-info.lisp +++ b/examples/X-extras/storage-info.lisp @@ -2,9 +2,6 @@ ;;; ;;; N.B: If you load this file in Slime, you need to use QLOAD instead of LOAD! -#-qt-wrapper-functions ; see README-OPTIONAL.txt -(load (in-home "src/lisp/all-wrappers")) - (in-package :eql-user) (defun print-mounted-volumes () diff --git a/src/eql.cpp b/src/eql.cpp index cca239f..9ea4a31 100644 --- a/src/eql.cpp +++ b/src/eql.cpp @@ -7,7 +7,7 @@ #include #include -const char EQL::version[] = "17.7.1"; // July 2017 +const char EQL::version[] = "17.9.1"; // September 2017 extern "C" void ini_EQL(cl_object); diff --git a/src/eql5.pro b/src/eql5.pro index 5f0442b..6948fcb 100644 --- a/src/eql5.pro +++ b/src/eql5.pro @@ -1,4 +1,5 @@ -# comment out all modules you don't need: +# ----------------------------------------------------- +# below you can comment out all modules you don't need: SUBDIRS = help \ multimedia \ @@ -8,6 +9,7 @@ SUBDIRS = help \ svg \ # webengine \ webkit +# ----------------------------------------------------- TEMPLATE = subdirs SUBDIRS += lib exe diff --git a/src/gen/webengine/_q_methods.h b/src/gen/webengine/_q_methods.h index d64b129..8381545 100644 --- a/src/gen/webengine/_q_methods.h +++ b/src/gen/webengine/_q_methods.h @@ -34,7 +34,7 @@ public: Q_INVOKABLE void MsetSavePageFormat(QWebEngineDownloadItem* o, QWebEngineDownloadItem::SavePageFormat x1) { o->setSavePageFormat(x1); } Q_INVOKABLE int Mstate(QWebEngineDownloadItem* o) const { return o->state(); } Q_INVOKABLE qlonglong MtotalBytes(QWebEngineDownloadItem* o) const { return o->totalBytes(); } - Q_INVOKABLE int Mtype(QWebEngineDownloadItem* o) const { return o->type(); } + //Q_INVOKABLE int Mtype(QWebEngineDownloadItem* o) const { return o->type(); } Q_INVOKABLE QUrl Murl(QWebEngineDownloadItem* o) const { return o->url(); } }; @@ -54,18 +54,18 @@ public: Q_INVOKABLE QUrl MiconUrl(QWebEnginePage* o) const { return o->iconUrl(); } Q_INVOKABLE bool MisAudioMuted(QWebEnginePage* o) const { return o->isAudioMuted(); } Q_INVOKABLE void Mload(QWebEnginePage* o, const QUrl& x1) { o->load(x1); } - Q_INVOKABLE void Mprint(QWebEnginePage* o, QPrinter* x1, FunctorOrLambda x2) { o->print(x1, x2); } + //Q_INVOKABLE void Mprint(QWebEnginePage* o, QPrinter* x1, FunctorOrLambda x2) { o->print(x1, x2); } Q_INVOKABLE void MprintToPdf(QWebEnginePage* o, const QString& x1, const QPageLayout& x2 = QPageLayout_DEFAULT) { o->printToPdf(x1, x2); } Q_INVOKABLE void MprintToPdf(QWebEnginePage* o, FunctorOrLambda x1, const QPageLayout& x2 = QPageLayout_DEFAULT) { o->printToPdf(x1, x2); } Q_INVOKABLE QWebEngineProfile* Mprofile(QWebEnginePage* o) const { return o->profile(); } Q_INVOKABLE bool MrecentlyAudible(QWebEnginePage* o) const { return o->recentlyAudible(); } - Q_INVOKABLE void MreplaceMisspelledWord(QWebEnginePage* o, const QString& x1) { o->replaceMisspelledWord(x1); } + //Q_INVOKABLE void MreplaceMisspelledWord(QWebEnginePage* o, const QString& x1) { o->replaceMisspelledWord(x1); } Q_INVOKABLE QUrl MrequestedUrl(QWebEnginePage* o) const { return o->requestedUrl(); } Q_INVOKABLE void MrunJavaScript(QWebEnginePage* o, const QString& x1, quint32 x2, FunctorOrLambda x3) { o->runJavaScript(x1, x2, x3); } Q_INVOKABLE void MrunJavaScript(QWebEnginePage* o, const QString& x1, quint32 x2) { o->runJavaScript(x1, x2); } Q_INVOKABLE void MrunJavaScript(QWebEnginePage* o, const QString& x1, FunctorOrLambda x2) { o->runJavaScript(x1, x2); } Q_INVOKABLE void MrunJavaScript(QWebEnginePage* o, const QString& x1) { o->runJavaScript(x1); } - Q_INVOKABLE void Msave(QWebEnginePage* o, const QString& x1, QWebEngineDownloadItem::SavePageFormat x2 = QWebEngineDownloadItem::MimeHtmlSaveFormat) const { o->save(x1, x2); } + //Q_INVOKABLE void Msave(QWebEnginePage* o, const QString& x1, QWebEngineDownloadItem::SavePageFormat x2 = QWebEngineDownloadItem::MimeHtmlSaveFormat) const { o->save(x1, x2); } Q_INVOKABLE QPointF MscrollPosition(QWebEnginePage* o) const { return o->scrollPosition(); } Q_INVOKABLE QString MselectedText(QWebEnginePage* o) const { return o->selectedText(); } Q_INVOKABLE void MsetAudioMuted(QWebEnginePage* o, bool x1) { o->setAudioMuted(x1); } @@ -102,7 +102,7 @@ public: Q_INVOKABLE int MhttpCacheType(QWebEngineProfile* o) const { return o->httpCacheType(); } Q_INVOKABLE QString MhttpUserAgent(QWebEngineProfile* o) const { return o->httpUserAgent(); } Q_INVOKABLE bool MisOffTheRecord(QWebEngineProfile* o) const { return o->isOffTheRecord(); } - Q_INVOKABLE bool MisSpellCheckEnabled(QWebEngineProfile* o) const { return o->isSpellCheckEnabled(); } + //Q_INVOKABLE bool MisSpellCheckEnabled(QWebEngineProfile* o) const { return o->isSpellCheckEnabled(); } Q_INVOKABLE int MpersistentCookiesPolicy(QWebEngineProfile* o) const { return o->persistentCookiesPolicy(); } Q_INVOKABLE QString MpersistentStoragePath(QWebEngineProfile* o) const { return o->persistentStoragePath(); } Q_INVOKABLE void MremoveUrlScheme(QWebEngineProfile* o, const QByteArray& x1) { o->removeUrlScheme(x1); } @@ -115,10 +115,10 @@ public: Q_INVOKABLE void MsetPersistentCookiesPolicy(QWebEngineProfile* o, QWebEngineProfile::PersistentCookiesPolicy x1) { o->setPersistentCookiesPolicy(x1); } Q_INVOKABLE void MsetPersistentStoragePath(QWebEngineProfile* o, const QString& x1) { o->setPersistentStoragePath(x1); } Q_INVOKABLE void MsetRequestInterceptor(QWebEngineProfile* o, QWebEngineUrlRequestInterceptor* x1) { o->setRequestInterceptor(x1); } - Q_INVOKABLE void MsetSpellCheckEnabled(QWebEngineProfile* o, bool x1) { o->setSpellCheckEnabled(x1); } - Q_INVOKABLE void MsetSpellCheckLanguages(QWebEngineProfile* o, const QStringList& x1) { o->setSpellCheckLanguages(x1); } + //Q_INVOKABLE void MsetSpellCheckEnabled(QWebEngineProfile* o, bool x1) { o->setSpellCheckEnabled(x1); } + //Q_INVOKABLE void MsetSpellCheckLanguages(QWebEngineProfile* o, const QStringList& x1) { o->setSpellCheckLanguages(x1); } Q_INVOKABLE QWebEngineSettings* Msettings(QWebEngineProfile* o) const { return o->settings(); } - Q_INVOKABLE QStringList MspellCheckLanguages(QWebEngineProfile* o) const { return o->spellCheckLanguages(); } + //Q_INVOKABLE QStringList MspellCheckLanguages(QWebEngineProfile* o) const { return o->spellCheckLanguages(); } Q_INVOKABLE QString MstorageName(QWebEngineProfile* o) const { return o->storageName(); } Q_INVOKABLE bool MvisitedLinksContainsUrl(QWebEngineProfile* o, const QUrl& x1) const { return o->visitedLinksContainsUrl(x1); } Q_INVOKABLE QWebEngineProfile* SdefaultProfile() { return QWebEngineProfile::defaultProfile(); } diff --git a/src/make-wrappers.lisp b/src/make-wrappers.lisp deleted file mode 100644 index 61a3e2b..0000000 --- a/src/make-wrappers.lisp +++ /dev/null @@ -1,28 +0,0 @@ -#-eql5 -(error "Please use the EQL5 executable to run this file") - -(require :cmp) - -(setf *break-on-signals* 'error) - -#+msvc -(setf c::*compile-in-constants* t) - -(defparameter *all-wrappers* (append (loop :for i :from 1 :to 12 :collect (format nil "all-wrappers-~D" i)) - (loop :for i :from 1 :to 2 :collect (format nil "all-wrappers-webengine-~D" i)))) - -(defparameter *lisp-files* (append '("x" "package" "ini" - "enums1" "enums2" "enums3" "enums4" "enums5" - "special-extensions") - *all-wrappers*)) - -(dolist (file *all-wrappers*) - (compile-file (format nil "lisp/~A.lisp" file) :system-p t)) - -(c:build-static-library "ini_eql5" - :lisp-files (mapcar (lambda (file) - (format nil "lisp/~A.~A" file #+msvc "obj" #-msvc "o")) - *lisp-files*) - :init-name "ini_EQL") - -(eql:qq) diff --git a/src/make.lisp b/src/make.lisp index 15be305..5090a3c 100644 --- a/src/make.lisp +++ b/src/make.lisp @@ -8,9 +8,9 @@ #+msvc (setf c::*compile-in-constants* t) -(defparameter *lisp-files* (list "x" "package" "ini" - "enums1" "enums2" "enums3" "enums4" "enums5" - "special-extensions")) +(defvar *lisp-files* (list "x" "package" "ini" + "enums1" "enums2" "enums3" "enums4" "enums5" + "special-extensions")) (dolist (f *lisp-files*) (let* ((file (format nil "lisp/~A" f)) @@ -19,10 +19,32 @@ (delete-file file.o)) (compile-file file :system-p t))) +;; wrapper functions + +(defvar *all-wrappers* (append (loop :for i :from 1 :to 12 :collect (format nil "all-wrappers-~D" i)) + (loop :for i :from 1 :to 2 :collect (format nil "all-wrappers-webengine-~D" i)))) + +(load "lisp/x") +(load "lisp/package") + +(defun eql::%invoke-method (&rest args)) +(defun eql::qproperty (&rest args)) +(defun eql::qset-property (&rest args)) + +(progn + (compile-file "lisp/ini") + (load "lisp/ini") + (compile-file "lisp/ini" :system-p t)) + +(dolist (file *all-wrappers*) + (compile-file (format nil "lisp/~A.lisp" file) :system-p t)) + +;; lib + (c:build-static-library "ini_eql5" :lisp-files (mapcar (lambda (file) (format nil "lisp/~A.~A" file #+msvc "obj" #-msvc "o")) - *lisp-files*) + (append *lisp-files* *all-wrappers*)) :init-name "ini_EQL") ;; for eql5.pro (doesn't create directories) diff --git a/src/rebuild b/src/rebuild index 00fef86..8ca8d03 100755 --- a/src/rebuild +++ b/src/rebuild @@ -5,11 +5,6 @@ rm lisp/*.o ecl -shell make.lisp && qmake eql5.pro && make && -sudo make install && -eql5 make-wrappers.lisp && -touch tmp/eql.o && -qmake eql_lib.pro && -make && sudo make install echo OK