Determine the Helper name from the App name
This commit is contained in:
parent
6d32db32ef
commit
3d4491a468
1 changed files with 14 additions and 4 deletions
|
@ -19,18 +19,28 @@ base::FilePath GetFrameworksPath() {
|
||||||
.Append("Frameworks");
|
.Append("Frameworks");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string GetApplicationName() {
|
||||||
|
std::string name = brightray::MainApplicationBundlePath().BaseName().AsUTF8Unsafe();
|
||||||
|
return name.substr(0, name.length() - 4/*.app*/);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
void AtomMainDelegate::OverrideFrameworkBundlePath() {
|
void AtomMainDelegate::OverrideFrameworkBundlePath() {
|
||||||
base::mac::SetOverrideFrameworkBundlePath(
|
base::FilePath bundlePath = GetFrameworksPath();
|
||||||
GetFrameworksPath().Append("Atom Framework.framework"));
|
std::string app_name = GetApplicationName();
|
||||||
|
|
||||||
|
base::mac::SetOverrideFrameworkBundlePath(bundlePath
|
||||||
|
.Append(app_name + " Framework.framework"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void AtomMainDelegate::OverrideChildProcessPath() {
|
void AtomMainDelegate::OverrideChildProcessPath() {
|
||||||
base::FilePath helper_path = GetFrameworksPath().Append("Atom Helper.app")
|
std::string app_name = GetApplicationName();
|
||||||
|
|
||||||
|
base::FilePath helper_path = GetFrameworksPath().Append(app_name + " Helper.app")
|
||||||
.Append("Contents")
|
.Append("Contents")
|
||||||
.Append("MacOS")
|
.Append("MacOS")
|
||||||
.Append("Atom Helper");
|
.Append(app_name + " Helper");
|
||||||
PathService::Override(content::CHILD_PROCESS_EXE, helper_path);
|
PathService::Override(content::CHILD_PROCESS_EXE, helper_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue