2014-10-31 11:17:05 -07:00
|
|
|
// Copyright (c) 2013 GitHub, Inc.
|
2014-04-25 17:49:37 +08:00
|
|
|
// Use of this source code is governed by the MIT license that can be
|
2013-04-12 09:46:58 +08:00
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2014-03-16 08:30:26 +08:00
|
|
|
#include "atom/app/atom_library_main.h"
|
2013-04-12 09:46:58 +08:00
|
|
|
|
2014-03-16 08:30:26 +08:00
|
|
|
#include "atom/app/atom_main_delegate.h"
|
2015-03-12 17:03:16 -07:00
|
|
|
#include "atom/app/node_main.h"
|
2015-03-12 18:26:10 -07:00
|
|
|
#include "base/at_exit.h"
|
2015-01-16 15:54:38 -08:00
|
|
|
#include "base/i18n/icu_util.h"
|
|
|
|
#include "base/mac/bundle_locations.h"
|
|
|
|
#include "brightray/common/mac/main_application_bundle.h"
|
2013-04-12 09:46:58 +08:00
|
|
|
#include "content/public/app/content_main.h"
|
|
|
|
|
2013-07-01 22:21:31 +08:00
|
|
|
#if defined(OS_MACOSX)
|
2013-04-12 09:46:58 +08:00
|
|
|
int AtomMain(int argc, const char* argv[]) {
|
|
|
|
atom::AtomMainDelegate delegate;
|
2014-06-30 11:44:05 +08:00
|
|
|
content::ContentMainParams params(&delegate);
|
|
|
|
params.argc = argc;
|
|
|
|
params.argv = argv;
|
|
|
|
return content::ContentMain(params);
|
2013-04-12 09:46:58 +08:00
|
|
|
}
|
2015-01-16 15:54:38 -08:00
|
|
|
|
2015-03-12 17:03:16 -07:00
|
|
|
int AtomInitializeICUandStartNode(int argc, char *argv[]) {
|
2015-03-12 18:26:10 -07:00
|
|
|
base::AtExitManager atexit_manager;
|
2015-01-16 15:54:38 -08:00
|
|
|
base::mac::SetOverrideFrameworkBundlePath(
|
|
|
|
brightray::MainApplicationBundlePath()
|
|
|
|
.Append("Contents")
|
|
|
|
.Append("Frameworks")
|
|
|
|
.Append(PRODUCT_NAME " Framework.framework"));
|
|
|
|
base::i18n::InitializeICU();
|
2015-03-12 17:03:16 -07:00
|
|
|
return atom::NodeMain(argc, argv);
|
2015-01-16 15:54:38 -08:00
|
|
|
}
|
2013-07-01 22:21:31 +08:00
|
|
|
#endif // OS_MACOSX
|