diff options
author | jrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-04 21:36:39 +0000 |
---|---|---|
committer | jrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-04 21:36:39 +0000 |
commit | 32aa8cc65e23a45c5e20f7ff22aa98ca4935eb0a (patch) | |
tree | 42a9d0af0b8184c526b502330914c29dc35d5f9f | |
parent | 4424ce00b78d59850c447ede156e986bd2e9d912 (diff) | |
download | chromium_src-32aa8cc65e23a45c5e20f7ff22aa98ca4935eb0a.zip chromium_src-32aa8cc65e23a45c5e20f7ff22aa98ca4935eb0a.tar.gz chromium_src-32aa8cc65e23a45c5e20f7ff22aa98ca4935eb0a.tar.bz2 |
Branding of Chrome.app.
To brand, do a "src/tools/gyp/gyp_dogfood -Dbranding=Chrome src/build/all.gyp"
(Then build, of course.)
Review URL: http://codereview.chromium.org/40066
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10920 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | build/common.gypi | 11 | ||||
-rw-r--r-- | chrome/app/app-Info.plist | 2 | ||||
-rw-r--r-- | chrome/chrome.gyp | 38 |
3 files changed, 45 insertions, 6 deletions
diff --git a/build/common.gypi b/build/common.gypi index 9855b6a..dbcf3b4 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -5,11 +5,16 @@ { 'variables': { 'chromium_code%': 0, + 'branding%': 'Chromium', }, 'target_defaults': { - # TODO(bradnelson): This should really be able to be either: - # CHROMIUM_BUILD or GOOGLE_CHROME_BUILD - 'defines': ['CHROMIUM_BUILD'], + 'conditions': [ + ['branding=="Chrome"', { + 'defines': ['GOOGLE_CHROME_BUILD'], + }, { # else: branding!="Chrome" + 'defines': ['CHROMIUM_BUILD'], + }], + ], 'default_configuration': 'Debug', 'configurations': { 'Debug': { diff --git a/chrome/app/app-Info.plist b/chrome/app/app-Info.plist index dce119f..f4a6236 100644 --- a/chrome/app/app-Info.plist +++ b/chrome/app/app-Info.plist @@ -7,7 +7,7 @@ <key>CFBundleExecutable</key> <string>${EXECUTABLE_NAME}</string> <key>CFBundleIconFile</key> - <string>chromium</string> + <string>${PRODUCT_NAME:identifier}</string> <key>CFBundleIdentifier</key> <string>com.google.${PRODUCT_NAME:identifier}</string> <key>CFBundleInfoDictionaryVersion</key> diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index f14c60e..3f7c053 100644 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -1328,7 +1328,6 @@ 'app/nibs/en.lproj/BrowserWindow.xib', 'app/nibs/en.lproj/MainMenu.xib', 'app/nibs/en.lproj/TabContents.xib', - 'app/theme/chromium/chromium.icns', 'app/theme/back.pdf', 'app/theme/forward.pdf', 'app/theme/go.pdf', @@ -1352,7 +1351,16 @@ }, 'conditions': [ ['OS=="mac"', { - 'product_name': 'Chromium', + # 'branding' is a variable defined in common.gypi + # (e.g. "Chromium", "Chrome") + 'product_name': '<(branding)', + 'conditions': [ + ['branding=="Chrome"', { + 'mac_bundle_resources': ['app/theme/google_chrome/chrome.icns'], + }, { # else: branding!="Chrome" + 'mac_bundle_resources': ['app/theme/chromium/chromium.icns'], + }], + ], }], ['OS!="win"', { 'variables': { @@ -1746,4 +1754,30 @@ ], }, ], + # On Mac only, add a project target called "package_app" that only + # runs a shell script (package_chrome.sh). + 'conditions': [ + ['OS=="mac"', + { 'targets': [ + { + 'target_name': 'package_app', + # do NOT place this in the 'all' list; most won't want it. + # In gyp, booleans are 0/1 not True/False. + 'suppress_wildcard': 1, + 'type': 'none', + 'dependencies': [ + 'app', + ], + 'actions': [ + { + 'inputs': [], + 'outputs': [], + 'action_name': 'package_chrome', + 'action': ['tools/mac/package_chrome.sh' ], + }, + ], # 'actions' + }, + ]}, # 'targets' + ], # OS=="mac" + ], # 'conditions' } |