зеркало из https://github.com/electron/electron.git
Currently set base bundle ID
This commit is contained in:
Родитель
d2a567d6ab
Коммит
deddf98533
|
@ -83,6 +83,10 @@ bool AtomMainDelegate::BasicStartupComplete(int* exit_code) {
|
|||
|
||||
chrome::RegisterPathProvider();
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
SetUpBundleOverrides();
|
||||
#endif
|
||||
|
||||
return brightray::MainDelegate::BasicStartupComplete(exit_code);
|
||||
}
|
||||
|
||||
|
|
|
@ -31,6 +31,10 @@ class AtomMainDelegate : public brightray::MainDelegate {
|
|||
#endif
|
||||
|
||||
private:
|
||||
#if defined(OS_MACOSX)
|
||||
void SetUpBundleOverrides();
|
||||
#endif
|
||||
|
||||
brightray::ContentClient content_client_;
|
||||
scoped_ptr<content::ContentBrowserClient> browser_client_;
|
||||
scoped_ptr<content::ContentRendererClient> renderer_client_;
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
#include "base/mac/bundle_locations.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/mac/foundation_util.h"
|
||||
#include "base/mac/scoped_nsautorelease_pool.h"
|
||||
#include "base/path_service.h"
|
||||
#include "brightray/common/application_info.h"
|
||||
#include "brightray/common/mac/main_application_bundle.h"
|
||||
|
@ -48,4 +50,10 @@ void AtomMainDelegate::OverrideChildProcessPath() {
|
|||
PathService::Override(content::CHILD_PROCESS_EXE, helper_path);
|
||||
}
|
||||
|
||||
void AtomMainDelegate::SetUpBundleOverrides() {
|
||||
base::mac::ScopedNSAutoreleasePool pool;
|
||||
NSBundle* base_bundle = brightray::MainApplicationBundle();
|
||||
base::mac::SetBaseBundleID([[base_bundle bundleIdentifier] UTF8String]);
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
|
|
Загрузка…
Ссылка в новой задаче