Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(684)

Unified Diff: goopdate/build.scons

Issue 624713003: Keep only base/extractor.[cc|h]. (Closed) Base URL: https://chromium.googlesource.com/external/omaha.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « goopdate/broker_idl_datax.c ('k') | goopdate/cocreate_async.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: goopdate/build.scons
diff --git a/goopdate/build.scons b/goopdate/build.scons
deleted file mode 100644
index 33f2d8f9074a9dcdaf479d3fb2e4273a4608c091..0000000000000000000000000000000000000000
--- a/goopdate/build.scons
+++ /dev/null
@@ -1,453 +0,0 @@
-#!/usr/bin/python2.4
-#
-# Copyright 2009-2010 Google Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ========================================================================
-
-
-import omaha_version_utils
-
-Import('env')
-
-def BuildCOMForwarder(cmd_line_switch,
- signed_exe_name):
- com_forwarder_env = env.Clone()
-
- com_forwarder_env.FilterOut(CCFLAGS=['/GL', '/RTC1', '/GS'])
- com_forwarder_env.FilterOut(LINKFLAGS=['/LTCG'])
-
- com_forwarder_env.Append(
- CCFLAGS=[
- '/GS-',
- '/Zl',
- ],
- CPPDEFINES = [
- 'CMD_LINE_SWITCH=_T(\\"%s\\")' % cmd_line_switch,
- ],
- LINKFLAGS=[
- '/ENTRY:WinMainCRTStartup',
- ],
- LIBS=[
- 'libcmt.lib',
- 'shlwapi.lib',
- ],
- )
- # The resource file used is the same as the one for GoogleUpdate.exe.
- # The version resource used is the same as the one for goopdate.dll.
- com_forwarder_inputs = [
- com_forwarder_env.ComponentObject('%s.obj' % signed_exe_name,
- 'com_forwarder.cc'),
- com_forwarder_env.RES('%s.res' % signed_exe_name,
- '../google_update/resource.rc'),
- '$OBJ_ROOT/goopdate/goopdate_version.res',
- ]
-
- unsigned_broker = com_forwarder_env.ComponentProgram(
- prog_name='%s_unsigned' % signed_exe_name,
- source=com_forwarder_inputs,
- )
- signed_broker = com_forwarder_env.SignedBinary(
- target='%s.exe' % signed_exe_name,
- source=unsigned_broker,
- )
- env.Replicate('$STAGING_DIR', signed_broker)
-
-
-# Build the broker forwarder and legacy on-demand.
-BuildCOMForwarder('/broker', 'GoogleUpdateBroker')
-BuildCOMForwarder('/ondemand', 'GoogleUpdateOnDemand')
-
-#
-# Build COM libraries and headers.
-#
-midl_env = env.Clone()
-midl_env.Tool('midl')
-midl_env['MIDLFLAGS'] += [
- '/Oicf', # generate optimized stubless proxy/stub code
- ]
-
-#
-# Generate omaha3_idl.idl. The output is an IDL file with a variant CLSID
-# for coclass GoogleComProxyMachineClass and GoogleComProxyUserClass.
-#
-generated_idl = env.Command(
- target='omaha3_idl.idl',
- source='$MAIN_DIR/goopdate/omaha3_idl.idl',
- action=('python %s/tools/generate_omaha3_idl.py --idl_template_file '
- '$SOURCE --idl_output_file $TARGET' % env['MAIN_DIR'])
-)
-
-# Compile the .idl file into .tlb, .c & .h files
-midl_input = 'omaha3_idl.idl'
-midl_outputs = midl_env.TypeLibrary(generated_idl)
-
-# Save the .idl and the produced .tlb and .h files so we can provide
-# them to clients.
-env.Replicate('$STAGING_DIR/idls', midl_input)
-for node in midl_outputs:
- if not str(node).endswith('.c'):
- env.Replicate('$STAGING_DIR/idls', node)
-
-midl_env.ComponentLibrary(
- lib_name='omaha3_idl',
- source='omaha3_idl_i.c',
-)
-
-handler_common_env = env.Clone()
-handler_common_env.Append(
- CPPDEFINES = [
- '_ATL_FREE_THREADED',
- ],
- CPPPATH = [
- '$OBJ_ROOT', # Needed for generated files.
- ],
- LIBS = [
- '$LIB_DIR/base.lib',
- '$LIB_DIR/goopdate_lib.lib',
- ('atls.lib', 'atlsd.lib')[env.Bit('debug')],
- ('libcmt.lib', 'libcmtd.lib')[env.Bit('debug')],
- ('libcpmt.lib', 'libcpmtd.lib')[env.Bit('debug')],
- 'psapi.lib',
- 'netapi32.lib',
- 'rasapi32.lib',
- 'shlwapi.lib',
- 'userenv.lib',
- 'version.lib',
- 'wtsapi32.lib',
- ],
-)
-
-def BuildGoogleUpdateHandlerDll(omaha_version_info, is_machine_handler, psname):
- version_string = omaha_version_info.GetVersionString()
- prefix = omaha_version_info.filename_prefix
- handler_env = handler_common_env.Clone(COMPONENT_STATIC = False)
-
- if prefix == 'TEST_':
- handler_env['OBJPREFIX'] = handler_env.subst('test/$OBJPREFIX')
- elif prefix:
- raise Exception('ERROR: Unrecognized prefix "%s"' % prefix)
-
- handler_env.Append(
- CPPDEFINES = [
- 'IS_MACHINE_HANDLER=%d' % is_machine_handler,
- ],
- LIBS = [
- '$LIB_DIR/common.lib',
- 'wininet.lib',
- 'rpcrt4.lib',
- ],
- RCFLAGS = [
- '/DVERSION_MAJOR=%d' % omaha_version_info.version_major,
- '/DVERSION_MINOR=%d' % omaha_version_info.version_minor,
- '/DVERSION_BUILD=%d' % omaha_version_info.version_build,
- '/DVERSION_PATCH=%d' % omaha_version_info.version_patch,
- '/DVERSION_NUMBER_STRING=\\"%s\\"' % version_string,
- ],
- )
-
- resource = handler_env.RES(target='%s%s_resource.res' % (prefix, psname),
- source='google_update_ps_resource.rc')
-
- handler_env.Depends(
- resource,
- ['$MAIN_DIR/VERSION',
- '$MAIN_DIR/base/generic_reg_file_dll_handler.rgs'])
-
- target_name = '%s%s_unsigned' % (prefix, psname)
-
- inputs = [
- 'google_update_ps.def',
- resource,
- prefix + 'goopdate_version.res',
- ]
- inputs += handler_env.Object('google_update_ps_%s.obj' % psname,
- '$OBJ_ROOT/goopdate/google_update_ps.cc')
- inputs += handler_env.Object('omaha3_idl_datax_%s.obj' % psname,
- '$OBJ_ROOT/goopdate/omaha3_idl_datax.c')
-
- unsigned_dll = handler_env.ComponentLibrary(
- lib_name=target_name,
- source=inputs,
- )
-
- signed_dll = handler_env.SignedBinary(
- target='%s%s.dll' % (prefix, psname),
- source=unsigned_dll,
- )
-
- env.Replicate('$STAGING_DIR', signed_dll)
- env.Replicate('$STAGING_DIR', [f for f in unsigned_dll if f.suffix == '.pdb'])
-
-
-for omaha_version_info in env['omaha_versions_info']:
- BuildGoogleUpdateHandlerDll(omaha_version_info, 1, 'psmachine')
- BuildGoogleUpdateHandlerDll(omaha_version_info, 0, 'psuser')
-
-gd_env = env.Clone()
-
-# TODO(omaha3): Is it okay that other libs, such as common, do not define this.
-gd_env['CPPDEFINES'] += [
- '_ATL_FREE_THREADED',
- ]
-
-# Need to look in output dir to find .h files generated by midl compiler.
-gd_env['CPPPATH'] += [
- '$OBJ_ROOT', # Needed for generated files.
- '$MAIN_DIR/third_party/breakpad/src/',
- ]
-
-target_name = 'goopdate_lib'
-
-gd_inputs = [
- 'app.cc',
- 'app_bundle.cc',
- 'app_bundle_state.cc',
- 'app_bundle_state_busy.cc',
- 'app_bundle_state_init.cc',
- 'app_bundle_state_initialized.cc',
- 'app_bundle_state_paused.cc',
- 'app_bundle_state_ready.cc',
- 'app_bundle_state_stopped.cc',
- 'app_command.cc',
- 'app_manager.cc',
- 'app_state.cc',
- 'app_state_error.cc',
- 'app_state_init.cc',
- 'app_state_checking_for_update.cc',
- 'app_state_download_complete.cc',
- 'app_state_downloading.cc',
- 'app_state_install_complete.cc',
- 'app_state_installing.cc',
- 'app_state_no_update.cc',
- 'app_state_ready_to_install.cc',
- 'app_state_update_available.cc',
- 'app_state_waiting_to_check_for_update.cc',
- 'app_state_waiting_to_download.cc',
- 'app_state_waiting_to_install.cc',
- 'app_version.cc',
- 'application_usage_data.cc',
- 'code_red_check.cc',
- 'crash.cc',
- 'cocreate_async.cc',
- 'cred_dialog.cc',
- 'current_state.cc',
- 'download_complete_ping_event.cc',
- 'download_manager.cc',
- 'google_update.cc',
- 'goopdate.cc',
- 'goopdate_metrics.cc',
- 'install_manager.cc',
- 'installer_wrapper.cc',
- 'job_observer.cc',
- 'model.cc',
- 'model_object.cc',
- 'ondemand.cc',
- 'oneclick_process_launcher.cc',
- 'offline_utils.cc',
- 'string_formatter.cc',
- 'package.cc',
- 'package_cache.cc',
- 'process_launcher.cc',
- 'resource_manager.cc',
- 'update3web.cc',
- 'update_request_utils.cc',
- 'update_response_utils.cc',
- 'worker.cc',
- 'worker_utils.cc',
- 'worker_metrics.cc',
- ]
-if env.Bit('use_precompiled_headers'):
- gd_inputs += gd_env.EnablePrecompile(target_name)
-
-# Compile the library.
-gd_env.ComponentLibrary(target_name, gd_inputs)
-
-
-#
-# Build Goopdate DLL
-#
-for omaha_version_info in env['omaha_versions_info']:
- prefix = omaha_version_info.filename_prefix
-
- temp_env = env.Clone(COMPONENT_STATIC=False)
-
- if prefix == 'TEST_':
- temp_env['OBJPREFIX'] = temp_env.subst('test/$OBJPREFIX')
- elif prefix:
- raise Exception('ERROR: Unrecognized prefix "%s"' % prefix)
-
- # Add languages that have version resources but are not fully supported.
- translated_languages = omaha_version_utils.GetShellLanguagesForVersion(
- omaha_version_info.GetVersion())
-
- temp_env.Append(
- CPPPATH = [
- '$MAIN_DIR/third_party/breakpad/src/',
- '$OBJ_ROOT',
- ],
-
- # Do not add static dependencies on system import libraries. Prefer delay
- # loading when possible. Only what is necessary must be loaded in the
- # memory space when long-running.
- LIBS = [
- '$LIB_DIR/base.lib',
- '$LIB_DIR/breakpad.lib',
- '$LIB_DIR/client.lib',
- '$LIB_DIR/common.lib',
- '$LIB_DIR/core.lib',
- '$LIB_DIR/google_update_recovery.lib',
- '$LIB_DIR/goopdate_lib.lib',
- '$LIB_DIR/logging.lib',
- '$LIB_DIR/net.lib',
- '$LIB_DIR/omaha3_idl.lib',
- '$LIB_DIR/security.lib',
- '$LIB_DIR/service.lib',
- '$LIB_DIR/setup.lib',
- '$LIB_DIR/statsreport.lib',
- '$LIB_DIR/ui.lib',
- ('atls.lib', 'atlsd.lib')[temp_env.Bit('debug')],
- ('libcmt.lib', 'libcmtd.lib')[temp_env.Bit('debug')],
- ('libcpmt.lib', 'libcpmtd.lib')[temp_env.Bit('debug')],
- # TODO(omaha3): This must be linked in because we have UI in the DLL.
- 'bits.lib',
- 'comctl32.lib',
- 'crypt32.lib',
- 'delayimp.lib',
- 'iphlpapi.lib',
- 'msi.lib',
- 'msimg32.lib',
- 'mstask.lib',
- 'netapi32.lib',
- 'psapi.lib',
- 'rasapi32.lib',
- 'rpcns4.lib',
- 'rpcrt4.lib',
- 'shlwapi.lib',
- 'taskschd.lib',
- 'version.lib',
- 'userenv.lib',
- 'wininet.lib',
- 'wintrust.lib',
- 'ws2_32.lib',
- 'wtsapi32.lib',
- ],
- LINKFLAGS = [
- '/DELAYLOAD:oleaut32.dll',
- '/DELAYLOAD:psapi.dll',
- '/DELAYLOAD:rasapi32.dll',
- '/DELAYLOAD:shell32.dll',
- '/DELAYLOAD:shlwapi.dll',
- '/DELAYLOAD:userenv.dll',
- '/DELAYLOAD:version.dll',
- '/DELAYLOAD:wtsapi32.dll',
-
- # Forces the dependency on ws2_32.lib.
- '/INCLUDE:_WSAStartup@8',
-
- # TODO(Omaha) - Choose a rebase address which does not conflict
- # with other DLLs loaded in our process. For now, we just picked
- # an arbitrary address.
- '/BASE:0x18000000',
- ],
- RCFLAGS = [
- '/DVERSION_MAJOR=%d' % omaha_version_info.version_major,
- '/DVERSION_MINOR=%d' % omaha_version_info.version_minor,
- '/DVERSION_BUILD=%d' % omaha_version_info.version_build,
- '/DVERSION_PATCH=%d' % omaha_version_info.version_patch,
- '/DVERSION_NUMBER_STRING=\\"%s\\"' % (
- omaha_version_info.GetVersionString()),
-
- # goopdate.dll is resource neutral.
- '/DLANGUAGE_STRING=\\"en\\"',
- ],
- )
-
- resource_res = temp_env.RES(
- target=prefix + 'goopdate.res',
- source='goopdate.rc',
- )
-
- # Force a rebuild when the .tlb changes.
- temp_env.Depends(resource_res, '$OBJ_ROOT/goopdate/omaha3_idl.tlb')
-
- version_res = temp_env.RES(
- target=prefix + 'goopdate_version.res',
- source='goopdate_version.rc'
- )
-
- # Force a rebuild when the version changes.
- env.Depends(version_res, '$MAIN_DIR/VERSION')
-
- target_name = prefix + 'goopdate_unsigned'
-
- # main.cc is included here because the linker gets confused if we try to
- # create a DLL without an entry point. There's probably a more accurate
- # description of the problem and thus a different solution, but this worked.
- inputs = [
- 'goopdate.def',
- 'main.cc',
- resource_res,
- version_res,
- ]
- if env.Bit('use_precompiled_headers'):
- inputs += temp_env.EnablePrecompile(target_name)
-
- for language in translated_languages:
- lang_base_name = 'goopdate_dll/generated_resources_' + language
- inputs += temp_env.RES(
- target='resources/%s.res' % (prefix + lang_base_name),
- source='resources/%s.rc' % lang_base_name,
- )
-
- unsigned_dll = temp_env.ComponentLibrary(
- lib_name=target_name,
- source=inputs,
- )
-
- signed_dll = temp_env.SignedBinary(
- target=prefix + 'goopdate.dll',
- source=unsigned_dll,
- )
-
- env.Replicate('$STAGING_DIR', signed_dll)
- env.Replicate('$STAGING_DIR', [f for f in unsigned_dll if f.suffix == '.pdb'])
-
-
-customization_test_env = env.Clone()
-
-customization_test_env.Append(
- LIBS = [
- '$LIB_DIR/common.lib',
- ],
-)
-
-customization_test_env['CPPPATH'] += [
- '$OBJ_ROOT', # Needed for generated files.
- ]
-customization_test = customization_test_env.OmahaUnittest(
- name='omaha_customization_goopdate_apis_unittest',
- source=[
- 'omaha_customization_goopdate_apis_unittest.cc',
- 'omaha3_idl_i.obj', # Needed for LIBID_*.
- ],
- all_in_one=False,
- COMPONENT_TEST_SIZE='small',
-)
-
-# The test uses the DLL for its TypeLib.
-customization_test_env.Depends(customization_test, '$STAGING_DIR/goopdate.dll')
-
-
-# Build all the resource dlls.
-env.BuildSConscript('resources')
« no previous file with comments | « goopdate/broker_idl_datax.c ('k') | goopdate/cocreate_async.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698