为Windows创建一个rockspec。
2014-9-24 13:26:46
收藏:0
阅读:128
评论:0
我有点困惑 LuaRocks 文档。我正在创建一个 rockspec,它将复制库 dll 文件到 clibs,以及将一个文件添加到 lua/logging 文件夹中。这是我目前的代码
version = "1.0-1"
source = {
url = "",
}
description = {
summary = "An example for the LuaRocks tutorial.",
detailed = [[
This is an example for the LuaRocks tutorial.
Here we would put a detailed, typically
paragraph-long description.
]],
homepage = "http://...", -- We don't have one yet
license = "MIT/X11" -- or whatever you like
}
dependencies = {
"lua ~> 5.1"
-- If you depend on other rocks, add them here
}
build = {
type = "make",
install_variables = {
LUA_LIBDIR = "$(LIBDIR)",
LUA_DIR = "$(LUADIR)",
BIN_DIR = "$(BINDIR)"
},
platforms = {
win32 = {
type = "make",
build_variables = {
LUA_DIR = "$(LUA_LIBDIR)\\lib/lib.dll",
}
}
}
}
这样做正确吗?
我的配置文件为
rocks_servers = {
[[http://luarocks.org/repositories/rocks]]
}
rocks_trees = {
{ root = LFW_ROOT, rocks_dir = LFW_ROOT..[[\rocks]],
bin_dir = LFW_ROOT, lua_dir = LFW_ROOT..[[\lua]],
lib_dir = LFW_ROOT..[[\clibs]] }
}
variables.WRAPPER = LFW_ROOT..[[\rclauncher.obj]]
当我尝试运行它时,我会遇到以下错误
operable program or batch file.
Error: Build error: Failed building.
当我在 VS2013 命令行中运行它时,我会遇到以下错误
Stop.
Error: Build error: Failed building.
最后一个问题是,我应该使用 make 还是 buildin,它们之间有什么区别?
更新:我能够复制和构建 lua 模块,但我仍然无法安装 lib,它会显示:失败复制 FileName,以下是我的最终代码
version = "1.0-1"
source = {
url = "",
dir = "lib",
dir = "logging"
}
description = {
summary = "An example for the LuaRocks tutorial.",
detailed = [[
This is an example for the LuaRocks tutorial.
Here we would put a detailed, typically
paragraph-long description.
]],
homepage = "http://...", -- We don't have one yet
license = "MIT/X11" -- or whatever you like
}
dependencies = {
"lua ~> 5.1",
-- If you depend on other rocks, add them here
}
build = {
type = "builtin",
install_variables = {
LUA_LIBDIR = "$(LIBDIR)",
LUA_DIR = "$(LUADIR)",
BIN_DIR = "$(BINDIR)"
},
platforms = {
win32 = {
type = "builtin",
modules = {
["logging.windows"] = "windows.lua",
},
install = {
lib = {
winEvntLog ="lib/winEvntLog.dll",
msgLog = "lib/msgLog.dll",
},
},
}
}
}
点赞
评论区的留言会收到邮件通知哦~
推荐文章
- 如何将两个不同的lua文件合成一个 东西有点长 大佬请耐心看完 我是小白研究几天了都没搞定
- 如何在roblox studio中1:1导入真实世界的地形?
- 求解,lua_resume的第二次调用继续执行协程问题。
- 【上海普陀区】内向猫网络招募【Skynet游戏框架Lua后端程序员】
- SF爱好求教:如何用lua实现游戏内调用数据库函数实现账号密码注册?
- Lua实现网站后台开发
- LUA错误显式返回,社区常见的规约是怎么样的
- lua5.3下载库失败
- 请问如何实现文本框内容和某个网页搜索框内容连接,并把网页输出来的结果反馈到另外一个文本框上
- lua lanes多线程使用
- 一个kv数据库
- openresty 有没有比较轻量的 docker 镜像
- 想问一下,有大佬用过luacurl吗
- 在Lua执行过程中使用Load函数出现问题
- 为什么 neovim 里没有显示一些特殊字符?
- Lua比较两个表的值(不考虑键的顺序)
- 有个lua简单的项目,外包,有意者加微信 liuheng600456详谈,最好在成都
- 如何在 Visual Studio 2022 中运行 Lua 代码?
- addEventListener 返回 nil Lua
- Lua中获取用户配置主目录的跨平台方法