0

我对 LuaRocks 文档有点困惑。我正在创建一个 rockspec,它将库 dll 文件复制到 clibs 和一个文件 apender 到 lua/logging 文件夹。这是我到目前为止所拥有的

package = "lualoggingapender"
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",
      }
    }
  }
}

这是我该怎么做?

我的配置文件是

local LFW_ROOT = config.LFW_ROOT
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]]

当我尝试运行它时,出现以下错误

'nmake' is not recognized as an internal or external command,
operable program or batch file.

Error: Build error: Failed building.

当我在 VS2013 命令行中运行它时,出现以下错误

NMAKE : fatal error U1052: file 'Makefile.win' not found
Stop.

Error: Build error: Failed building.

我应该使用 make 或 buildin 最后一件事,有什么区别

更新:我能够使 lua 模块被复制和构建,但我仍然遇到安装 lib 的问题,它说:Failing copying FileName here is my final code look like

package = "lualoggingapender"
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",
        },
      },
    }
  }
}
4

0 回答 0