mirror of
https://gitlab.com/Syping/luaengineapp.git
synced 2024-12-22 11:55:29 +01:00
add _LuaEngineMode
This commit is contained in:
parent
d6117ee54a
commit
8dfd5b9455
3 changed files with 4 additions and 3 deletions
|
@ -66,7 +66,7 @@ int main(int argc, char *argv[])
|
|||
LuaEngineNetwork::pushClass(&luaEngineGui);
|
||||
LuaEngineOS::pushClass(&luaEngineGui);
|
||||
luaEngineGui.pushVariant("_LuaEngineRT", rtPath);
|
||||
luaEngineGui.setProperty("EngineMode", "GUI");
|
||||
luaEngineGui.pushVariant("_LuaEngineMode", "GUI");
|
||||
luaEngineGui.setProperty("EngineType", "Runtime");
|
||||
luaEngineGui.setProperty("ScriptPath", scriptPath);
|
||||
luaEngineGui.executeLuaScript(luaScript.readAll());
|
||||
|
|
|
@ -80,6 +80,7 @@ int main(int argc, char *argv[])
|
|||
LuaEngineIO::pushClass(&luaEngineGui);
|
||||
LuaEngineNetwork::pushClass(&luaEngineGui);
|
||||
LuaEngineOS::pushClass(&luaEngineGui);
|
||||
luaEngineGui.pushVariant("_LuaEngineMode", "GUI");
|
||||
luaEngineGui.setProperty("EngineType", "Portable");
|
||||
luaEngineGui.executeLuaScript(luaScript);
|
||||
|
||||
|
@ -94,7 +95,7 @@ int main(int argc, char *argv[])
|
|||
return variant.toInt();
|
||||
}
|
||||
else if (variant.type() == QVariant::String) {
|
||||
if (variant.toString() == "GuiExecuted") {
|
||||
if (variant.toString() == "GuiExecuted" || variant.toString() == "CliExecuted") {
|
||||
return a.exec();
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -53,7 +53,7 @@ int main(int argc, char *argv[])
|
|||
LuaEngineNetwork::pushClass(&luaEngine);
|
||||
LuaEngineOS::pushClass(&luaEngine);
|
||||
luaEngine.pushVariant("_LuaEngineRT", rtPath);
|
||||
luaEngine.setProperty("EngineMode", "CLI");
|
||||
luaEngine.pushVariant("_LuaEngineMode", "CLI");
|
||||
luaEngine.setProperty("EngineType", "Runtime");
|
||||
luaEngine.setProperty("ScriptPath", scriptPath);
|
||||
luaEngine.executeLuaScript(luaScript.readAll());
|
||||
|
|
Loading…
Reference in a new issue