Skip to content

Commit

Permalink
Use BRANDING settings for IE CEEE. Simplify chrome_dll_version handling.
Browse files Browse the repository at this point in the history
Adding new CEEE_PRODUCT_FULLNAME key to the BRANDING file. Adapting version.h.in to define a preprocessor constant for it. Using this and the other version/product name constants in IE CEEE's .rc files.

Piggybacking on MAD's recent changes to make %NAME% a variable in the .rgs files to fairly easily get the product name from branding in there. Naming the toolband with the product name directly (as it is what shows up in IE's View/Toolbars menu), the BHO with an added "Helper" and the broker with an added "Broker".

Removing the 'chrome_dll_version' target from chrome.gyp, and skipping code generation of chrome_dll_version.rc. Instead we have a source file with that name, that includes the verson.h generated by the 'chrome_version_header' target. This is cleaner and less code generation.

Fixing 'chrome_dll_nacl64' target, it seemed like it wanted to have version information, but it didn't.

Cleaning up the way sources are specified in several of the chrome_tests.gypi targets, to use fewer source! statements just to remove source files that are Windows-only (put them in the Windows-only section instead).

BUG=none
TEST=Visible change should be that user-visible names in Chromium builds are like "Chromium Extensions Execution Environment" (with "Broker" or "Helper" appended when appropriate), i.e. they lose the "Google" part.

Review URL: http://codereview.chromium.org/5360002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67457 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
joi@chromium.org committed Nov 26, 2010
1 parent c54e2fb commit f960aac
Show file tree
Hide file tree
Showing 18 changed files with 116 additions and 156 deletions.
2 changes: 1 addition & 1 deletion ceee/ie/broker/broker.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ATL_NO_VTABLE CeeeBroker
BEGIN_REGISTRY_MAP(CeeeBroker)
REGMAP_UUID("CLSID", CLSID_CeeeBroker)
REGMAP_UUID("LIBID", LIBID_CeeeBrokerLib)
REGMAP_ENTRY("NAME", "Google CEEE Broker")
REGMAP_RESOURCE("NAME", IDS_CEEE_BROKER_NAME)
END_REGISTRY_MAP()

DECLARE_NOT_AGGREGATABLE(CeeeBroker)
Expand Down
7 changes: 4 additions & 3 deletions ceee/ie/broker/broker_module.rc
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ BEGIN
BEGIN
BLOCK "040904e4"
BEGIN
VALUE "CompanyName", "Google Inc."
VALUE "FileDescription", "Internet Explorer User Broker for Google CEEE"
VALUE "CompanyName", COMPANY_FULLNAME_STRING
VALUE "FileDescription", CEEE_PRODUCT_FULLNAME_STRING " Broker"
VALUE "FileVersion", CHROME_VERSION_STRING
VALUE "LegalCopyright", COPYRIGHT_STRING
VALUE "InternalName", "ceee_broker.exe"
VALUE "OriginalFilename", "ceee_broker.exe"
VALUE "ProductName", "Google Chrome Extensions Execution Environment"
VALUE "ProductName", CEEE_PRODUCT_FULLNAME_STRING
VALUE "ProductVersion", CHROME_VERSION_STRING
END
END
Expand Down Expand Up @@ -86,6 +86,7 @@ IDR_BROKER REGISTRY "broker.rgs"
STRINGTABLE
BEGIN
IDS_PROJNAME "ceee_broker"
IDS_CEEE_BROKER_NAME CEEE_PRODUCT_FULLNAME_STRING " Broker"
END

#endif // English (U.S.) resources
Expand Down
3 changes: 2 additions & 1 deletion ceee/ie/broker/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#define IDS_PROJNAME 100
#define IDR_BROKER_MODULE 101
#define IDR_BROKER 102
#define IDS_CEEE_BROKER_NAME 103


// Next default values for new objects
Expand All @@ -23,7 +24,7 @@
#define _APS_NEXT_RESOURCE_VALUE 201
#define _APS_NEXT_COMMAND_VALUE 32768
#define _APS_NEXT_CONTROL_VALUE 201
#define _APS_NEXT_SYMED_VALUE 103
#define _APS_NEXT_SYMED_VALUE 104
#endif
#endif

Expand Down
3 changes: 2 additions & 1 deletion ceee/ie/plugin/bho/bho.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
'../../../../chrome_frame/chrome_frame.gyp:chrome_tab_idl',
# For the vtable patching stuff...
'<(DEPTH)/chrome_frame/chrome_frame.gyp:chrome_frame_ie',
'<(DEPTH)/chrome/chrome.gyp:chrome_version_header',
],
'sources': [
'browser_helper_object.cc',
Expand Down Expand Up @@ -78,7 +79,7 @@
'../../../../chrome/common/extensions/extension_resource.h',
],
'include_dirs': [
# For chrome_tab.h
# For chrome_tab.h and version.h
'<(SHARED_INTERMEDIATE_DIR)',
],
'libraries': [
Expand Down
3 changes: 2 additions & 1 deletion ceee/ie/plugin/bho/browser_helper_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include "ceee/ie/plugin/scripting/userscripts_librarian.h"
#include "ceee/ie/plugin/scripting/content_script_native_api.h"
#include "ceee/ie/plugin/toolband/resource.h"

#include "broker_lib.h" // NOLINT
#include "toolband.h" // NOLINT

Expand All @@ -56,7 +57,7 @@ class ATL_NO_VTABLE BrowserHelperObject
DECLARE_REGISTRY_RESOURCEID_EX(IDR_BROWSERHELPEROBJECT)
BEGIN_REGISTRY_MAP(BrowserHelperObject)
REGMAP_UUID("CLSID", CLSID_BrowserHelperObject)
REGMAP_RESOURCE("NAME", IDS_CEEE_NAME)
REGMAP_RESOURCE("NAME", IDS_CEEE_BHO_NAME)
END_REGISTRY_MAP()

DECLARE_NOT_AGGREGATABLE(BrowserHelperObject)
Expand Down
5 changes: 4 additions & 1 deletion ceee/ie/plugin/scripting/script_host.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@

#include "base/logging.h"
#include "base/string_util.h"
#include "base/stringize_macros.h"
#include "ceee/common/com_utils.h"

#include "version.h" // NOLINT

#ifndef CMDID_SCRIPTSITE_URL

// These are documented in MSDN, but not declared in the platform SDK.
Expand Down Expand Up @@ -523,7 +526,7 @@ STDMETHODIMP ScriptHost::OnScriptErrorDebug(IActiveScriptErrorDebug* err,
// TODO(ericdingle@chromium.org): internationalization
int ret = ::MessageBox(
NULL, L"A script error occured. Do you want to debug?",
L"Google Chrome Extensions Execution Environment",
TO_L_STRING(CEEE_PRODUCT_FULLNAME_STRING),
MB_ICONERROR | MB_SETFOREGROUND | MB_TASKMODAL | MB_YESNO);
*enter_debugger = (ret == IDYES);
*call_on_script_err_when_continuing = FALSE;
Expand Down
17 changes: 11 additions & 6 deletions ceee/ie/plugin/scripting/scripting.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@
'type': 'static_library',
'dependencies': [
'javascript_bindings',
'../../common/common.gyp:ie_common',
'../../common/common.gyp:ie_common_settings',
'../toolband/toolband.gyp:toolband_idl',
'../../../../base/base.gyp:base',
'../../../../ceee/common/common.gyp:ceee_common',
'../../../../ceee/common/common.gyp:initializing_coclass',
'<(DEPTH)/base/base.gyp:base',
'<(DEPTH)/ceee/common/common.gyp:ceee_common',
'<(DEPTH)/ceee/common/common.gyp:initializing_coclass',
'<(DEPTH)/ceee/ie/common/common.gyp:ie_common',
'<(DEPTH)/ceee/ie/common/common.gyp:ie_common_settings',
'<(DEPTH)/ceee/ie/plugin/toolband/toolband.gyp:toolband_idl',
'<(DEPTH)/chrome/chrome.gyp:chrome_version_header',
],
'sources': [
'base.js',
Expand All @@ -38,6 +39,10 @@
'userscripts_librarian.h',
'userscripts_docs.h',
],
'include_dirs': [
# For version.h
'<(SHARED_INTERMEDIATE_DIR)',
],
},
{
'target_name': 'javascript_bindings',
Expand Down
6 changes: 3 additions & 3 deletions ceee/ie/plugin/toolband/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@
#define IDS_CEEE_NAME 109
#define IDS_CEEE_EXECUTOR_CREATOR_NAME 110
#define IDS_CEEE_EXECUTOR_NAME 111

#define IDS_CEEE_BHO_NAME 112

// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 112
#define _APS_NEXT_RESOURCE_VALUE 113
#define _APS_NEXT_COMMAND_VALUE 32768
#define _APS_NEXT_CONTROL_VALUE 201
#define _APS_NEXT_SYMED_VALUE 112
#define _APS_NEXT_SYMED_VALUE 113
#endif
#endif

Expand Down
10 changes: 5 additions & 5 deletions ceee/ie/plugin/toolband/toolband.rc
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,14 @@ BEGIN
BEGIN
BLOCK "040904e4"
BEGIN
VALUE "CompanyName", "Google Inc."
VALUE "FileDescription", "Google Chrome Extensions Execution Environment for IE."
VALUE "CompanyName", COMPANY_FULLNAME_STRING
VALUE "FileDescription", CEEE_PRODUCT_FULLNAME_STRING
VALUE "FileVersion", CHROME_VERSION_STRING
VALUE "LegalCopyright", COPYRIGHT_STRING
VALUE "InternalName", "ceee_ie.dll"
VALUE "OriginalFilename", "ceee_ie.dll"
VALUE "ProductName", "Google Chrome Extensions Execution Environment"
VALUE "ProductName", CEEE_PRODUCT_FULLNAME_STRING
VALUE "ProductVersion", CHROME_VERSION_STRING

END
END
BLOCK "VarFileInfo"
Expand Down Expand Up @@ -98,9 +97,10 @@ IDR_GREASEMONKEY_API_JS BINDATA "chrome\\renderer\\resources\\gr
STRINGTABLE
BEGIN
IDS_PROJNAME "IE"
IDS_CEEE_NAME "Google Chrome Extensions Execution Environment"
IDS_CEEE_NAME CEEE_PRODUCT_FULLNAME_STRING
IDS_CEEE_EXECUTOR_CREATOR_NAME "Google CEEE Executor Creator"
IDS_CEEE_EXECUTOR_NAME "Google CEEE Executor"
IDS_CEEE_BHO_NAME CEEE_PRODUCT_FULLNAME_STRING " Helper"
END

#endif // English (U.S.) resources
Expand Down
2 changes: 0 additions & 2 deletions chrome/app/chrome_dll.rc
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,6 @@ BEGIN
"\0"
END

#else // APSTUDIO_INVOKED
#include "chrome_dll_version.rc"
#endif // APSTUDIO_INVOKED

/////////////////////////////////////////////////////////////////////////////
Expand Down
44 changes: 44 additions & 0 deletions chrome/app/chrome_dll_version.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Copyright (c) 2010 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.

#include <verrsrc.h>

#include "version.h"

VS_VERSION_INFO VERSIONINFO
FILEVERSION CHROME_VERSION
PRODUCTVERSION CHROME_VERSION
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", COMPANY_FULLNAME_STRING
VALUE "FileDescription", PRODUCT_FULLNAME_STRING
VALUE "FileVersion", CHROME_VERSION_STRING
VALUE "InternalName", "chrome_dll"
VALUE "LegalCopyright", COPYRIGHT_STRING
VALUE "OriginalFilename", "chrome.dll"
VALUE "ProductName", PRODUCT_FULLNAME_STRING
VALUE "ProductVersion", CHROME_VERSION_STRING
VALUE "CompanyShortName", COMPANY_SHORTNAME_STRING
VALUE "ProductShortName", PRODUCT_SHORTNAME_STRING
VALUE "LastChange", LASTCHANGE_STRING
VALUE "Official Build", OFFICIAL_BUILD_STRING
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
41 changes: 0 additions & 41 deletions chrome/app/chrome_dll_version.rc.version

This file was deleted.

3 changes: 2 additions & 1 deletion chrome/app/theme/chromium/BRANDING
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ COMPANY_FULLNAME=The Chromium Authors
COMPANY_SHORTNAME=The Chromium Authors
PRODUCT_FULLNAME=Chromium
PRODUCT_SHORTNAME=Chromium
COPYRIGHT=Copyright (C) 2006-2009 The Chromium Authors. All Rights Reserved.
CEEE_PRODUCT_FULLNAME=Chromium Extensions Execution Environment
COPYRIGHT=Copyright (C) 2006-2010 The Chromium Authors. All Rights Reserved.
54 changes: 1 addition & 53 deletions chrome/chrome.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -1677,62 +1677,10 @@
}],
],
},
{
'target_name': 'chrome_dll_version',
'type': 'none',
#'msvs_guid': '414D4D24-5D65-498B-A33F-3A29AD3CDEDC',
'dependencies': [
'../build/util/build_util.gyp:lastchange',
],
'direct_dependent_settings': {
'include_dirs': [
'<(SHARED_INTERMEDIATE_DIR)/chrome_dll_version',
],
},
'actions': [
{
'action_name': 'version',
'variables': {
'lastchange_path':
'<(SHARED_INTERMEDIATE_DIR)/build/LASTCHANGE',
'template_input_path': 'app/chrome_dll_version.rc.version',
},
'conditions': [
[ 'branding == "Chrome"', {
'variables': {
'branding_path': 'app/theme/google_chrome/BRANDING',
},
}, { # else branding!="Chrome"
'variables': {
'branding_path': 'app/theme/chromium/BRANDING',
},
}],
],
'inputs': [
'<(template_input_path)',
'<(version_path)',
'<(branding_path)',
'<(lastchange_path)',
],
'outputs': [
'<(SHARED_INTERMEDIATE_DIR)/chrome_dll_version/chrome_dll_version.rc',
],
'action': [
'python',
'<(version_py_path)',
'-f', '<(version_path)',
'-f', '<(branding_path)',
'-f', '<(lastchange_path)',
'<(template_input_path)',
'<@(_outputs)',
],
'message': 'Generating version information in <(_outputs)'
},
],
},
{
'target_name': 'chrome_version_header',
'type': 'none',
'hard_dependency': 1,
'dependencies': [
'../build/util/build_util.gyp:lastchange',
],
Expand Down
Loading

0 comments on commit f960aac

Please sign in to comment.