mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
Release build uses the bundle resource as the load path
This commit is contained in:
@@ -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\"",
|
||||
|
||||
@@ -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);
|
||||
}];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user