Release build uses the bundle resource as the load path

This commit is contained in:
Corey Johnson
2012-03-29 15:24:13 -07:00
parent d289034049
commit 6cf1744c82
2 changed files with 8 additions and 4 deletions

View File

@@ -865,7 +865,6 @@
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
GCC_OPTIMIZATION_LEVEL = 3;
GCC_PREPROCESSOR_DEFINITIONS = (
"PROJECT_DIR=\"\\\"$PROJECT_DIR\\\"\"",
"\"CHROMIUM_BUILD\"",
"\"ENABLE_REMOTING=1\"",
"\"ENABLE_P2P_APIS=1\"",

View File

@@ -81,7 +81,6 @@
callback(context, global);
context->Exit();
}
- (CefRefPtr<CefV8Context>)atomContext {
@@ -108,8 +107,14 @@
CefRefPtr<CefV8Value> atom = CefV8Value::CreateObject(NULL);
global->SetValue("atom", atom, V8_PROPERTY_ATTRIBUTE_NONE);
CefRefPtr<CefV8Value> loadPath = CefV8Value::CreateString(PROJECT_DIR);
#ifdef DEBUG
char path[] = PROJECT_DIR;
#else
const char *path = [[[NSBundle mainBundle] resourcePath] UTF8String];
#endif
CefRefPtr<CefV8Value> loadPath = CefV8Value::CreateString(path);
atom->SetValue("loadPath", loadPath, V8_PROPERTY_ATTRIBUTE_NONE);
}];
}