Implement main function on Windows.
This commit is contained in:
parent
1b93ec1032
commit
59ba3f1025
4 changed files with 36 additions and 0 deletions
|
@ -7,7 +7,9 @@
|
|||
#include "app/atom_main_delegate.h"
|
||||
#include "content/public/app/content_main.h"
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
int AtomMain(int argc, const char* argv[]) {
|
||||
atom::AtomMainDelegate delegate;
|
||||
return content::ContentMain(argc, argv, &delegate);
|
||||
}
|
||||
#endif // OS_MACOSX
|
||||
|
|
|
@ -5,9 +5,13 @@
|
|||
#ifndef ATOM_APP_ATOM_LIBRARY_MAIN_
|
||||
#define ATOM_APP_ATOM_LIBRARY_MAIN_
|
||||
|
||||
#include "base/basictypes.h"
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
extern "C" {
|
||||
__attribute__((visibility("default")))
|
||||
int AtomMain(int argc, const char* argv[]);
|
||||
}
|
||||
#endif // OS_MACOSX
|
||||
|
||||
#endif // ATOM_APP_ATOM_LIBRARY_MAIN_
|
||||
|
|
|
@ -2,8 +2,27 @@
|
|||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "content/public/app/content_main.h"
|
||||
|
||||
#if defined(OS_WIN)
|
||||
|
||||
#include "app/atom_main_delegate.h"
|
||||
#include "content/public/app/startup_helper_win.h"
|
||||
#include "sandbox/win/src/sandbox_types.h"
|
||||
|
||||
int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t*, int) {
|
||||
sandbox::SandboxInterfaceInfo sandbox_info = {0};
|
||||
content::InitializeSandboxInfo(&sandbox_info);
|
||||
atom::AtomMainDelegate delegate;
|
||||
return content::ContentMain(instance, &sandbox_info, &delegate);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#include "app/atom_library_main.h"
|
||||
|
||||
int main(int argc, const char* argv[]) {
|
||||
return AtomMain(argc, argv);
|
||||
}
|
||||
|
||||
#endif // OS_WIN
|
||||
|
|
11
atom.gyp
11
atom.gyp
|
@ -252,6 +252,14 @@
|
|||
'.',
|
||||
'vendor',
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'include_dirs': [
|
||||
'.',
|
||||
],
|
||||
},
|
||||
'export_dependent_settings': [
|
||||
'vendor/brightray/brightray.gyp:brightray',
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'generated_sources',
|
||||
|
@ -297,6 +305,9 @@
|
|||
'vendor',
|
||||
'<(libchromiumcontent_include_dir)',
|
||||
],
|
||||
'export_dependent_settings': [
|
||||
'<(project_name)_lib',
|
||||
],
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
|
||||
|
|
Loading…
Add table
Reference in a new issue