c62c943bdb
Chromium's V8 is using external startup snapshot file while Node does not, so we have to use Chromium's gin for V8 initialization.
32 lines
1,022 B
Text
32 lines
1,022 B
Text
// Copyright (c) 2013 GitHub, Inc.
|
|
// Use of this source code is governed by the MIT license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#include "atom/app/atom_library_main.h"
|
|
|
|
#include "atom/app/atom_main_delegate.h"
|
|
#include "atom/app/node_main.h"
|
|
#include "base/i18n/icu_util.h"
|
|
#include "base/mac/bundle_locations.h"
|
|
#include "brightray/common/mac/main_application_bundle.h"
|
|
#include "content/public/app/content_main.h"
|
|
|
|
#if defined(OS_MACOSX)
|
|
int AtomMain(int argc, const char* argv[]) {
|
|
atom::AtomMainDelegate delegate;
|
|
content::ContentMainParams params(&delegate);
|
|
params.argc = argc;
|
|
params.argv = argv;
|
|
return content::ContentMain(params);
|
|
}
|
|
|
|
int AtomInitializeICUandStartNode(int argc, char *argv[]) {
|
|
base::mac::SetOverrideFrameworkBundlePath(
|
|
brightray::MainApplicationBundlePath()
|
|
.Append("Contents")
|
|
.Append("Frameworks")
|
|
.Append(PRODUCT_NAME " Framework.framework"));
|
|
base::i18n::InitializeICU();
|
|
return atom::NodeMain(argc, argv);
|
|
}
|
|
#endif // OS_MACOSX
|