Skip to content

Commit

Permalink
[Mac] Move the lists of XIB files into a gypi file.
Browse files Browse the repository at this point in the history
This creates lists of XIB files that Chromium has. It also lays the groundwork
for editing XIB files on Xcode 4.4 by creating a fake project for working in
Xcode.

BUG=149763
TEST=No changes in build output.
TBR=mark@chromium.org

Review URL: https://codereview.chromium.org/10918254

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157199 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
rsesek@chromium.org committed Sep 17, 2012
1 parent 5258a87 commit 01223ea
Show file tree
Hide file tree
Showing 5 changed files with 349 additions and 96 deletions.
17 changes: 17 additions & 0 deletions build/mac/edit_xibs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# This script is a convenience to run GYP for /src/chrome/chrome_nibs.gyp
# with the Xcode generator (as you likely use ninja). Documentation:
# http://dev.chromium.org/developers/design-documents/mac-xib-files

set -e

RELSRC=$(dirname "$0")/../..
SRC=$(cd "$RELSRC" && pwd)
GYP_GENERATORS=xcode python "$SRC/tools/gyp/gyp" "$SRC/chrome/chrome_nibs.gyp"
echo "You can now edit XIB files in Xcode using:"
echo " $SRC/chrome/chrome_nibs.xcodeproj"
50 changes: 5 additions & 45 deletions chrome/chrome_browser_ui.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -2455,61 +2455,21 @@
'variables': {
'xib_localizer_tool_path':
'tools/build/mac/generate_localizer',
'xib_files_to_scan': [
# The xibs that need localization
'app/nibs/AvatarMenuItem.xib',
'app/nibs/BookmarkAllTabs.xib',
'app/nibs/BookmarkBar.xib',
'app/nibs/BookmarkBubble.xib',
'app/nibs/BookmarkEditor.xib',
'app/nibs/BookmarkNameFolder.xib',
'app/nibs/BrowserWindow.xib',
'app/nibs/ChromeToMobileBubble.xib',
'app/nibs/CollectedCookies.xib',
'app/nibs/ContentBlockedCookies.xib',
'app/nibs/ContentBlockedImages.xib',
'app/nibs/ContentBlockedJavaScript.xib',
'app/nibs/ContentBlockedMixedScript.xib',
'app/nibs/ContentBlockedPlugins.xib',
'app/nibs/ContentBlockedPopups.xib',
'app/nibs/ContentBlockedGeolocation.xib',
'app/nibs/ContentProtocolHandlers.xib',
'app/nibs/CookieDetailsView.xib',
'app/nibs/DownloadItem.xib',
'app/nibs/DownloadShelf.xib',
'app/nibs/EditSearchEngine.xib',
'app/nibs/ExtensionInstallPrompt.xib',
'app/nibs/ExtensionInstallPromptBundle.xib',
'app/nibs/ExtensionInstallPromptInline.xib',
'app/nibs/ExtensionInstallPromptNoWarnings.xib',
'app/nibs/ExtensionInstalledBubble.xib',
'app/nibs/FirstRunBubble.xib',
'app/nibs/FirstRunDialog.xib',
'app/nibs/FullscreenExitBubble.xib',
'app/nibs/HttpAuthLoginSheet.xib',
'app/nibs/HungRendererDialog.xib',
'app/nibs/ImportProgressDialog.xib',
'app/nibs/MainMenu.xib',
'app/nibs/OneClickSigninBubble.xib',
'app/nibs/SadTab.xib',
'app/nibs/SaveAccessoryView.xib',
'app/nibs/SpeechRecognitionBubble.xib',
'app/nibs/TaskManager.xib',
'app/nibs/Toolbar.xib',
'app/nibs/WrenchMenu.xib',
],
},
'includes': [
'chrome_nibs.gypi',
],
'action_name': 'Process xibs for localization',
'inputs': [
'<(xib_localizer_tool_path)',
'<@(xib_files_to_scan)',
'<@(mac_translated_xibs)',
],
'outputs': [
'<(INTERMEDIATE_DIR)/ui_localizer_table.h',
],
'action': ['<(xib_localizer_tool_path)',
'<@(_outputs)',
'<@(xib_files_to_scan)'],
'<@(mac_translated_xibs)'],
},
],
}],
Expand Down
55 changes: 4 additions & 51 deletions chrome/chrome_dll.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@
'include_dirs': [
'<(grit_out_dir)',
],
'includes': [
'chrome_nibs.gypi',
],
# TODO(mark): Come up with a fancier way to do this. It should
# only be necessary to list framework-Info.plist once, not the
# three times it is listed here.
Expand All @@ -228,57 +231,7 @@
'app/theme/default_100_percent/<(theme_dir_name)/product_logo_32.png',

'app/framework-Info.plist',
'app/nibs/AboutIPC.xib',
'app/nibs/AvatarMenuItem.xib',
'app/nibs/BookmarkAllTabs.xib',
'app/nibs/BookmarkBar.xib',
'app/nibs/BookmarkBarFolderWindow.xib',
'app/nibs/BookmarkBubble.xib',
'app/nibs/BookmarkEditor.xib',
'app/nibs/BookmarkNameFolder.xib',
'app/nibs/BrowserWindow.xib',
'app/nibs/ChromeToMobileBubble.xib',
'app/nibs/CollectedCookies.xib',
'app/nibs/CookieDetailsView.xib',
'app/nibs/ContentBlockedCookies.xib',
'app/nibs/ContentBlockedImages.xib',
'app/nibs/ContentBlockedJavaScript.xib',
'app/nibs/ContentBlockedMixedScript.xib',
'app/nibs/ContentBlockedPlugins.xib',
'app/nibs/ContentBlockedPopups.xib',
'app/nibs/ContentBlockedGeolocation.xib',
'app/nibs/ContentProtocolHandlers.xib',
'app/nibs/DownloadItem.xib',
'app/nibs/DownloadShelf.xib',
'app/nibs/EditSearchEngine.xib',
'app/nibs/ExtensionInstallPrompt.xib',
'app/nibs/ExtensionInstallPromptBundle.xib',
'app/nibs/ExtensionInstallPromptInline.xib',
'app/nibs/ExtensionInstallPromptNoWarnings.xib',
'app/nibs/ExtensionInstalledBubble.xib',
'app/nibs/ExtensionInstalledBubbleBundle.xib',
'app/nibs/FindBar.xib',
'app/nibs/FirstRunBubble.xib',
'app/nibs/FirstRunDialog.xib',
'app/nibs/FullscreenExitBubble.xib',
'app/nibs/GlobalErrorBubble.xib',
'app/nibs/HungRendererDialog.xib',
'app/nibs/HttpAuthLoginSheet.xib',
'app/nibs/ImportProgressDialog.xib',
'app/nibs/InfoBar.xib',
'app/nibs/InfoBarContainer.xib',
'app/nibs/MainMenu.xib',
'app/nibs/Notification.xib',
'app/nibs/OneClickSigninBubble.xib',
'app/nibs/Panel.xib',
'app/nibs/PreviewableContents.xib',
'app/nibs/SaveAccessoryView.xib',
'app/nibs/SadTab.xib',
'app/nibs/SpeechRecognitionBubble.xib',
'app/nibs/TabView.xib',
'app/nibs/TaskManager.xib',
'app/nibs/Toolbar.xib',
'app/nibs/WrenchMenu.xib',
'<@(mac_all_xibs)',
'app/theme/balloon_wrench.pdf',
'app/theme/chevron.pdf',
'app/theme/find_next_Template.pdf',
Expand Down
Loading

0 comments on commit 01223ea

Please sign in to comment.