Browse Source

mac: Generate Info.plist from gyp variables

Cheng Zhao 10 years ago
parent
commit
e04c58f398

+ 6 - 1
atom.gyp

@@ -2,7 +2,9 @@
   'variables': {
     'project_name%': 'atom',
     'product_name%': 'Atom',
-    'version%': '0.23.0',
+    'company_name%': 'GitHub, Inc',
+    'company_abbr%': 'github',
+    'version%' : '0.23.0',
 
     'atom_source_root': '<!(["python", "tools/atom_source_root.py"])',
   },
@@ -45,6 +47,7 @@
             '<(project_name)_helper',
           ],
           'xcode_settings': {
+            'ATOM_BUNDLE_ID': 'com.<(company_abbr).<(project_name)',
             'INFOPLIST_FILE': 'atom/browser/resources/mac/Info.plist',
             'LD_RUNPATH_SEARCH_PATHS': [
               '@executable_path/../Frameworks',
@@ -395,6 +398,7 @@
             '<(libchromiumcontent_dir)/snapshot_blob.bin',
           ],
           'xcode_settings': {
+            'ATOM_BUNDLE_ID': 'com.<(company_abbr).<(project_name).framework',
             'INFOPLIST_FILE': 'atom/common/resources/mac/Info.plist',
             'LD_DYLIB_INSTALL_NAME': '@rpath/<(product_name) Framework.framework/<(product_name) Framework',
             'LD_RUNPATH_SEARCH_PATHS': [
@@ -472,6 +476,7 @@
           ],
           'mac_bundle': 1,
           'xcode_settings': {
+            'ATOM_BUNDLE_ID': 'com.<(company_abbr).<(project_name).helper',
             'INFOPLIST_FILE': 'atom/renderer/resources/mac/Info.plist',
             'LD_RUNPATH_SEARCH_PATHS': [
               '@executable_path/../../..',

+ 1 - 1
atom/browser/resources/mac/Info.plist

@@ -7,7 +7,7 @@
   <key>CFBundleExecutable</key>
   <string>${PRODUCT_NAME}</string>
   <key>CFBundleIdentifier</key>
-  <string>com.github.atom-shell</string>
+  <string>${ATOM_BUNDLE_ID}</string>
   <key>CFBundleInfoDictionaryVersion</key>
   <string>6.0</string>
   <key>CFBundleName</key>

+ 3 - 3
atom/common/resources/mac/Info.plist

@@ -3,11 +3,11 @@
 <plist version="1.0">
 <dict>
 	<key>CFBundleExecutable</key>
-	<string>Atom Framework</string>
+	<string>${PRODUCT_NAME} Framework</string>
 	<key>CFBundleIdentifier</key>
-	<string>com.github.AtomFramework</string>
+	<string>${ATOM_BUNDLE_ID}</string>
 	<key>CFBundleName</key>
-	<string>Atom Framework</string>
+	<string>${PRODUCT_NAME} Framework</string>
 	<key>CFBundlePackageType</key>
 	<string>FMWK</string>
 	<key>NSSupportsAutomaticGraphicsSwitching</key>

+ 10 - 10
atom/renderer/resources/mac/Info.plist

@@ -2,15 +2,15 @@
 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <dict>
-	<key>CFBundleIdentifier</key>
-	<string>com.github.atom-shell.helper</string>
-	<key>CFBundleName</key>
-	<string>${PRODUCT_NAME}</string>
-	<key>CFBundlePackageType</key>
-	<string>APPL</string>
-	<key>LSUIElement</key>
-	<true/>
-	<key>NSSupportsAutomaticGraphicsSwitching</key>
-	<true/>
+  <key>CFBundleIdentifier</key>
+  <string>${ATOM_BUNDLE_ID}</string>
+  <key>CFBundleName</key>
+  <string>${PRODUCT_NAME}</string>
+  <key>CFBundlePackageType</key>
+  <string>APPL</string>
+  <key>LSUIElement</key>
+  <true/>
+  <key>NSSupportsAutomaticGraphicsSwitching</key>
+  <true/>
 </dict>
 </plist>