summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-05 19:26:07 +0000
committermark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-05 19:26:07 +0000
commite14a9f93c4ca927334008eb83127e1fb7598fe1c (patch)
treefa724e9008c20f9734084f6758625045e6f59452
parent7fa319410e5dbc1739e476f317a33e0ab276a94a (diff)
downloadchromium_src-e14a9f93c4ca927334008eb83127e1fb7598fe1c.zip
chromium_src-e14a9f93c4ca927334008eb83127e1fb7598fe1c.tar.gz
chromium_src-e14a9f93c4ca927334008eb83127e1fb7598fe1c.tar.bz2
Move the entire application into a dylib (framework)
Review URL: http://codereview.chromium.org/160538 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22506 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--build/common.gypi95
-rwxr-xr-xbuild/mac/dump_app_syms31
-rwxr-xr-xbuild/mac/strip_save_dsym27
-rw-r--r--chrome/app/chrome_dll_main.cc25
-rw-r--r--chrome/app/chrome_exe_main.mm25
-rw-r--r--chrome/chrome.gyp385
6 files changed, 357 insertions, 231 deletions
diff --git a/build/common.gypi b/build/common.gypi
index 20887c3..13178ba 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -13,6 +13,31 @@
# Variables expected to be overriden on the GYP command line (-D) or by
# ~/.gyp/include.gypi.
+ # Putting a variables dict inside another variables dict looks kind of
+ # weird. This is done so that "branding" and "buildtype" are defined as
+ # variables within the outer variables dict here. This is necessary
+ # to get these variables defined for the conditions within this variables
+ # dict that operate on these variables.
+ 'variables': {
+ # Override branding to select the desired branding flavor.
+ 'branding%': 'Chromium',
+
+ # Override buildtype to select the desired build flavor.
+ # Dev - everyday build for development/testing
+ # Official - release build (generally implies additional processing)
+ # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
+ # conversion is done), some of the things which are now controlled by
+ # 'branding', such as symbol generation, will need to be refactored based
+ # on 'buildtype' (i.e. we don't care about saving symbols for non-Official
+ # builds).
+ 'buildtype%': 'Dev',
+ },
+
+ # Define branding and buildtype on the basis of their settings within the
+ # variables sub-dict above, unless overridden.
+ 'branding%': '<(branding)',
+ 'buildtype%': '<(buildtype)',
+
# Override chromium_mac_pch and set it to 0 to suppress the use of
# precompiled headers on the Mac. Prefix header injection may still be
# used, but prefix headers will not be precompiled. This is useful when
@@ -23,19 +48,6 @@
# Linux-Mac cross compiler distcc farm.
'chromium_mac_pch%': 1,
- # Override branding to select the desired branding flavor.
- 'branding%': 'Chromium',
-
- # Override buildtype to select the desired build flavor.
- # Dev - everyday build for development/testing
- # Official - release build (generally implies additional processing)
- # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
- # conversion is done), some of the things which are now controlled by
- # 'branding', such as symbol generation, will need to be refactored based
- # on 'buildtype' (i.e. we don't care about saving symbols for non-Official
- # builds).
- 'buildtype%': 'Dev',
-
# Set to 1 to enable code coverage. In addition to build changes
# (e.g. extra CFLAGS), also creates a new target in the src/chrome
# project file called "coverage".
@@ -104,6 +116,31 @@
'linux_sandbox_chrome_path%': '/opt/google/chrome/chrome',
'conditions': [
+ ['OS=="mac"', {
+ 'conditions': [
+ # mac_product_name is set to the name of the .app bundle as it should
+ # appear on disk. This duplicates data from
+ # chrome/app/theme/chromium/BRANDING and
+ # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
+ # these names into the build system.
+ ['branding=="Chrome"', {
+ 'mac_product_name%': 'Google Chrome',
+ }, { # else: branding!="Chrome"
+ 'mac_product_name%': 'Chromium',
+ }],
+
+ # Feature variables for enabling Mac Breakpad and Keystone auto-update
+ # support. Both features are on by default in official builds with
+ # Chrome branding.
+ ['branding=="Chrome" and buildtype=="Official"', {
+ 'mac_breakpad%': 1,
+ 'mac_keystone%': 1,
+ }, { # else: branding!="Chrome" or buildtype!="Official"
+ 'mac_breakpad%': 0,
+ 'mac_keystone%': 0,
+ }],
+ ],
+ }], # OS=="mac"
# Whether to use multiple cores to compile with visual studio. This is
# optional because it sometimes causes corruption on VS 2005.
# It is on by default on VS 2008 and off on VS 2005.
@@ -514,7 +551,7 @@
['_mac_bundle', {
'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
}],
- ['_type=="executable"', {
+ ['_type=="executable" or _type=="shared_library"', {
'target_conditions': [
['mac_real_dsym == 1', {
# To get a real .dSYM bundle produced by dsymutil, set the
@@ -527,9 +564,19 @@
'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
'DEPLOYMENT_POSTPROCESSING': 'YES',
'STRIP_INSTALLED_PRODUCT': 'YES',
- },
- },
- },
+ 'target_conditions': [
+ ['_type=="shared_library"', {
+ # The Xcode default is to strip debugging symbols
+ # only (-S). Local symbols should be stripped as
+ # well, which will be handled by -x. Xcode will
+ # continue to insert -S when stripping even when
+ # additional flags are added with STRIPFLAGS.
+ 'STRIPFLAGS': '-x',
+ }], # _type=="shared_library"
+ ], # target_conditions
+ }, # xcode_settings
+ }, # configuration "Release"
+ }, # configurations
}, { # mac_real_dsym != 1
# To get a fast fake .dSYM bundle, use a post-build step to
# produce the .dSYM and strip the executable. strip_from_xcode
@@ -545,13 +592,13 @@
'postbuild_name': 'Strip If Needed',
'action': ['<(strip_from_xcode_path)'],
},
- ],
- }],
- ],
- }],
- ],
- },
- }],
+ ], # postbuilds
+ }], # mac_real_dsym
+ ], # target_conditions
+ }], # _type=="executable" or _type=="shared_library"
+ ], # target_conditions
+ }, # target_defaults
+ }], # OS=="mac"
['OS=="win"', {
'target_defaults': {
'defines': [
diff --git a/build/mac/dump_app_syms b/build/mac/dump_app_syms
index 044e172..cd6e626 100755
--- a/build/mac/dump_app_syms
+++ b/build/mac/dump_app_syms
@@ -30,19 +30,32 @@ FULL_VERSION="${MAJOR}.${MINOR}.${BUILD}.${PATCH}"
SRC_APP_PATH="${BUILT_PRODUCTS_DIR}/${SRC_APP_NAME}.app"
# Created by the build/mac/strip_from_xcode script.
UNSTRIPPED_APP="${SRC_APP_PATH}.dSYM/Contents/Resources/DWARF/${SRC_APP_NAME}"
-SYMBOL_FILE="${BUILT_PRODUCTS_DIR}/${SRC_APP_NAME}-${FULL_VERSION}-i386.breakpad"
+APP_SYMBOL_FILE="${BUILT_PRODUCTS_DIR}/${SRC_APP_NAME}-${FULL_VERSION}-i386.breakpad"
# Only run dump_syms if the file has changed since we last did a dump.
-if [ "${UNSTRIPPED_APP}" -nt "${SYMBOL_FILE}" ] ; then
- "${BREAKPAD_DUMP_SYMS}" -a i386 "${UNSTRIPPED_APP}" > "${SYMBOL_FILE}"
+if [ "${UNSTRIPPED_APP}" -nt "${APP_SYMBOL_FILE}" ] ; then
+ "${BREAKPAD_DUMP_SYMS}" -a i386 "${UNSTRIPPED_APP}" > "${APP_SYMBOL_FILE}"
fi
+APP_DSYM_NAME="${SRC_APP_NAME}.app.dSYM"
-DSYM_NAME="${SRC_APP_NAME}.app.dSYM"
-DSYM_TAR_PATH="${BUILT_PRODUCTS_DIR}/${DSYM_NAME}.tar.bz2"
+# Do the same thing for chrome_dll.
+
+SRC_DYLIB_NAME="${SRC_APP_NAME} Framework"
+SRC_DYLIB_PATH="${BUILT_PRODUCTS_DIR}/${SRC_DYLIB_NAME}.framework"
+UNSTRIPPED_DYLIB="${SRC_DYLIB_PATH}.dSYM/Contents/Resources/DWARF/${SRC_DYLIB_NAME}"
+DYLIB_SYMBOL_FILE="${BUILT_PRODUCTS_DIR}/${SRC_DYLIB_NAME}-${FULL_VERSION}-i386.breakpad"
+if [ "${UNSTRIPPED_DYLIB}" -nt "${DYLIB_SYMBOL_FILE}" ] ; then
+ "${BREAKPAD_DUMP_SYMS}" -a i386 "${UNSTRIPPED_DYLIB}" > "${DYLIB_SYMBOL_FILE}"
+fi
+DYLIB_DSYM_NAME="${SRC_DYLIB_NAME}.framework.dSYM"
+
+DSYM_TAR_PATH="${BUILT_PRODUCTS_DIR}/${APP_DSYM_NAME}.tar.bz2"
# Make a .tar.bz2 out of the .dSYM
-if [ "${BUILT_PRODUCTS_DIR}/${DSYM_NAME}" -nt "${DSYM_TAR_PATH}" ] ; then
- # we do a cd so when building the tar, we don't include the build dir in the
- # tar paths.
- (cd "${BUILT_PRODUCTS_DIR}" && tar -jcf "${DSYM_TAR_PATH}" "${DSYM_NAME}")
+if [ "${BUILT_PRODUCTS_DIR}/${APP_DSYM_NAME}" -nt "${DSYM_TAR_PATH}" ] ||
+ [ "${BUILT_PRODUCTS_DIR}/${DYLIB_DSYM_NAME}" -nt "${DSYM_TAR_PATH}" ] ; then
+ # Change directory so when building the tar, we don't include the build dir
+ # in the tar paths.
+ (cd "${BUILT_PRODUCTS_DIR}" &&
+ tar -jcf "${DSYM_TAR_PATH}" "${APP_DSYM_NAME}" "${DYLIB_DSYM_NAME}")
fi
diff --git a/build/mac/strip_save_dsym b/build/mac/strip_save_dsym
index 0e54b93..42d16cf 100755
--- a/build/mac/strip_save_dsym
+++ b/build/mac/strip_save_dsym
@@ -43,13 +43,18 @@ import time
# architecture. On error, returns an empty list. Determines the architecture
# list by calling file.
def macho_archs(macho):
+ macho_types = ["executable",
+ "dynamically linked shared library",
+ "bundle"]
+ macho_types_re = "Mach-O (?:64-bit )?(?:" + "|".join(macho_types) + ")"
+
file_cmd = subprocess.Popen(["/usr/bin/file", "-b", "--", macho],
- stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ stdout=subprocess.PIPE)
archs = []
type_line = file_cmd.stdout.readline()
- type_match = re.match("^Mach-O executable (.*)$", type_line)
+ type_match = re.match("^%s (.*)$" % macho_types_re, type_line)
if type_match:
archs.append(type_match.group(1))
return [type_match.group(1)]
@@ -60,7 +65,7 @@ def macho_archs(macho):
for i in range(0, int(type_match.group(1))):
arch_line = file_cmd.stdout.readline()
arch_match = re.match(
- "^.* \(for architecture (.*)\):\tMach-O executable .*$",
+ "^.* \(for architecture (.*)\):\t%s .*$" % macho_types_re,
arch_line)
if arch_match:
archs.append(arch_match.group(1))
@@ -68,6 +73,9 @@ def macho_archs(macho):
if file_cmd.wait() != 0:
archs = []
+ if len(archs) == 0:
+ print >> sys.stderr, "No architectures in %s" % macho
+
return archs
# Returns a dictionary mapping architectures contained in the file as returned
@@ -75,9 +83,11 @@ def macho_archs(macho):
# Architectures with no LC_UUID load command are omitted from the dictionary.
# Determines the UUID value by calling otool.
def macho_uuids(macho):
- archs = macho_archs(macho)
+ uuids = {}
- uuids = {}
+ archs = macho_archs(macho)
+ if len(archs) == 0:
+ return uuids
for arch in archs:
if arch == "":
@@ -85,7 +95,7 @@ def macho_uuids(macho):
otool_cmd = subprocess.Popen(["/usr/bin/otool", "-arch", arch, "-l", "-",
macho],
- stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ stdout=subprocess.PIPE)
# state 0 is when nothing UUID-related has been seen yet. State 1 is
# entered after a load command begins, but it may not be an LC_UUID load
# command. States 2, 3, and 4 are intermediate states while reading an
@@ -138,6 +148,9 @@ def macho_uuids(macho):
if state == 5:
uuids[arch] = uuid.upper()
+ if len(uuids) == 0:
+ print >> sys.stderr, "No UUIDs in %s" % macho
+
return uuids
# Given a path to a Mach-O file and possible information from the environment,
@@ -309,5 +322,5 @@ def main(argv=None):
return 0
-if __name__ == '__main__':
+if __name__ == "__main__":
sys.exit(main(sys.argv))
diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc
index 43c22cf..7576dfd 100644
--- a/chrome/app/chrome_dll_main.cc
+++ b/chrome/app/chrome_dll_main.cc
@@ -92,6 +92,7 @@ DLLEXPORT int __cdecl ChromeMain(HINSTANCE instance,
}
#elif defined(OS_POSIX)
extern "C" {
+__attribute__((visibility("default")))
int ChromeMain(int argc, const char** argv);
}
#endif
@@ -295,12 +296,29 @@ int ChromeMain(int argc, const char** argv) {
#endif
#if defined(OS_MACOSX)
+ // TODO(mark): Some of these things ought to be handled in chrome_exe_main.mm,
+ // such as Breakpad initialization. Under the current architecture, nothing
+ // in chrome_exe_main can rely directly on chrome_dll code on the Mac,
+ // though, so until some of this code is refactored to avoid such a
+ // dependency, it lives here. See also the TODO(mark) below at
+ // DestructCrashReporter().
+ base::EnableTerminationOnHeapCorruption();
+
+ // The exit manager is in charge of calling the dtors of singletons.
+ // Win has one here, but we assert with multiples from BrowserMain() if we
+ // keep it.
+ // base::AtExitManager exit_manager;
+
+#if defined(GOOGLE_CHROME_BUILD)
+ InitCrashReporter();
+#endif
+
// If Breakpad is not present then turn off os crash dumps so we don't have
// to wait eons for Apple's Crash Reporter to generate a dump.
if (IsCrashReporterDisabled()) {
DebugUtil::DisableOSCrashDumps();
}
-#endif
+#endif // OS_MACOSX
RegisterInvalidParamHandler();
// The exit manager is in charge of calling the dtors of singleton objects.
@@ -556,5 +574,10 @@ int ChromeMain(int argc, const char** argv) {
logging::CleanupChromeLogging();
+#if defined(OS_MACOSX) && defined(GOOGLE_CHROME_BUILD)
+ // TODO(mark): See the TODO(mark) above at InitCrashReporter.
+ DestructCrashReporter();
+#endif // OS_MACOSX && GOOGLE_CHROME_BUILD
+
return rv;
}
diff --git a/chrome/app/chrome_exe_main.mm b/chrome/app/chrome_exe_main.mm
index e762067..53b546e 100644
--- a/chrome/app/chrome_exe_main.mm
+++ b/chrome/app/chrome_exe_main.mm
@@ -2,12 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include <Cocoa/Cocoa.h>
-
-#include "base/at_exit.h"
-#include "base/process_util.h"
-#import "chrome/app/breakpad_mac.h"
-
// The entry point for all invocations of Chromium, browser and renderer. On
// windows, this does nothing but load chrome.dll and invoke its entry point
// in order to make it easy to update the app from GoogleUpdate. We don't need
@@ -20,22 +14,5 @@ int ChromeMain(int argc, const char** argv);
}
int main(int argc, const char** argv) {
- base::EnableTerminationOnHeapCorruption();
-
- // The exit manager is in charge of calling the dtors of singletons.
- // Win has one here, but we assert with multiples from BrowserMain() if we
- // keep it.
- // base::AtExitManager exit_manager;
-
-#if defined(GOOGLE_CHROME_BUILD)
- InitCrashReporter();
-#endif
-
- int ret = ChromeMain(argc, argv);
-
-#if defined(GOOGLE_CHROME_BUILD)
- DestructCrashReporter();
-#endif
-
- return ret;
+ return ChromeMain(argc, argv);
}
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index e4b931c..c7dd627 100644
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -2723,8 +2723,6 @@
'app/google_update_client.h',
'app/hard_error_handler_win.cc',
'app/hard_error_handler_win.h',
- 'app/keystone_glue.h',
- 'app/keystone_glue.m',
'app/scoped_ole_initializer.h',
],
'dependencies': [
@@ -2857,11 +2855,18 @@
}],
],
'dependencies': [
+ # On Linux, link the dependencies (libraries) that make up actual
+ # Chromium functionality directly into the executable.
+ '<@(chromium_dependencies)',
# Needed for chrome_dll_main.cc #include of gtk/gtk.h
'../build/linux/system.gyp:gtk',
# Needed for chrome_dll_main.cc use of g_thread_init
'../build/linux/system.gyp:gthread',
],
+ 'sources': [
+ 'app/chrome_dll_main.cc',
+ 'app/chrome_dll_resource.h',
+ ],
'copies': [
{
'destination': '<(PRODUCT_DIR)',
@@ -2932,12 +2937,7 @@
# A real .dSYM is needed for dump_syms to operate on.
'mac_real_dsym': 1,
},
- 'sources': [
- 'app/breakpad_mac.mm',
- 'app/breakpad_mac.h',
- ],
'dependencies': [
- '../breakpad/breakpad.gyp:breakpad',
'../breakpad/breakpad.gyp:dump_syms',
'../breakpad/breakpad.gyp:symupload',
],
@@ -2954,12 +2954,6 @@
'<(branding)'],
},
],
- }, {
- # no breakpad, put in the stubs
- 'sources': [
- 'app/breakpad_mac_stubs.mm',
- 'app/breakpad_mac.h',
- ],
}], # mac_breakpad
['mac_keystone==1', {
'copies': [
@@ -2998,6 +2992,12 @@
'message': 'Running pdfsqueeze on <(RULE_INPUT_PATH)',
},
],
+ 'copies': [
+ {
+ 'destination': '<(PRODUCT_DIR)/<(mac_product_name).app/Contents/Frameworks',
+ 'files': ['<(PRODUCT_DIR)/<(mac_product_name) Framework.framework'],
+ },
+ ],
}, { # else: OS != "mac"
'conditions': [
['branding=="Chrome"', {
@@ -3017,7 +3017,7 @@
['OS=="mac"', {
'actions': [
{
- # Mac addes an action to modify the Info.plist to meet our needs
+ # Mac adds an action to modify the Info.plist to meet our needs
# (see the script for why this is done).
'action_name': 'tweak_app_infoplist',
# We don't list any inputs or outputs because we always want
@@ -3051,12 +3051,15 @@
}],
],
}],
- ['OS=="win"', {
+ ['OS=="mac" or OS=="win"', {
'dependencies': [
- # On Windows, make sure we've built chrome.dll, which
- # contains all of the library code with Chromium
- # functionality.
+ # On Windows and Mac, make sure we've built chrome_dll, which
+ # contains all of the library code with Chromium functionality.
'chrome_dll',
+ ],
+ }],
+ ['OS=="win"', {
+ 'dependencies': [
'installer/installer.gyp:installer_util',
'installer/installer.gyp:installer_util_strings',
'../breakpad/breakpad.gyp:breakpad_handler',
@@ -3141,17 +3144,7 @@
'message': 'Copy first run complete sentinel file',
},
],
- },{ # 'OS!="win"
- 'dependencies': [
- # On Linux and Mac, link the dependencies (libraries)
- # that make up actual Chromium functionality directly
- # into the executable.
- '<@(chromium_dependencies)',
- ],
- 'sources': [
- 'app/chrome_dll_main.cc',
- 'app/chrome_dll_resource.h',
- ],
+ }, { # 'OS!="win"
'variables': {
'repack_path': '../tools/data_pack/repack.py',
},
@@ -4161,39 +4154,200 @@
},
],
'conditions': [
- ['OS=="mac"', {
- 'conditions': [
- # We need the Mac app name on disk, so we stick this into a variable so
- # the different places that need it can use the common variable.
- # NOTE: chrome/app/theme/chromium/BRANDING and
- # chrome/app/theme/google_chrome/BRANDING have the short names, etc.;
- # but extracting from there still means xcodeproject are out of date until
- # the next project regeneration.
- ['branding=="Chrome"', {
- 'variables': {
- 'mac_product_name%': 'Google Chrome',
- }
- }, {
- 'variables': {
- 'mac_product_name%': 'Chromium',
- }
- }],
- # We set feature variables so the different parts of the gyp file use
- # these vars in conditions instead of repeating the check of branding
- # and buildtype.
- ['branding=="Chrome" and buildtype=="Official"', {
- 'variables': {
- 'mac_breakpad%': 1,
- 'mac_keystone%': 1,
- }
- }, {
- 'variables': {
- 'mac_breakpad%': 0,
- 'mac_keystone%': 0,
- }
- }],
- ],
- }],
+ ['OS=="mac" or OS=="win"', {
+ 'targets': [
+ {
+ 'target_name': 'chrome_dll',
+ 'type': 'shared_library',
+ 'dependencies': [
+ '<@(chromium_dependencies)',
+ ],
+ 'conditions': [
+ ['OS=="win"', {
+ 'product_name': 'chrome',
+ 'msvs_guid': 'C0A7EE2C-2A6D-45BE-BA78-6D006FDF52D9',
+ 'include_dirs': [
+ 'third_party/wtl/include',
+ ],
+ 'dependencies': [
+ # On Windows, link the dependencies (libraries) that make
+ # up actual Chromium functionality into this .dll.
+ 'chrome_dll_version',
+ 'chrome_resources',
+ 'installer/installer.gyp:installer_util_strings',
+ 'theme_dll',
+ 'worker',
+ '../printing/printing.gyp:printing',
+ '../net/net.gyp:net_resources',
+ '../build/util/support/support.gyp:*',
+ '../third_party/cld/cld.gyp:cld',
+ '../third_party/tcmalloc/tcmalloc.gyp:tcmalloc',
+ '../views/views.gyp:views',
+ '../webkit/webkit.gyp:webkit_resources',
+ '../gears/gears.gyp:gears',
+ ],
+ 'defines': [
+ 'CHROME_DLL',
+ 'BROWSER_DLL',
+ 'RENDERER_DLL',
+ 'PLUGIN_DLL',
+ ],
+ 'sources': [
+ 'app/chrome_dll.rc',
+ 'app/chrome_dll_main.cc',
+ 'app/chrome_dll_resource.h',
+ '<(SHARED_INTERMEDIATE_DIR)/chrome_dll_version/chrome_dll_version.rc',
+
+ '../webkit/glue/resources/aliasb.cur',
+ '../webkit/glue/resources/cell.cur',
+ '../webkit/glue/resources/col_resize.cur',
+ '../webkit/glue/resources/copy.cur',
+ '../webkit/glue/resources/row_resize.cur',
+ '../webkit/glue/resources/vertical_text.cur',
+ '../webkit/glue/resources/zoom_in.cur',
+ '../webkit/glue/resources/zoom_out.cur',
+
+ # TODO: It would be nice to have these pulled in
+ # automatically from direct_dependent_settings in
+ # their various targets (net.gyp:net_resources, etc.),
+ # but that causes errors in other targets when
+ # resulting .res files get referenced multiple times.
+ '<(SHARED_INTERMEDIATE_DIR)/chrome/browser_resources.rc',
+ '<(SHARED_INTERMEDIATE_DIR)/chrome/common_resources.rc',
+ '<(SHARED_INTERMEDIATE_DIR)/chrome/renderer_resources.rc',
+ '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.rc',
+ '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.rc',
+
+ # TODO(sgk): left-over from pre-gyp build, figure out
+ # if we still need them and/or how to update to gyp.
+ #'app/check_dependents.bat',
+ #'app/chrome.dll.deps',
+ ],
+ 'msvs_settings': {
+ 'VCLinkerTool': {
+ 'BaseAddress': '0x01c30000',
+ 'DelayLoadDLLs': [
+ 'crypt32.dll',
+ 'cryptui.dll',
+ 'winhttp.dll',
+ 'wininet.dll',
+ 'wsock32.dll',
+ 'ws2_32.dll',
+ 'winspool.drv',
+ 'comdlg32.dll',
+ 'imagehlp.dll',
+ 'psapi.dll',
+ 'urlmon.dll',
+ 'imm32.dll',
+ ],
+ 'ImportLibrary': '$(OutDir)\\lib\\chrome_dll.lib',
+ 'ProgramDatabaseFile': '$(OutDir)\\chrome_dll.pdb',
+ # Set /SUBSYSTEM:WINDOWS for chrome.dll (for consistency).
+ 'SubSystem': '2',
+ },
+ 'VCManifestTool': {
+ 'AdditionalManifestFiles': '$(ProjectDir)\\app\\chrome.dll.manifest',
+ },
+ },
+ 'configurations': {
+ 'Debug': {
+ 'msvs_settings': {
+ 'VCLinkerTool': {
+ 'LinkIncremental': '1', # /INCREMENTAL:NO
+ },
+ },
+ },
+ },
+ }], # OS=="win"
+ ['OS=="mac"', {
+ # The main browser executable's name is <(mac_product_name).
+ # Certain things will get confused if two modules in the
+ # executable share the same name, so append " Framework" to the
+ # product_name used for the framework. This will result in
+ # a name like "Chromium Framework.framework".
+ 'product_name': '<(mac_product_name) Framework',
+ 'mac_bundle': 1,
+ 'xcode_settings': {
+ 'DYLIB_INSTALL_NAME_BASE': '@executable_path/../Frameworks',
+ },
+ 'sources': [
+ 'app/chrome_dll_main.cc',
+ 'app/chrome_dll_resource.h',
+ 'app/chrome_exe_main.mm',
+ 'app/keystone_glue.h',
+ 'app/keystone_glue.m',
+ ],
+ 'dependencies': [
+ '../build/util/support/support.gyp:*',
+ ],
+
+ # For now, don't put any resources into the framework. Exclude
+ # them all and push them into the bundle resources of the sole
+ # app bundle, the only dependent of this target.
+ # TODO(mark): Fix.
+ 'mac_bundle_resources/': [
+ ['exclude', ''],
+ ],
+ 'direct_dependent_settings': {
+ 'mac_bundle_resources': [
+ '../third_party/WebKit/WebCore/Resources/aliasCursor.png',
+ '../third_party/WebKit/WebCore/Resources/cellCursor.png',
+ '../third_party/WebKit/WebCore/Resources/contextMenuCursor.png',
+ '../third_party/WebKit/WebCore/Resources/copyCursor.png',
+ '../third_party/WebKit/WebCore/Resources/crossHairCursor.png',
+ '../third_party/WebKit/WebCore/Resources/eastResizeCursor.png',
+ '../third_party/WebKit/WebCore/Resources/eastWestResizeCursor.png',
+ '../third_party/WebKit/WebCore/Resources/helpCursor.png',
+ '../third_party/WebKit/WebCore/Resources/linkCursor.png',
+ '../third_party/WebKit/WebCore/Resources/missingImage.png',
+ '../third_party/WebKit/WebCore/Resources/moveCursor.png',
+ '../third_party/WebKit/WebCore/Resources/noDropCursor.png',
+ '../third_party/WebKit/WebCore/Resources/noneCursor.png',
+ '../third_party/WebKit/WebCore/Resources/northEastResizeCursor.png',
+ '../third_party/WebKit/WebCore/Resources/northEastSouthWestResizeCursor.png',
+ '../third_party/WebKit/WebCore/Resources/northResizeCursor.png',
+ '../third_party/WebKit/WebCore/Resources/northWestResizeCursor.png',
+ '../third_party/WebKit/WebCore/Resources/northWestSouthEastResizeCursor.png',
+ '../third_party/WebKit/WebCore/Resources/notAllowedCursor.png',
+ '../third_party/WebKit/WebCore/Resources/progressCursor.png',
+ '../third_party/WebKit/WebCore/Resources/southEastResizeCursor.png',
+ '../third_party/WebKit/WebCore/Resources/southResizeCursor.png',
+ '../third_party/WebKit/WebCore/Resources/southWestResizeCursor.png',
+ '../third_party/WebKit/WebCore/Resources/verticalTextCursor.png',
+ '../third_party/WebKit/WebCore/Resources/waitCursor.png',
+ '../third_party/WebKit/WebCore/Resources/westResizeCursor.png',
+ '../third_party/WebKit/WebCore/Resources/zoomInCursor.png',
+ '../third_party/WebKit/WebCore/Resources/zoomOutCursor.png',
+ 'renderer/renderer.sb',
+ ],
+ },
+
+ 'conditions': [
+ ['mac_breakpad==1', {
+ 'variables': {
+ # A real .dSYM is needed for dump_syms to operate on.
+ 'mac_real_dsym': 1,
+ },
+ 'sources': [
+ 'app/breakpad_mac.mm',
+ 'app/breakpad_mac.h',
+ ],
+ 'dependencies': [
+ '../breakpad/breakpad.gyp:breakpad',
+ ],
+ }, { # else: mac_breakpad!=1
+ # No Breakpad, put in the stubs.
+ 'sources': [
+ 'app/breakpad_mac_stubs.mm',
+ 'app/breakpad_mac.h',
+ ],
+ }], # mac_breakpad
+ ], # conditions
+ }], # OS=="mac"
+ ], # conditions
+ }, # target chrome_dll
+ ], # targets
+ }], # OS=="mac" or OS=="win"
['OS=="linux"', {
'conditions': [
# Only Chrome builds get breakpad since crash processing is internal.
@@ -4209,14 +4363,12 @@
],
}],
['OS=="mac"',
- # On Mac only, add a project target called "build_app_dmg" that only
- # builds a DMG out of the App (eventually will completely replace
- # "package_app").
{ 'targets': [
{
+ # Convenience target to build a disk image.
'target_name': 'build_app_dmg',
- # do NOT place this in the 'all' list; most won't want it.
- # In gyp, booleans are 0/1 not True/False.
+ # Don't 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': [
@@ -4468,105 +4620,6 @@
],
},
{
- 'target_name': 'chrome_dll',
- 'type': 'shared_library',
- 'product_name': 'chrome',
- 'msvs_guid': 'C0A7EE2C-2A6D-45BE-BA78-6D006FDF52D9',
- 'include_dirs': [
- 'third_party/wtl/include',
- ],
- 'dependencies': [
- # On Windows, link the dependencies (libraries) that make
- # up actual Chromium functionality into this .dll.
- '<@(chromium_dependencies)',
- 'chrome_dll_version',
- 'chrome_resources',
- 'installer/installer.gyp:installer_util_strings',
- 'theme_dll',
- 'worker',
- '../printing/printing.gyp:printing',
- '../net/net.gyp:net_resources',
- '../build/util/support/support.gyp:*',
- '../third_party/cld/cld.gyp:cld',
- '../third_party/tcmalloc/tcmalloc.gyp:tcmalloc',
- '../views/views.gyp:views',
- '../webkit/webkit.gyp:webkit_resources',
- '../gears/gears.gyp:gears',
- ],
- 'defines': [
- 'CHROME_DLL',
- 'BROWSER_DLL',
- 'RENDERER_DLL',
- 'PLUGIN_DLL',
- ],
- 'sources': [
- 'app/chrome_dll.rc',
- 'app/chrome_dll_main.cc',
- 'app/chrome_dll_resource.h',
- '<(SHARED_INTERMEDIATE_DIR)/chrome_dll_version/chrome_dll_version.rc',
-
- '../webkit/glue/resources/aliasb.cur',
- '../webkit/glue/resources/cell.cur',
- '../webkit/glue/resources/col_resize.cur',
- '../webkit/glue/resources/copy.cur',
- '../webkit/glue/resources/row_resize.cur',
- '../webkit/glue/resources/vertical_text.cur',
- '../webkit/glue/resources/zoom_in.cur',
- '../webkit/glue/resources/zoom_out.cur',
-
- # TODO: It would be nice to have these pulled in
- # automatically from direct_dependent_settings in
- # their various targets (net.gyp:net_resources, etc.),
- # but that causes errors in other targets when
- # resulting .res files get referenced multiple times.
- '<(SHARED_INTERMEDIATE_DIR)/chrome/browser_resources.rc',
- '<(SHARED_INTERMEDIATE_DIR)/chrome/common_resources.rc',
- '<(SHARED_INTERMEDIATE_DIR)/chrome/renderer_resources.rc',
- '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.rc',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.rc',
-
- # TODO(sgk): left-over from pre-gyp build, figure out
- # if we still need them and/or how to update to gyp.
- #'app/check_dependents.bat',
- #'app/chrome.dll.deps',
- ],
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'BaseAddress': '0x01c30000',
- 'DelayLoadDLLs': [
- 'crypt32.dll',
- 'cryptui.dll',
- 'winhttp.dll',
- 'wininet.dll',
- 'wsock32.dll',
- 'ws2_32.dll',
- 'winspool.drv',
- 'comdlg32.dll',
- 'imagehlp.dll',
- 'psapi.dll',
- 'urlmon.dll',
- 'imm32.dll',
- ],
- 'ImportLibrary': '$(OutDir)\\lib\\chrome_dll.lib',
- 'ProgramDatabaseFile': '$(OutDir)\\chrome_dll.pdb',
- # Set /SUBSYSTEM:WINDOWS for chrome.dll (for consistency).
- 'SubSystem': '2',
- },
- 'VCManifestTool': {
- 'AdditionalManifestFiles': '$(ProjectDir)\\app\\chrome.dll.manifest',
- },
- },
- 'configurations': {
- 'Debug': {
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'LinkIncremental': '1', # /INCREMENTAL:NO
- },
- },
- },
- },
- },
- {
'target_name': 'chrome_dll_version',
'type': 'none',
#'msvs_guid': '414D4D24-5D65-498B-A33F-3A29AD3CDEDC',