Create account / Log in

Lua

Discussion area for the development team.

Moderators: uckelman, Tim M

Re: Lua

Postby Rhett » August 3rd, 2020, 7:25 am

The conclusion must be that Qt is too heavy for Lua.

As far as I know, Qt is downloaded in modules. If you configure the repository with

Code: Select all
 ./init-repository --module-subset=essential


you get the minimum number of modules to make a build. There is no way to select a subset of classes in each module to further reduce the build.

Here

https://doc.qt.io/qt-5/qtwidgets-module.html

is a list of classes in module QtWidgets. Many (most) of these classes we do not need.

One could of course say that since we have the source code we could manually delete classes. But this risks breaking the build and is a path I don't want to go down along. As a rule, we should chose the tools and focus on the development of the application, not have to focus on the development of the tools.

We need a basic set of widgets that does that job and is bindable to Lua. The Gui of VASSAL is simple. We need a menubar, toolbars, frames and a graphics library that can draw on the screen and scale and rotate images (JPG, PNG). That's it.

I will try to find options besides Qt, a set of light widgets. I hope you guys still express an interest in this project.
Rhett
 
Posts: 41
Joined: March 18th, 2014, 9:32 am

Re: Lua

Postby uckelman » August 3rd, 2020, 10:53 am

Thus spake Rhett:
>
> I will try to find options besides Qt, a set of _light_ widgets. I hope
> you guys still express an interest in this project.

It's been interesting to see what you've tried so far.

I'll have more comments after we've released 3.3.3 and I have time to
focus on V4 planning.

--
J.
User avatar
uckelman
Site Admin
 
Posts: 8847
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Lua

Postby Rhett » August 4th, 2020, 8:27 pm

Good news. I posted a questions at the Qt forum and got an answer.

https://forum.qt.io/topic/117687/remove ... ed-classes

Looks like Qt Lite will do the work.

I will get back to this soon and make new libs that may be a lot smaller. Then I can upload them and anyone can run the script.
Rhett
 
Posts: 41
Joined: March 18th, 2014, 9:32 am

Re: Lua

Postby Rhett » August 7th, 2020, 9:15 am

I have now made a new build with Qt Lite. This is not another product, just a method to make smaller builds.

Code: Select all
export LLVM_INSTALL_DIR=/usr/lib/llvm-6.0
../qt5/config.opt
make module-qtbase


The export is for clang (to make docs) and can be skipped.

config.opt is

Code: Select all
../qt5/configure \
-release \
-shared \
-opensource \
-confirm-license \
-optimize-size \
-ltcg \
-nomake examples \
-nomake tests \
-skip qtmultimedia \
-no-pch \
-no-feature-abstractbutton \
-no-feature-accessibility-atspi-bridge \
-no-feature-action \
-no-feature-alloca \
-no-feature-alloca_h \
-no-feature-alloca_malloc_h \
-no-feature-android-style-assets \
-no-feature-angle \
-no-feature-angle_d3d11_qdtd \
-no-feature-animation \
-no-feature-appstore-compliant \
-no-feature-avx2 \
-no-feature-big_codecs \
-no-feature-buttongroup \
-no-feature-c++11 \
-no-feature-c++14 \
-no-feature-c++1z \
-no-feature-c11 \
-no-feature-c99 \
-no-feature-calendarwidget \
-no-feature-checkbox \
-no-feature-clipboard \
-no-feature-clock-gettime \
-no-feature-colordialog \
-no-feature-colornames \
-no-feature-columnview \
-no-feature-combined-angle-lib \
-no-feature-combobox \
-no-feature-commandlineparser \
-no-feature-commandlinkbutton \
-no-feature-completer \
-no-feature-concurrent \
-no-feature-contextmenu \
-no-feature-cross_compile \
-no-feature-cssparser \
-no-feature-cursor \
-no-feature-cxx11_future \
-no-feature-datawidgetmapper \
-no-feature-datetimeedit \
-no-feature-datetimeparser \
-no-feature-dbus \
-no-feature-dbus-linked \
-no-feature-debug_and_release \
-no-feature-desktopservices \
-no-feature-dial \
-no-feature-dialog \
-no-feature-dialogbuttonbox \
-no-feature-direct2d \
-no-feature-direct2d1_1 \
-no-feature-direct3d11 \
-no-feature-direct3d11_1 \
-no-feature-direct3d9 \
-no-feature-directfb \
-no-feature-dirmodel \
-no-feature-dlopen \
-no-feature-dockwidget \
-no-feature-draganddrop \
-no-feature-drm_atomic \
-no-feature-dxgi \
-no-feature-dxgi1_2 \
-no-feature-dxguid \
-no-feature-effects \
-no-feature-egl \
-no-feature-egl_x11 \
-no-feature-eglfs \
-no-feature-eglfs_brcm \
-no-feature-eglfs_egldevice \
-no-feature-eglfs_gbm \
-no-feature-eglfs_mali \
-no-feature-eglfs_openwfd \
-no-feature-eglfs_rcar \
-no-feature-eglfs_viv \
-no-feature-eglfs_viv_wl \
-no-feature-eglfs_vsp2 \
-no-feature-eglfs_x11 \
-no-feature-errormessage \
-no-feature-etw \
-no-feature-evdev \
-no-feature-filedialog \
-no-feature-filesystemiterator \
-no-feature-filesystemmodel \
-no-feature-filesystemwatcher \
-no-feature-force_asserts \
-no-feature-formlayout \
-no-feature-framework \
-no-feature-fontcombobox \
-no-feature-fontconfig \
-no-feature-fontdialog \
-no-feature-fscompleter \
-no-feature-futimens \
-no-feature-futimes \
-no-feature-future \
-no-feature-gestures \
-no-feature-getauxval \
-no-feature-getentropy \
-no-feature-gif \
-no-feature-glib \
-no-feature-glibc \
-no-feature-gnu-libiconv \
-no-feature-graphicseffect \
-no-feature-graphicsview \
-no-feature-groupbox \
-no-feature-gtk3 \
-no-feature-harfbuzz \
-no-feature-ico \
-no-feature-iconv \
-no-feature-icu \
-no-feature-identityproxymodel \
-no-feature-im \
-no-feature-image_heuristic_mask \
-no-feature-image_text \
-no-feature-imageformat_bmp \
-no-feature-imageformat_ppm \
-no-feature-imageformat_xbm \
-no-feature-imageformat_xpm \
-no-feature-inotify \
-no-feature-inputdialog \
-no-feature-integrityfb \
-no-feature-integrityhid \
-no-feature-journald \
-no-feature-keysequenceedit \
-no-feature-kms \
-no-feature-lcdnumber \
-no-feature-libinput \
-no-feature-libinput-axis-api \
-no-feature-library \
-no-feature-libudev \
-no-feature-lineedit \
-no-feature-linkat \
-no-feature-linuxfb \
-no-feature-listview \
-no-feature-listwidget \
-no-feature-lttng \
-no-feature-mainwindow \
-no-feature-mdiarea \
-no-feature-messagebox \
-no-feature-mirclient \
-no-feature-movie \
-no-feature-mtdev \
-no-feature-multiprocess \
-no-feature-network \
-no-feature-opengl \
-no-feature-opengles2 \
-no-feature-opengles3 \
-no-feature-opengles31 \
-no-feature-opengles32 \
-no-feature-openvg \
-no-feature-paint_debug \
-no-feature-pdf \
-no-feature-picture \
-no-feature-pkg-config \
-no-feature-posix-libiconv \
-no-feature-posix_fallocate \
-no-feature-printer \
-no-feature-process \
-no-feature-processenvironment \
-no-feature-progressbar \
-no-feature-progressdialog \
-no-feature-qeventtransition \
-no-feature-qml-animation \
-no-feature-qml-debug \
-no-feature-qml-delegate-model \
-no-feature-qml-devtools \
-no-feature-qml-list-model \
-no-feature-qml-locale \
-no-feature-qml-network \
-no-feature-qml-preview \
-no-feature-qml-profiler \
-no-feature-qml-sequence-object \
-no-feature-qml-worker-script \
-no-feature-qml-xml-http-request \
-no-feature-quick-canvas \
-no-feature-quick-designer \
-no-feature-quick-flipable \
-no-feature-quick-gridview \
-no-feature-quick-listview \
-no-feature-quick-particles \
-no-feature-quick-path \
-no-feature-quick-pathview \
-no-feature-quick-positioners \
-no-feature-quick-repeater \
-no-feature-quick-shadereffect \
-no-feature-quick-sprite \
-no-feature-quick-tableview \
-no-feature-radiobutton \
-no-feature-reduce_exports \
-no-feature-reduce_relocations \
-no-feature-release_tools \
-no-feature-renameat2 \
-no-feature-resizehandler \
-no-feature-rpath \
-no-feature-rubberband \
-no-feature-scroller \
-no-feature-separate_debug_info \
-no-feature-sessionmanager \
-no-feature-settings \
-no-feature-sha3-fast \
-no-feature-sharedmemory \
-no-feature-shortcut \
-no-feature-simulator_and_device \
-no-feature-sizegrip \
-no-feature-slog2 \
-no-feature-sortfilterproxymodel \
-no-feature-spinbox \
-no-feature-splashscreen \
-no-feature-splitter \
-no-feature-sql \
-no-feature-sql-sqlite \
-no-feature-stack-protector-strong \
-no-feature-standarditemmodel \
-no-feature-statemachine \
-no-feature-statusbar \
-no-feature-statustip \
-no-feature-statx \
-no-feature-style-android \
-no-feature-style-fusion \
-no-feature-style-mac \
-no-feature-style-stylesheet \
-no-feature-style-windows \
-no-feature-style-windowsvista \
-no-feature-syntaxhighlighter \
-no-feature-syslog \
-no-feature-system-doubleconversion \
-no-feature-system-freetype \
-no-feature-system-harfbuzz \
-no-feature-system-pcre2 \
-no-feature-system-png \
-no-feature-system-zlib \
-no-feature-systemsemaphore \
-no-feature-systemtrayicon \
-no-feature-tabletevent \
-no-feature-tableview \
-no-feature-tablewidget \
-no-feature-testlib \
-no-feature-textbrowser \
-no-feature-textedit \
-no-feature-texthtmlparser \
-no-feature-textodfwriter \
-no-feature-texture_format_astc_experimental \
-no-feature-timezone \
-no-feature-toolbox \
-no-feature-tooltip \
-no-feature-topleveldomain \
-no-feature-translation \
-no-feature-treeview \
-no-feature-treewidget \
-no-feature-tslib \
-no-feature-tuiotouch \
-no-feature-undocommand \
-no-feature-undogroup \
-no-feature-undostack \
-no-feature-undoview \
-no-feature-validator \
-no-feature-vnc \
-no-feature-vsp2 \
-no-feature-vulkan \
-no-feature-whatsthis \
-no-feature-wheelevent \
-no-feature-wizard \
-no-feature-xcb-xinput \
-no-feature-xlib \
-no-feature-xml \
-no-feature-xmlstreamwriter \
-xcb \
-feature-xlib \
-feature-xcb-xlib \
-feature-jpeg


This file is the heart of Qt Lite. It defines what you skip but also (by what is not there) what is included. The file will likely be tweaked later to fit just what we need.

It is interesting to look at config.summary. It tells what is and is not there.

Code: Select all
Build type: linux-g++ (x86_64, CPU features: mmx sse sse2)
Compiler: gcc 7.5.0
Configuration: use_gold_linker sse2 aesni sse3 ssse3 sse4_1 sse4_2 avx compile_examples enable_new_dtags f16c largefile ltcg optimize_size rdrnd shani x86SimdAlways shared release no-pkg-config stl
Build options:
  Mode ................................... release
  Optimize release build for size ........ yes
  Building shared libraries .............. yes
  Using C standard ....................... C89
  Using C++ standard ..................... <none>
  Using ccache ........................... no
  Using gold linker ...................... yes
  Using new DTAGS ........................ yes
  Using precompiled headers .............. no
  Using LTCG ............................. yes
  Target compiler supports:
    SSE .................................. SSE2 SSE3 SSSE3 SSE4.1 SSE4.2
    AVX .................................. AVX
    AVX512 ............................... <none>
    Other x86 ............................ AES F16C RDRAND SHA
    Intrinsics without -mXXX option ...... yes
  Build parts ............................ libs tools
Qt modules and options:
  Qt Concurrent .......................... no
  Qt D-Bus ............................... no
  Qt D-Bus directly linked to libdbus .... no
  Qt Gui ................................. yes
  Qt Network ............................. no
  Qt Sql ................................. no
  Qt Testlib ............................. no
  Qt Widgets ............................. yes
  Qt Xml ................................. no
Support enabled for:
  Using pkg-config ....................... no
  udev ................................... no
  Using system zlib ...................... no
Qt Core:
  DoubleConversion ....................... yes
    Using system DoubleConversion ........ no
  GLib ................................... no
  iconv .................................. no
  ICU .................................... no
  Tracing backend ........................ <none>
  Logging backends:
    journald ............................. no
    syslog ............................... no
    slog2 ................................ no
  Using system PCRE2 ..................... no
Qt Network:
  getifaddrs() ........................... yes
  IPv6 ifname ............................ yes
  libproxy ............................... no
  Linux AF_NETLINK ....................... yes
  OpenSSL ................................ yes
    Qt directly linked to OpenSSL ........ no
  OpenSSL 1.1 ............................ yes
  DTLS ................................... yes
  SCTP ................................... no
  Use system proxies ..................... yes
Qt Gui:
  Accessibility .......................... yes
  FreeType ............................... yes
    Using system FreeType ................ no
  HarfBuzz ............................... no
    Using system HarfBuzz ................ no
  Fontconfig ............................. no
  Image formats:
    GIF .................................. no
    ICO .................................. no
    JPEG ................................. yes
      Using system libjpeg ............... no
    PNG .................................. yes
      Using system libpng ................ no
  EGL .................................... no
  OpenVG ................................. no
  OpenGL:
    Desktop OpenGL ....................... no
    OpenGL ES 2.0 ........................ no
    OpenGL ES 3.0 ........................ no
    OpenGL ES 3.1 ........................ no
    OpenGL ES 3.2 ........................ no
  Vulkan ................................. no
  Session Management ..................... no
Features used by QPA backends:
  evdev .................................. no
  libinput ............................... no
  INTEGRITY HID .......................... no
  mtdev .................................. no
  tslib .................................. no
  xkbcommon .............................. yes
  X11 specific:
    XLib ................................. yes
    XCB Xlib ............................. yes
    EGL on X11 ........................... no
QPA backends:
  DirectFB ............................... no
  EGLFS .................................. no
  LinuxFB ................................ no
  VNC .................................... no
  Mir client ............................. no
  XCB:
    Using system-provided XCB libraries .. no
    XCB XKB .............................. no
    XCB XInput ........................... no
    Native painting (experimental) ....... no
    GL integrations:
      GLX Plugin ......................... no
      EGL-X11 Plugin ..................... no
Qt Sql:
  SQL item models ........................ yes
Qt Widgets:
  GTK+ ................................... no
  Styles ................................. <none>
Qt PrintSupport:
  CUPS ................................... no
Qt Sql Drivers:
  DB2 (IBM) .............................. no
  InterBase .............................. no
  MySql .................................. no
  OCI (Oracle) ........................... no
  ODBC ................................... no
  PostgreSQL ............................. no
  SQLite2 ................................ no
  SQLite ................................. no
    Using system provided SQLite ......... no
  TDS (Sybase) ........................... no
Qt Testlib:
  Tester for item models ................. yes
Qt QML:
  QML network support .................... no
  QML debugging and profiling support .... no
  QML sequence object .................... no
  QML list model ......................... no
  QML XML http request ................... no
  QML Locale ............................. no
  QML delegate model ..................... no
Qt Quick:
  Direct3D 12 ............................ no
  AnimatedImage item ..................... no
  Canvas item ............................ no
  Support for Qt Quick Designer .......... no
  Flipable item .......................... no
  GridView item .......................... no
  ListView item .......................... no
  TableView item ......................... no
  Path support ........................... no
  PathView item .......................... no
  Positioner items ....................... no
  Repeater item .......................... no
  ShaderEffect item ...................... no
  Sprite item ............................ no
Qt Tools:
  QDoc ................................... yes

Note: Also available for Linux: linux-clang linux-icc

Note: Disabling X11 Accessibility Bridge: D-Bus or AT-SPI is missing.


The size of the new libs are astounding.

Code: Select all
-rwxrwx--- 1 root vboxsf 4547600 Aug  7 00:56 libQt5Core.so.5.12.9
-rwxrwx--- 1 root vboxsf 3947432 Aug  7 01:02 libQt5Gui.so.5.12.9
-rwxrwx--- 1 root vboxsf 1946456 Aug  7 01:06 libQt5Widgets.so.5.12.9
-rwxrwx--- 1 root vboxsf 1658440 Aug  7 01:08 libQt5XcbQpa.so.5.12.9


libQt5Core.so.5.12.9 --- 4,5 MB
libQt5Gui.so.5.12.9 --- 3,9 MB
libQt5Widgets.so.5.12.9 --- 1,9 MB
libQt5XcbQpa.so.5.12.9 --- 1,7 MB

I think I managed to reduce their size :wink:

This can easily go in a distribution.



Now for the binding. I ran lqt cmake on the new build-qt5 but it produced errors. I will come back to this later.
Rhett
 
Posts: 41
Joined: March 18th, 2014, 9:32 am

Re: Lua

Postby Rhett » August 18th, 2020, 11:17 am

I have now worked more with Qt Lite and have been able to make a build based on this configuration:

Code: Select all
../qt5/configure \
-release \
-shared \
-opensource \
-confirm-license \
-optimize-size \
-ltcg \
-make libs \
-nomake examples \
-nomake tests \
-nomake tools \
-skip qtandroidextras \
-skip qtdeclarative \
-skip qtmultimedia \
-skip qtnetworkauth \
-skip qttools \
-skip qtwinextras \
-no-pch \
-no-feature-accessibility-atspi-bridge \
-no-feature-alloca \
-no-feature-alloca_h \
-no-feature-alloca_malloc_h \
-no-feature-android-style-assets \
-no-feature-angle \
-no-feature-angle_d3d11_qdtd \
-no-feature-appstore-compliant \
-no-feature-avx2 \
-no-feature-big_codecs \
-no-feature-buttongroup \
-no-feature-c++11 \
-no-feature-c++14 \
-no-feature-c++1z \
-no-feature-c11 \
-no-feature-c99 \
-no-feature-calendarwidget \
-no-feature-checkbox \
-no-feature-clock-gettime \
-no-feature-colordialog \
-no-feature-colornames \
-no-feature-columnview \
-no-feature-combined-angle-lib \
-no-feature-combobox \
-no-feature-commandlineparser \
-no-feature-commandlinkbutton \
-no-feature-completer \
-no-feature-contextmenu \
-no-feature-cross_compile \
-no-feature-cssparser \
-no-feature-cxx11_future \
-no-feature-datawidgetmapper \
-no-feature-datetimeedit \
-no-feature-datetimeparser \
-no-feature-dbus \
-no-feature-dbus-linked \
-no-feature-debug_and_release \
-no-feature-desktopservices \
-no-feature-dial \
-no-feature-dialog \
-no-feature-dialogbuttonbox \
-no-feature-direct2d \
-no-feature-direct2d1_1 \
-no-feature-direct3d11 \
-no-feature-direct3d11_1 \
-no-feature-direct3d9 \
-no-feature-directfb \
-no-feature-dirmodel \
-no-feature-drm_atomic \
-no-feature-dxgi \
-no-feature-dxgi1_2 \
-no-feature-dxguid \
-no-feature-effects \
-no-feature-egl \
-no-feature-egl_x11 \
-no-feature-eglfs \
-no-feature-eglfs_brcm \
-no-feature-eglfs_egldevice \
-no-feature-eglfs_gbm \
-no-feature-eglfs_mali \
-no-feature-eglfs_openwfd \
-no-feature-eglfs_rcar \
-no-feature-eglfs_viv \
-no-feature-eglfs_viv_wl \
-no-feature-eglfs_vsp2 \
-no-feature-eglfs_x11 \
-no-feature-errormessage \
-no-feature-etw \
-no-feature-evdev \
-no-feature-filedialog \
-no-feature-force_asserts \
-no-feature-formlayout \
-no-feature-framework \
-no-feature-fontcombobox \
-no-feature-fontconfig \
-no-feature-fontdialog \
-no-feature-fscompleter \
-no-feature-futimens \
-no-feature-futimes \
-no-feature-getauxval \
-no-feature-getentropy \
-no-feature-gif \
-no-feature-glib \
-no-feature-glibc \
-no-feature-gnu-libiconv \
-no-feature-groupbox \
-no-feature-gtk3 \
-no-feature-harfbuzz \
-no-feature-ico \
-no-feature-iconv \
-no-feature-icu \
-no-feature-im \
-no-feature-image_heuristic_mask \
-no-feature-image_text \
-no-feature-imageformat_bmp \
-no-feature-imageformat_ppm \
-no-feature-imageformat_xbm \
-no-feature-inputdialog \
-no-feature-integrityfb \
-no-feature-integrityhid \
-no-feature-journald \
-no-feature-keysequenceedit \
-no-feature-kms \
-no-feature-lcdnumber \
-no-feature-libinput \
-no-feature-libinput-axis-api \
-no-feature-libudev \
-no-feature-lineedit \
-no-feature-linkat \
-no-feature-linuxfb \
-no-feature-listview \
-no-feature-listwidget \
-no-feature-lttng \
-no-feature-mdiarea \
-no-feature-messagebox \
-no-feature-mirclient \
-no-feature-movie \
-no-feature-mtdev \
-no-feature-network \
-no-feature-openvg \
-no-feature-paint_debug \
-no-feature-pdf \
-no-feature-picture \
-no-feature-pkg-config \
-no-feature-posix-libiconv \
-no-feature-posix_fallocate \
-no-feature-printer \
-no-feature-progressbar \
-no-feature-progressdialog \
-no-feature-radiobutton \
-no-feature-reduce_exports \
-no-feature-reduce_relocations \
-no-feature-release_tools \
-no-feature-renameat2 \
-no-feature-rpath \
-no-feature-rubberband \
-no-feature-scroller \
-no-feature-separate_debug_info \
-no-feature-sha3-fast \
-no-feature-simulator_and_device \
-no-feature-sizegrip \
-no-feature-slog2 \
-no-feature-spinbox \
-no-feature-splashscreen \
-no-feature-splitter \
-no-feature-sql \
-no-feature-sql-sqlite \
-no-feature-stack-protector-strong \
-no-feature-statustip \
-no-feature-statx \
-no-feature-style-android \
-no-feature-style-fusion \
-no-feature-style-mac \
-no-feature-style-stylesheet \
-no-feature-style-windows \
-no-feature-style-windowsvista \
-no-feature-syntaxhighlighter \
-no-feature-syslog \
-no-feature-system-doubleconversion \
-no-feature-system-freetype \
-no-feature-system-harfbuzz \
-no-feature-system-pcre2 \
-no-feature-system-png \
-no-feature-system-zlib \
-no-feature-systemtrayicon \
-no-feature-tabletevent \
-no-feature-tableview \
-no-feature-tablewidget \
-no-feature-testlib \
-no-feature-textbrowser \
-no-feature-textedit \
-no-feature-texthtmlparser \
-no-feature-textodfwriter \
-no-feature-texture_format_astc_experimental \
-no-feature-timezone \
-no-feature-toolbox \
-no-feature-tooltip \
-no-feature-topleveldomain \
-no-feature-translation \
-no-feature-treeview \
-no-feature-treewidget \
-no-feature-tslib \
-no-feature-tuiotouch \
-no-feature-undocommand \
-no-feature-undogroup \
-no-feature-undostack \
-no-feature-undoview \
-no-feature-vnc \
-no-feature-vsp2 \
-no-feature-vulkan \
-no-feature-whatsthis \
-no-feature-wizard \
-no-feature-xcb-xinput \
-no-feature-xlib \
-no-feature-xml \
-no-feature-xmlstreamwriter \
-xcb \
-feature-xlib \
-feature-xcb-xlib \
-feature-jpeg \
-feature-library \
-feature-mainwindow \
-feature-dockwidget \
-feature-draganddrop \
-feature-wheelevent \
-feature-contextmenu \
-feature-pushbutton \
-feature-menubar \
-feature-toolbar


It contains a lot (most) of the classes that I can imagine VASSAL needs. The size of the release libs are still small:

libQt5Core.so.5.12.9 --- 5,4 MB
libQt5Gui.so.5.12.9 --- 5,1 MB
libQt5Widgets.so.5.12.9 --- 4,5 MB
libQt5XcbQpa.so.5.12.9 --- 1,8 MB

Even if we need to modify the Qt Lite build the size of the libs will likely not change very much. These libs fit very well with a distribution. Note that the libs can also be used by C++.

I then managed to make the corresponding bindings. The size of the release binding libs are now:

qtcore.so --- 17,4 MB
qtgui.so --- 19,2 MB
qtwidgets.so --- 18,5 MB

These sizes are basically acceptable, given that they in a sense replace the JAVA runtime. I had to make heavy modifications to lqt. In short this involved removing unnecessary schema-classes to an unused-folder and commenting out calls to class-members not used. These modifications do constitute what we can call custom-lqt. These modifications need to be precisely defined and automated.

Unfortunately, even if Qt Lite and custom-lqt builds, my script does not run. The reason for that is simple. Using nm -D on the libs one sees many undefined symbols. The reference to these symbols either have to be removed in the code or added to the code as need be.


This is fine, but there is a much more serious issue which I have mentioned before. Building lqt under Linux produce errors. This means that bindings to classes like QMenubar and QToolbar are not there. More specifically, the error is the parsing of C++ code to XML, which is done by the program cpptoxml.

This issue must be solved before anything else. The parser will likely run on Windows (and therefore produce all Window bindings) but as long as it doesn't run on Linux it's pointless.

I am in contact with the guys that have made lqt. The issue may be solved or not. I note that even if their software is 10+ years old they have never bothered to make a Linux build (and no Android build either).

If we are lucky we could find an alternative cpptoxml that works on all platforms. Nevertheless, it probably means spending weeks and months on this issue. Is this something we want to do?

lqt is not part of the official Language Bindings of Qt. It may not be a good idea to work with a script/widget combination that is not a finished tool. As I said before, as application developers we must focus on the application, not on the tools.

So what do you guys think? Shall we invest time on lqt or find an alternative?
Rhett
 
Posts: 41
Joined: March 18th, 2014, 9:32 am

Re: Lua

Postby uckelman » August 18th, 2020, 12:08 pm

Thus spake Rhett:
>
> So what do you guys think? Shall we invest time on __lqt__ or find an
> alternative?

Two things:

* I'm not in favor of Qt for the reference client. The results you've
had so far don't sound very promising. Good work on presenting the
pitfalls.

* I'm still unconvinced by Lua. I intend to make a case for JavaScript
when 3.3.3 is cleared away and I've had time to gather my notes.

--
J.
User avatar
uckelman
Site Admin
 
Posts: 8847
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Lua

Postby Rhett » August 18th, 2020, 2:57 pm

Fair enough. I will now cease working on this project for the time being.

I will still be mindful of any progress regarding cpptoxml but I will not spend much time on it.

A pity, because in my opinion Lua + Qt was promising.

I do not think we should give up the idea of implementing everything concerning the game itself in script and let what we may call VASSAL Core deal with what is general for all games, including

  • Read/write to the host file system.
  • Communication with the server.
  • The Chat window and Room window.
  • Logfile/UNDO functionality.
  • The module editor.

Then VASSAL Game (in script) will be:

  • Classes for Map, Grid, Counter, Stack, Drag and Drop, Context menu, etc.
  • The counter window.

The module editor will generate not XML but script. The module editor + script classes must in themselves be enough to make simple modules. Only for more complicated features will it be necessary for the module maker to make script (not unlike today's custom classes).

There must be a very sharp distiction between VASSAL Core and VASSAL Game. The module maker can change VASSAL Game but never VASSAL Core.

VASSAL Game will interact with VASSAL Core through a well-defined API.
Rhett
 
Posts: 41
Joined: March 18th, 2014, 9:32 am

Re: Lua

Postby Brent Easton » August 18th, 2020, 9:38 pm

* I'm not in favor of Qt for the reference client. The results you've
had so far don't sound very promising. Good work on presenting the
pitfalls.


To be fair, Rhett has been investigating using the Qt supplied Lua to write the core Java client directly via calls to Qt. This is not something I would advocate and has completely different requirements to my preferred model where core Vassal is written in C++ and Lua is used just as the scripting language.

In my model, we supply our own modified version of Lua, essentially as a fully self-contained C library that would have no knowledge of Qt, or any other framework we choose. This would completely change the linking requirements for Qt. However, size of the executables and Qt run-time required to be distributed is a hotly duscussed topic in the Qt world.

* I'm still unconvinced by Lua. I intend to make a case for JavaScript
when 3.3.3 is cleared away and I've had time to gather my notes.


Oooh, I can't wait for that discussion. I'm going to go out and sharpen my knives, I mean discussion points :evil:
User avatar
Brent Easton
 
Posts: 3168
Joined: December 21st, 2007, 3:06 am
Location: Berry, NSW, Australia

Previous

Return to Developers

Who is online

Users browsing this forum: No registered users and 1 guest