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.
This is the first version of xmake this year and the first version that is fully adapted to support Apple Silicon (macOS ARM) devices.
In this version, we mainly improved the integrated support for C/C++ dependent packages, which is more stable, and can be more flexible to achieve customized configuration compilation.
In addition, we also focused on improving the vs/vsxmake two vs project generator plugins, fixing many details, and also supporting the sub-project group
, and now it is possible to generate a project structure similar to the following figure.
About Zig, because it has fixed a lot of problems that I have reported before in v0.7.1. Now xmake can already support the compilation of zig projects.
At the same time, we have newly developed a luarocks-build-xmake plugin to replace luarocks’ built-in build system with xmake.
Finally, in this version, we continue to improve the xmake f --menu
graphical configuration menu, which fully supports mouse operation and scrolling support, and also supports utf8.
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.