From edb86b1154e0916d65d029012745c127b64c6bf4 Mon Sep 17 00:00:00 2001 From: minggo Date: Mon, 5 Sep 2011 17:42:08 +0800 Subject: [PATCH] issue #707: require works ok on iOS --- HelloLua/Classes/AppDelegate.cpp | 1 + HelloLua/ios/HelloLua.xcodeproj/project.pbxproj.REMOVED.git-id | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/HelloLua/Classes/AppDelegate.cpp b/HelloLua/Classes/AppDelegate.cpp index c7b75caa4d..dead3fc8a3 100644 --- a/HelloLua/Classes/AppDelegate.cpp +++ b/HelloLua/Classes/AppDelegate.cpp @@ -111,6 +111,7 @@ bool AppDelegate::applicationDidFinishLaunching() #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) string path = CCFileUtils::fullPathFromRelativePath("hello.lua"); + CCScriptEngineManager::sharedScriptEngineManager()->getScriptEngine()->addSearchPath(path.substr(0, path.find_last_of("/")).c_str()); CCScriptEngineManager::sharedScriptEngineManager()->getScriptEngine()->executeScriptFile(path.c_str()); #endif diff --git a/HelloLua/ios/HelloLua.xcodeproj/project.pbxproj.REMOVED.git-id b/HelloLua/ios/HelloLua.xcodeproj/project.pbxproj.REMOVED.git-id index 37d97456bc..4a3c927a20 100644 --- a/HelloLua/ios/HelloLua.xcodeproj/project.pbxproj.REMOVED.git-id +++ b/HelloLua/ios/HelloLua.xcodeproj/project.pbxproj.REMOVED.git-id @@ -1 +1 @@ -5aad4711f8c4040a3bfef0c18ca11e79718ccb0f \ No newline at end of file +0eeb5b0e70a2884281fd6d16e58654dd2012c7ce \ No newline at end of file