From c1e8cc974b35437024c35bdd3523c297ecd59b57 Mon Sep 17 00:00:00 2001 From: chuanweizhang2013 Date: Thu, 3 Jul 2014 19:53:17 -0700 Subject: [PATCH] add call encript lua function --- .../runtime-src/Classes/AppDelegate.cpp | 3 ++ .../HelloLua.xcodeproj/project.pbxproj | 31 +++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/Classes/AppDelegate.cpp b/templates/lua-template-runtime/frameworks/runtime-src/Classes/AppDelegate.cpp index 6cac00e17c..41f4174c25 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/Classes/AppDelegate.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/Classes/AppDelegate.cpp @@ -54,6 +54,9 @@ bool AppDelegate::applicationDidFinishLaunching() auto engine = LuaEngine::getInstance(); ScriptEngineManager::getInstance()->setScriptEngine(engine); + + LuaStack* stack = pEngine->getLuaStack(); + stack->setXXTEAKeyAndSign("2dxLua", strlen("2dxLua"), "XXTEA", strlen("XXTEA")); //register custom function //LuaStack* stack = engine->getLuaStack(); diff --git a/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj b/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj index ffeb092cfb..7f79759d56 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj +++ b/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj @@ -838,6 +838,7 @@ 5023813117EBBCE400990C9B /* Sources */, 5023813617EBBCE400990C9B /* Frameworks */, 5023814617EBBCE400990C9B /* Resources */, + 3EC9881D1966432600A45E0E /* ShellScript */, ); buildRules = ( ); @@ -861,6 +862,7 @@ F293B3C415EB7BE500256477 /* Sources */, F293B3C515EB7BE500256477 /* Frameworks */, F293B3C615EB7BE500256477 /* Resources */, + 3EC988201966433500A45E0E /* ShellScript */, ); buildRules = ( ); @@ -1103,6 +1105,35 @@ }; /* End PBXResourcesBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + 3EC9881D1966432600A45E0E /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "find ${SRCROOT}/../../../src/ -name \"*\" -exec touch -cm {} \\;\nfind ${SRCROOT}/../../../res/ -name \"*\" -exec touch -cm {} \\;"; + }; + 3EC988201966433500A45E0E /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "find ${SRCROOT}/../../../src/ -name \"*\" -exec touch -cm {} \\;\nfind ${SRCROOT}/../../../res/ -name \"*\" -exec touch -cm {} \\;"; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ 5023813117EBBCE400990C9B /* Sources */ = { isa = PBXSourcesBuildPhase;