add call encript lua function

This commit is contained in:
chuanweizhang2013 2014-07-03 19:53:17 -07:00
parent d8f01215f0
commit c1e8cc974b
2 changed files with 34 additions and 0 deletions

View File

@ -55,6 +55,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();
//register_custom_function(stack->getLuaState());

View File

@ -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;