2016-06-26 ruki
A simplest xmake.lua ```lua -- define a target with named 'demo' target("demo") -- set the target kind, .e.g 'binary' is a console program -- - static: a static library -- - shared: a shared library set_kind("binary") -- add all c source files in the directory: src add_files("src/*.c" 继续阅读 »
2016-07-07 ruki
xmake里面的lua脚本加载插件,可以让你方便调试和编写一些自定义的lua脚本,这个时候xmake就是一个纯lua的加载引擎。。 例如,我想写个简单的hello xmake!的lua脚本,可以自己建个 hello.lua 文件,编写如下脚本: lua function main() print("hello xmake!") end main是入口函数,就跟平常写c类似,然后加载执行下这个lua脚本就行了: bash xmake lua /home/xxx/hello.lua or xmake l /tmp/hello.lua 下面在来个稍微高级点的,我要传递 继续阅读 »
2017-03-04 ruki
New features Add --links, --linkdirs and --includedirs configure arguments Add app2ipa plugin Add dictionary syntax style for xmake.lua Provide smart scanning and building mode without xmake.lua Add set_xmakever api for xmake.lua Add add_frameworks api for objc and swift Support multi-languages extension and add golan 继续阅读 »
2017-05-10 ruki
Introduction xmake lua has supported REPL(read-eval-print), we can write and test script more easily now. Enter interactive mode: ```bash $ xmake lua 1 + 2 3 a = 1 a 1 for _, v in pairs({1, 2, 3}) do print(v) end 1 2 3 ``` 继续阅读 »
2017-01-07 ruki
We recently added a new feature for xmake: you need not write any make-like file (xmake.lua, makefile.am, cmakelist.txt, etc.) and also build it directly. It will scan all source files and generate xmake.lua automatically for building project. And xmake will detect 'main' function in source file in order to distin 继续阅读 »
2017-05-10 ruki
概述 此次更新,主要增强xmake lua插件,支持交互式命令执行(read-eval-print, REPL)以及一些稳定性问题修复。 有时候在交互模式下,运行命令更加的方便测试和验证一些模块和api,也更加的灵活,不需要再去额外写一个脚本文件来加载。 我们先看下,如何进入交互模式: ```bash 不带任何参数执行,就可以进入 $ xmake lua 进行表达式计算 1 + 2 3 赋值和打印变量值 a = 1 a 1 多行输入和执行 for _, v in pairs({1, 2, 3}) do print(v) end 1 2 3 ``` 继续阅读 »
2017-03-04 ruki
概述 此版本重构了整个xmake,使得xmake更加方便地进行多语言扩展,并且在之前原有的构建语言支持上,新增了对golang, dlang 和 rust 程序构建支持。 并且重写了所有文档,提供更加详细完整的接口手册和文档支持:新版文档 License也从之前的LGPLv2.1改为Apache License 2.0,更加详细的改进请看下面详细描述: 新特性 添加--links, --linkdirs and --includedirs 配置参数 添加app2ipa插件 为xmake.lua工程描述增加dictionay语法风格 提供智能扫描编译模式,在无任何xmake.lua等工程描述文件的情况下,也能直接快速编译 为 继续阅读 »
2017-01-12 ruki
之前在给xmake做构建的效率优化的时候,需要对lua脚本的api调用性能进行分析,分析出最耗时一些lua调用api, 找出性能瓶颈,来针对性地进行优化,那么问题来了,如果对lua脚本像c程序那样进行profile呢? 我们现在看下最后实现完的最终效果: 4.681, 98.84%, 1, anonymous : actions/build/main.lua: 36 3.314, 69.98%, 1, anonymous : actions/build/main.lua: 66 3.314, 69.98%, 继续阅读 »
2020-12-10 ruki
xmake 是一个基于 Lua 的轻量级跨平台构建工具,使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门,能够让用户把更多的精力集中在实际的项目开发上。 我们可以用 xmake 很方便的开发构建 C/C++ 项目,同时也支持和其他 native 语言的混合编译。 近期,我们还新增了一个基于 xmake 的独立子命令:xrepo,一个完整独立的跨平台 C/C++ 包管理器,便于用户更加方便的管理日常 C/C++ 包的安装和集成使用。 关于 xmake 和 xrepo 的进一步了解和使用可以参考下面的链接。 项目源码 继续阅读 »
2020-11-24 ruki
xmake 是一个基于 Lua 的轻量级跨平台构建工具,使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门,能够让用户把更多的精力集中在实际的项目开发上。 在这个新版本中,我们重点改进了 xmake 的依赖包管理,新增了 Archlinux 和 MSYS2/Mingw 下 的 pacman 包管理器支持,另外我们进一步丰富了 xmake 的官方包仓库 xmake-repo,新增了 50 多个常用的 C/C++ 包。 此外,我们新增了一个基于 xmake 的独立子命令:xrepo,一个完整独立的跨平台 C/C++ 包管理器,便于用 继续阅读 »