From bbfec42976ba05e64ea8410f4566d952d81b2a3f Mon Sep 17 00:00:00 2001 From: Syping Date: Tue, 1 Oct 2019 00:05:37 +0200 Subject: [PATCH] fix compile --- src/luaengine/luaengine.pro | 14 ++++++++++++-- src/luaenginegui/luaengine/LuaEngineGui.h | 3 ++- src/luaenginegui/luaenginegui.pro | 12 +++++++++++- src/luaengineos/luaengine/LuaEngineOS.cpp | 7 ++++++- src/luaengineos/luaengine/LuaEngineOS.h | 7 ++++++- src/luaengineos/luaengineos.pro | 12 +++++++++++- 6 files changed, 48 insertions(+), 7 deletions(-) diff --git a/src/luaengine/luaengine.pro b/src/luaengine/luaengine.pro index 327b10b..5dceb76 100644 --- a/src/luaengine/luaengine.pro +++ b/src/luaengine/luaengine.pro @@ -1,6 +1,6 @@ #/***************************************************************************** #* luaEngine Lua Engine for Qt -#* Copyright (C) 2018 Syping +#* Copyright (C) 2018-2019 Syping #* #* Licensed under the Apache License, Version 2.0 (the "License"); #* you may not use this file except in compliance with the License. @@ -18,7 +18,9 @@ QT -= gui TARGET = luaengine TEMPLATE = lib -CONFIG += c++11 +CONFIG += c++11 \ + skip_target_version_ext +VERSION = 0.1 DEFINES += LUAENGINE_LIBRARY DEFINES += LUA_COMPAT_5_2 @@ -96,3 +98,11 @@ HEADERS += \ lua/lundump.h \ lua/lvm.h \ lua/lzio.h + +win32 { + RC_LANG = 0x0 + QMAKE_TARGET_COMPANY = "Syping" + QMAKE_TARGET_DESCRIPTION = "LuaEngine Library" + QMAKE_TARGET_COPYRIGHT = "Copyright (c) 2018-2019 Syping" + QMAKE_TARGET_PRODUCT = "luaengine" +} diff --git a/src/luaenginegui/luaengine/LuaEngineGui.h b/src/luaenginegui/luaengine/LuaEngineGui.h index e043dbb..72eb804 100644 --- a/src/luaenginegui/luaengine/LuaEngineGui.h +++ b/src/luaenginegui/luaengine/LuaEngineGui.h @@ -20,7 +20,8 @@ #include "LuaEngineGui_global.h" #include "LuaEngine.h" -#include +#include +#include #include class LUAENGINEGUISHARED_EXPORT LuaEngineGui : public LuaEngine diff --git a/src/luaenginegui/luaenginegui.pro b/src/luaenginegui/luaenginegui.pro index 4eeb1a7..d7f7979 100644 --- a/src/luaenginegui/luaenginegui.pro +++ b/src/luaenginegui/luaenginegui.pro @@ -18,7 +18,9 @@ QT += core gui widgets TARGET = luaenginegui TEMPLATE = lib -CONFIG += c++11 +CONFIG += c++11 \ + skip_target_version_ext +VERSION = 0.1 DEFINES += LUAENGINEGUI_LIBRARY static: DEFINES += LUAENGINE_STATIC @@ -37,3 +39,11 @@ SOURCES += \ HEADERS += \ luaengine/LuaEngineGui.h \ luaengine/LuaEngineGui_global.h + +win32 { + RC_LANG = 0x0 + QMAKE_TARGET_COMPANY = "Syping" + QMAKE_TARGET_DESCRIPTION = "LuaEngine Gui Library" + QMAKE_TARGET_COPYRIGHT = "Copyright (c) 2018-2019 Syping" + QMAKE_TARGET_PRODUCT = "luaenginegui" +} diff --git a/src/luaengineos/luaengine/LuaEngineOS.cpp b/src/luaengineos/luaengine/LuaEngineOS.cpp index bc50773..fb6b078 100644 --- a/src/luaengineos/luaengine/LuaEngineOS.cpp +++ b/src/luaengineos/luaengine/LuaEngineOS.cpp @@ -15,12 +15,17 @@ * limitations under the License. *****************************************************************************/ -#include "LuaEngine_macro.h" #include "LuaEngineOS.h" #include #include #include +LuaEngineOS::LuaEngineOS(QObject *parent, bool loadBaseLibraries) : LuaEngine(parent, loadBaseLibraries) +{ + L = luaState(); + pushClass(L); +} + void LuaEngineOS::pushClass(lua_State *L_p) { // Process diff --git a/src/luaengineos/luaengine/LuaEngineOS.h b/src/luaengineos/luaengine/LuaEngineOS.h index a411976..8d2f2ad 100644 --- a/src/luaengineos/luaengine/LuaEngineOS.h +++ b/src/luaengineos/luaengine/LuaEngineOS.h @@ -20,15 +20,20 @@ #include "LuaEngineOS_global.h" #include "LuaEngine.h" +#include +#include -class LUAENGINEOSSHARED_EXPORT LuaEngineOS +class LUAENGINEOSSHARED_EXPORT LuaEngineOS : public LuaEngine { + Q_OBJECT public: + LuaEngineOS(QObject *parent = nullptr, bool loadBaseLibraries = true); static void pushClass(lua_State *L_p); static void pushClass(LuaEngine *luaEngine); static int executeProcess(lua_State *L_p); private: + lua_State *L; static QString nameForPointer(void *pointer); }; diff --git a/src/luaengineos/luaengineos.pro b/src/luaengineos/luaengineos.pro index 8730238..1cb6a8f 100644 --- a/src/luaengineos/luaengineos.pro +++ b/src/luaengineos/luaengineos.pro @@ -18,7 +18,9 @@ QT += core TARGET = luaengineos TEMPLATE = lib -CONFIG += c++11 +CONFIG += c++11 \ + skip_target_version_ext +VERSION = 0.1 DEFINES += LUAENGINEOS_LIBRARY static: DEFINES += LUAENGINE_STATIC @@ -37,3 +39,11 @@ SOURCES += \ HEADERS += \ luaengine/LuaEngineOS.h \ luaengine/LuaEngineOS_global.h + +win32 { + RC_LANG = 0x0 + QMAKE_TARGET_COMPANY = "Syping" + QMAKE_TARGET_DESCRIPTION = "LuaEngine OS Library" + QMAKE_TARGET_COPYRIGHT = "Copyright (c) 2019 Syping" + QMAKE_TARGET_PRODUCT = "luaengineos" +}