Download

how can i build ue4 with lua in branch 4.16

i got errors.use vs2017.
2>------ 已启动生成: 项目: UE4, 配置: Development_Editor x64 ------
2>Performing 4 actions (4 in parallel)
2>Module.ScriptPlugin.cpp
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(15): error C2504: “FScriptContextBase”: 未定义基类
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(50): error C2065: “FScriptField”: 未声明的标识符
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(50): error C2923: “TArray”: 对于参数“InElementType”,“FScriptField”不是有效的 模板 类型变量
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(29): error C3668: “FLuaContext::Initialize”: 包含重写说明符“override”的方法没有重写任何基类方法
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(30): error C3668: “FLuaContext::BeginPlay”: 包含重写说明符“override”的方法没有重写任何基类方法
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(31): error C3668: “FLuaContext::Tick”: 包含重写说明符“override”的方法没有重写任何基类方法
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(32): error C3668: “FLuaContext::Destroy”: 包含重写说明符“override”的方法没有重写任何基类方法
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(33): error C3668: “FLuaContext::CanTick”: 包含重写说明符“override”的方法没有重写任何基类方法
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(35): error C3668: “FLuaContext::SetFloatProperty”: 包含重写说明符“override”的方法没有重写任何基类方法
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(36): error C3668: “FLuaContext::GetFloatProperty”: 包含重写说明符“override”的方法没有重写任何基类方法
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(37): error C3668: “FLuaContext::SetIntProperty”: 包含重写说明符“override”的方法没有重写任何基类方法
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(38): error C3668: “FLuaContext::GetIntProperty”: 包含重写说明符“override”的方法没有重写任何基类方法
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(39): error C3668: “FLuaContext::SetObjectProperty”: 包含重写说明符“override”的方法没有重写任何基类方法
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(40): error C3668: “FLuaContext::GetObjectProperty”: 包含重写说明符“override”的方法没有重写任何基类方法
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(41): error C3668: “FLuaContext::SetBoolProperty”: 包含重写说明符“override”的方法没有重写任何基类方法
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(42): error C3668: “FLuaContext::GetBoolProperty”: 包含重写说明符“override”的方法没有重写任何基类方法
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(43): error C3668: “FLuaContext::SetStringProperty”: 包含重写说明符“override”的方法没有重写任何基类方法
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(44): error C3668: “FLuaContext::GetStringProperty”: 包含重写说明符“override”的方法没有重写任何基类方法
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(46): error C3668: “FLuaContext::CallFunction”: 包含重写说明符“override”的方法没有重写任何基类方法
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(47): error C3668: “FLuaContext::InvokeScriptFunction”: 包含重写说明符“override”的方法没有重写任何基类方法
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(50): error C3668: “FLuaContext::GetScriptDefinedFields”: 包含重写说明符“override”的方法没有重写任何基类方法
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(897): error C2065: “FScriptField”: 未声明的标识符
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(897): error C2923: “TArray”: 对于参数“InElementType”,“FScriptField”不是有效的 模板 类型变量
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(921): error C2065: “FScriptField”: 未声明的标识符
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(921): error C2146: 语法错误: 缺少“;”(在标识符“PropertyInfo”的前面)
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(921): error C2065: “PropertyInfo”: 未声明的标识符
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(925): error C2065: “PropertyInfo”: 未声明的标识符
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(925): error C2228: “.Class”的左边必须有类/结构/联合
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(925): note: 类型是“unknown-type”
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(928): error C2065: “PropertyInfo”: 未声明的标识符
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(928): error C2228: “.Class”的左边必须有类/结构/联合
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(928): note: 类型是“unknown-type”
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(931): error C2065: “PropertyInfo”: 未声明的标识符
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(931): error C2228: “.Class”的左边必须有类/结构/联合
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(931): note: 类型是“unknown-type”
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(935): error C2065: “PropertyInfo”: 未声明的标识符
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(935): error C2228: “.Class”的左边必须有类/结构/联合
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(935): note: 类型是“unknown-type”
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(940): error C2065: “PropertyInfo”: 未声明的标识符
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(940): error C2228: “.Class”的左边必须有类/结构/联合
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(940): note: 类型是“unknown-type”
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(945): error C2065: “PropertyInfo”: 未声明的标识符
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(945): error C2228: “.Class”的左边必须有类/结构/联合
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(945): note: 类型是“unknown-type”
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(947): error C2065: “PropertyInfo”: 未声明的标识符
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(947): error C2228: “.Name”的左边必须有类/结构/联合
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(947): note: 类型是“unknown-type”
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(948): error C2065: “PropertyInfo”: 未声明的标识符
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\ScriptBlueprintGeneratedClass.cpp(121): error C2440: “=”: 无法从“FLuaContext *”转换为“FScriptContextBase *”
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\ScriptBlueprintGeneratedClass.cpp(121): note: 与指向的类型无关;转换要求 reinterpret_cast、C 样式转换或函数样式转换
2>ERROR : UBT error : Failed to produce item: D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-ScriptPlugin.lib
2>Total build time: 17.90 seconds (Local executor: 0.00 seconds)
2>E:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets(44,5): error MSB3075: 命令“…\Build\BatchFiles\Build.bat UE4Editor Win64 Development -waitmutex”已退出,代码为 5。请验证您是否拥有运行此命令的足够权限。
2>已完成生成项目“UE4.vcxproj”的操作 - 失败。
========== 生成: 成功 1 个,失败 1 个,最新 2 个,跳过 0 个 ==========

请问你知道,在构建 UE 时,怎么样让它只构建 desktop 的部分?

我试着下载了 github 上的源代码,然后用 vs2015 构建,用时大概 1 个半小时,然后多占用 30G 的硬盘空间,这是不是把所有部分都给编译了?

If you changed your language to english, it’d be possible for someone else to read those error messages…

2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(15): error C2504: ‘FScriptContextBase’: base class undefined
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(50): error C2065: ‘FScriptField’: undeclared identifier
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(50): error C2923: ‘TArray’: ‘FScriptField’ is not a valid template type argument for parameter ‘InElementType’
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(29): error C3668: ‘FLuaContext::Initialize’: method with override specifier ‘override’ did not override any base class methods
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(30): error C3668: ‘FLuaContext::BeginPlay’: method with override specifier ‘override’ did not override any base class methods
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(31): error C3668: ‘FLuaContext::Tick’: method with override specifier ‘override’ did not override any base class methods
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(32): error C3668: ‘FLuaContext::Destroy’: method with override specifier ‘override’ did not override any base class methods
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(33): error C3668: ‘FLuaContext::CanTick’: method with override specifier ‘override’ did not override any base class methods
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(35): error C3668: ‘FLuaContext::SetFloatProperty’: method with override specifier ‘override’ did not override any base class methods
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(36): error C3668: ‘FLuaContext::GetFloatProperty’: method with override specifier ‘override’ did not override any base class methods
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(37): error C3668: ‘FLuaContext::SetIntProperty’: method with override specifier ‘override’ did not override any base class methods
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(38): error C3668: ‘FLuaContext::GetIntProperty’: method with override specifier ‘override’ did not override any base class methods
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(39): error C3668: ‘FLuaContext::SetObjectProperty’: method with override specifier ‘override’ did not override any base class methods
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(40): error C3668: ‘FLuaContext::GetObjectProperty’: method with override specifier ‘override’ did not override any base class methods
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(41): error C3668: ‘FLuaContext::SetBoolProperty’: method with override specifier ‘override’ did not override any base class methods
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(42): error C3668: ‘FLuaContext::GetBoolProperty’: method with override specifier ‘override’ did not override any base class methods
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(43): error C3668: ‘FLuaContext::SetStringProperty’: method with override specifier ‘override’ did not override any base class methods
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(44): error C3668: ‘FLuaContext::GetStringProperty’: method with override specifier ‘override’ did not override any base class methods
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(46): error C3668: ‘FLuaContext::CallFunction’: method with override specifier ‘override’ did not override any base class methods
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(47): error C3668: ‘FLuaContext::InvokeScriptFunction’: method with override specifier ‘override’ did not override any base class methods
2>d:\ue4\branches\4.16\engine\plugins\scriptplugin\source\scriptplugin\private\LuaIntegration.h(50): error C3668: ‘FLuaContext::GetScriptDefinedFields’: method with override specifier ‘override’ did not override any base class methods
2>OculusRiftCAPI.cpp
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(897): error C2065: ‘FScriptField’: undeclared identifier
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(897): error C2923: ‘TArray’: ‘FScriptField’ is not a valid template type argument for parameter ‘InElementType’
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(921): error C2065: ‘FScriptField’: undeclared identifier
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(921): error C2146: syntax error: missing ‘;’ before identifier ‘PropertyInfo’
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(921): error C2065: ‘PropertyInfo’: undeclared identifier
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(925): error C2065: ‘PropertyInfo’: undeclared identifier
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(925): error C2228: left of ‘.Class’ must have class/struct/union
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(925): note: type is ‘unknown-type’
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(928): error C2065: ‘PropertyInfo’: undeclared identifier
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(928): error C2228: left of ‘.Class’ must have class/struct/union
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(928): note: type is ‘unknown-type’
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(931): error C2065: ‘PropertyInfo’: undeclared identifier
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(931): error C2228: left of ‘.Class’ must have class/struct/union
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(931): note: type is ‘unknown-type’
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(935): error C2065: ‘PropertyInfo’: undeclared identifier
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(935): error C2228: left of ‘.Class’ must have class/struct/union
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(935): note: type is ‘unknown-type’
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(940): error C2065: ‘PropertyInfo’: undeclared identifier
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(940): error C2228: left of ‘.Class’ must have class/struct/union
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(940): note: type is ‘unknown-type’
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(945): error C2065: ‘PropertyInfo’: undeclared identifier
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(945): error C2228: left of ‘.Class’ must have class/struct/union
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(945): note: type is ‘unknown-type’
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(947): error C2065: ‘PropertyInfo’: undeclared identifier
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(947): error C2228: left of ‘.Name’ must have class/struct/union
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(947): note: type is ‘unknown-type’
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\LuaIntegration.cpp(948): error C2065: ‘PropertyInfo’: undeclared identifier
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\ScriptBlueprintGeneratedClass.cpp(121): error C2440: ‘=’: cannot convert from ‘FLuaContext *’ to ‘FScriptContextBase *’
2>D:\ue4\branches\4.16\Engine\Plugins\ScriptPlugin\Source\ScriptPlugin\Private\ScriptBlueprintGeneratedClass.cpp(121): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

试试这个插件https://github.com/asqbtcupid/unreal.lua

If you want to use LUA as a script language you can simply create an external dll that you can include in engine like third party library.
In order to do this you can download from here the implementation of LUA https://www.lua.org/download.html. In this library you can find an interpreter already implemented. In this way you can create your own lua interpreter dll and use it from Unreal as third party library.
Another advantage of this approach is that you can extend LUA language with your custom call and you they in your script.