electron/atom/app/atom_main_delegate_mac.mm

38 lines
1.2 KiB
Text
Raw Normal View History

// Copyright (c) 2013 GitHub, Inc.
2014-04-25 09:49:37 +00:00
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
2014-03-16 00:30:26 +00:00
#include "atom/app/atom_main_delegate.h"
2014-07-09 09:15:28 +00:00
#include "base/mac/bundle_locations.h"
#include "base/files/file_path.h"
#include "base/path_service.h"
2014-07-09 09:15:28 +00:00
#include "brightray/common/mac/main_application_bundle.h"
#include "content/public/common/content_paths.h"
namespace atom {
namespace {
base::FilePath GetFrameworksPath() {
return brightray::MainApplicationBundlePath().Append("Contents")
.Append("Frameworks");
}
} // namespace
void AtomMainDelegate::OverrideFrameworkBundlePath() {
base::mac::SetOverrideFrameworkBundlePath(
GetFrameworksPath().Append("Atom Framework.framework"));
}
void AtomMainDelegate::OverrideChildProcessPath() {
base::FilePath helper_path = GetFrameworksPath().Append("Atom Helper.app")
.Append("Contents")
.Append("MacOS")
.Append("Atom Helper");
PathService::Override(content::CHILD_PROCESS_EXE, helper_path);
}
} // namespace atom