Implement login helper to manage login item in Mac App Store build
This commit is contained in:
parent
306b627090
commit
4119da607f
9 changed files with 123 additions and 17 deletions
40
electron.gyp
40
electron.gyp
|
@ -122,6 +122,19 @@
|
|||
},
|
||||
],
|
||||
}],
|
||||
['mas_build==1', {
|
||||
'dependencies': [
|
||||
'<(project_name)_login_helper',
|
||||
],
|
||||
'copies': [
|
||||
{
|
||||
'destination': '<(PRODUCT_DIR)/<(product_name).app/Contents/Library/LoginItems',
|
||||
'files': [
|
||||
'<(PRODUCT_DIR)/<(product_name) Login Helper.app',
|
||||
],
|
||||
},
|
||||
],
|
||||
}],
|
||||
],
|
||||
}], # OS!="mac"
|
||||
['OS=="win"', {
|
||||
|
@ -566,6 +579,7 @@
|
|||
'$(SDKROOT)/System/Library/Frameworks/Quartz.framework',
|
||||
'$(SDKROOT)/System/Library/Frameworks/Security.framework',
|
||||
'$(SDKROOT)/System/Library/Frameworks/SecurityInterface.framework',
|
||||
'$(SDKROOT)/System/Library/Frameworks/ServiceManagement.framework',
|
||||
],
|
||||
},
|
||||
'mac_bundle': 1,
|
||||
|
@ -684,6 +698,32 @@
|
|||
],
|
||||
},
|
||||
}, # target helper
|
||||
{
|
||||
'target_name': '<(project_name)_login_helper',
|
||||
'product_name': '<(product_name) Login Helper',
|
||||
'type': 'executable',
|
||||
'sources': [
|
||||
'<@(login_helper_sources)',
|
||||
],
|
||||
'include_dirs': [
|
||||
'.',
|
||||
'vendor',
|
||||
'<(libchromiumcontent_src_dir)',
|
||||
],
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
|
||||
],
|
||||
},
|
||||
'mac_bundle': 1,
|
||||
'xcode_settings': {
|
||||
'ATOM_BUNDLE_ID': 'com.<(company_abbr).<(project_name).loginhelper',
|
||||
'INFOPLIST_FILE': 'atom/app/resources/mac/loginhelper-Info.plist',
|
||||
'OTHER_LDFLAGS': [
|
||||
'-ObjC',
|
||||
],
|
||||
},
|
||||
}, # target login_helper
|
||||
],
|
||||
}], # OS!="mac"
|
||||
],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue