LTUI is a lua-based cross-platform character terminal UI interface library.
This framework is derived from the requirement of graphical menu configuration in xmake, similar to the menuconf of linux kernel to configure compilation parameters, so based on curses and lua, a complete set of cross- The character terminal ui library of the platform. And the style style basically refers to kconfig-frontends, of course, users can also customize different ui styles.
In addition, LTUI is completely cross-platform, and the terminal terminal on windows is also fully supported. On windows, ltui will use pdcurses to draw windows.
In the new version, we have improved the mouse support and realized click response to mouse events of all controls. Here we are very grateful for the contribution of @laelnasan.
In addition, we have added a scrollbar component for scrolling support, and we have also added scrolling support to choicebox and menuconf components.
xmake is a lightweight cross-platform build tool based on Lua. It uses xmake.lua to maintain project builds. Compared with makefile/CMakeLists.txt, the configuration syntax is more Concise and intuitive, very friendly to novices, can get started quickly in a short time, allowing users to focus more on the actual project development.
In this new version, we focus on improving the dependency package management of xmake, adding support for the pacman package manager under Archlinux and MSYS2/Mingw, and we have further enriched the official package repository of xmake xmake-repo, more than 50 commonly used C/C++ packages have been added.
In addition, we have added an independent subcommand based on xmake: xrepo, a complete and independent cross-platform C/C++ package manager, which is convenient for users Conveniently manage the installation and integrated use of daily C/C++ packages.
At the same time, we have also released the xrepo related site xrepo.xmake.io, we can quickly check the usage of xrepo and each package in the official xmake-repo repository. Support and usage of
xrepo is a cross-platform C/C++ package manager based on Xmake.
It is based on the runtime provided by xmake, but it is a complete and independent package management program. Compared with package managers such as vcpkg/homebrew, xrepo can provide C/C++ packages for more platforms and architectures at the same time.
And it also supports multi-version semantic selection. In addition, it is also a decentralized distributed warehouse. It not only provides the official xmake-repo warehouse, It also supports users to build multiple private warehouses.
At the same time, xrepo also supports installing packages from third-party package managers such as vcpkg/homebrew/conan, and provides unified and consistent library link information to facilitate integration and docking with third-party projects.
If you want to know more, please refer to: online documentation, Github and Gitee
LTUI is a lua-based cross-platform character terminal UI interface library.
This framework is derived from the requirement of graphical menu configuration in xmake, similar to the menuconf of linux kernel to configure compilation parameters, so based on curses and lua, a complete set of cross- The character terminal ui library of the platform. And the style style basically refers to kconfig-frontends, of course, users can also customize different ui styles.
In addition, LTUI is completely cross-platform, and the terminal terminal on windows is also fully supported. On windows, ltui will use pdcurses to draw windows.
In the new version, we mainly added support for mouse events. In addition to curses/ncurses, we also support pdcurses on windows. Here we are very grateful for the contribution of @laelnasan .
In addition, we have added a test case of tests/events.lua
to test various input events.
$ xmake run test events
We can get and display all mouse input events of the user through this test example.
We can override ʻon_event` on a custom view to get all event input, including all mouse input events:
local demo = application()
function demo:init()
application.init(self, "demo")
self:background_set("black")
end
function demo:on_event(e)
if e.type == "btn_code" then
print(e.btn_name, e.x, e.y)
end
application.on_event(self, e)
end
demo:run()
xrepo is a cross-platform C/C++ package manager based on Xmake.
It is based on the runtime provided by xmake, but it is a complete and independent package management program. Compared with package managers such as vcpkg/homebrew, xrepo can provide C/C++ packages for more platforms and architectures at the same time.
And it also supports multi-version semantic selection. In addition, it is also a decentralized distributed repository. It not only provides the official xmake-repo repository, It also supports users to build multiple private repositorys.
At the same time, xrepo also supports installing packages from third-party package managers such as vcpkg/homebrew/conan, and provides unified and consistent library link information to facilitate integration and docking with third-party projects.
If you want to know more, please refer to: Documents, Github and Gitee
We only need install xmake to use the xrepo command. About the installation of xmake, we can see: Xmake Installation Document.
In addition to directly retrieving the installation package from the official repository: xmake-repo.
We can also add any number of self-built repositories, and even completely isolate the external network, and only maintain the installation and integration of private packages on the company’s internal network.
Just use the following command to add your own repository address:
$ xrepo add-repo myrepo https://github.com/mygroup/myrepo
add_requires("tbox >1.6.1", "libuv master", "vcpkg::ffmpeg", "brew::pcre2/libpcre2-8")
add_requires("conan::openssl/1.1.1g", {alias = "openssl", optional = true, debug = true})
target("test")
set_kind("binary")
add_files("src/*.c")
add_packages("tbox", "libuv", "vcpkg::ffmpeg", "brew::pcre2/libpcre2-8", "openssl")
The following is the overall architecture and compilation process integrated with xmake.
xmake is a lightweight cross-platform build tool based on Lua. It uses xmake.lua to maintain project builds. Compared with makefile/CMakeLists.txt, the configuration syntax is more Concise and intuitive, very friendly to novices, can get started quickly in a short time, allowing users to focus more on the actual project development.
In this new version, we have made full platform support for the Intel series of C++ and Fortran compilers, and improved the Wasm tool chain support added in the previous version, and also supported the Qt SDK for Wasm.
In addition, we have also upgraded luajit to the latest v2.1 version. In terms of cross-platform, xmake has also made great improvements and added support for mips64 architecture.
On this version, we have made full platform support for the Intel series of C++ compilers, including icl on windows and icc/icpc under linux/macOS.
To enable the Intel C++ compiler, we only need to switch to the corresponding toolchain through the --toolchain=icc
parameter on the system where the Intel compiler is installed.
$ xmake f --toolchain=icc
$ xmake
In the previous version, xmake only supported the gfortran compiler. In this version, we also support the Intel Fortran compiler, which is ifort. We only need to switch to the corresponding ifort tool chain to use it.
$ xmake f --toolchain=ifort
$ xmake
In the last version, we added the --toolchain=emcc
toolchain to support the compilation of wasm programs, but just specifying the toolchain does not adjust the extension of the target program well, for example, for *.js
and The file of *.wasm
is generated.
In the new version, we continue to add the xmake f -p wasm
platform, the built-in emcc tool chain is enabled, and the surrounding configuration has been improved again based on it.
As long as you switch to the wasm platform, xmake will generate *.js
and corresponding *.wasm
and other target files by default, and additionally generate *.html
pages that can load js to run the wasm program.
In addition, we also support Qt SDK for Wasm, for example, we create a Qt QuickApp project.
$ xmake create -t qt.quickapp_static quickapp
Here, we noticed that what we created is a Qt project that requires a static link. Because of the wasm version of the Qt library, we need to force a static link to the program to use it normally.
The content of the generated project file xmake.lua is roughly as follows:
add_rules("mode.debug", "mode.release")
includes("qt_add_static_plugins.lua")
target("demo")
add_rules("qt.quickapp_static")
add_headerfiles("src/*.h")
add_files("src/*.cpp")
add_files("src/qml.qrc")
add_frameworks("QtQuickControls2", "QtQuickTemplates2")
qt_add_static_plugins("QtQuick2Plugin", {linkdirs = "qml/QtQuick.2", links = "qtquick2plugin"})
qt_add_static_plugins("QtQuick2WindowPlugin", {linkdirs = "qml/QtQuick/Window.2", links = "windowplugin"})
qt_add_static_plugins("QtQuickControls2Plugin", {linkdirs = "qml/QtQuick/Controls.2", links = "qtquickcontrols2plugin"})
qt_add_static_plugins("QtQuickTemplates2Plugin", {linkdirs = "qml/QtQuick/Templates.2", links = "qtquicktemplates2plugin"})
In the above configuration, in addition to enabling the qt.quickapp_static
compilation rules, we also configure some necessary Qt plugins through qt_add_static_plugins
.
Next, we only need to switch to the wasm platform and make sure that the Qt SDK is set to complete the compilation.
$ xmake f -p wasm [--qt=~/Qt]
$ xmake
After the compilation is completed, xmake will generate demo.html and the corresponding demo.js/demo.wasm program in the build directory. We can open the demo.html page to run the Qt program we compiled. The display effect is as follows:
For a more detailed description of Qt/Wasm, see: Issue #956