Fix SCons modules build on Windows:
* Add 'midl' Tool module. * Filter out the default OS_WINDOWS= definition from the Hammer modules, which messes up our build. * Fix the $PLATFORMSDK_VISTA definition. * Remove the current directory from the 'base' Alias (avoid cycles). * Remove by-hand addition of .lib, .pdb and .ilk files to the target list when build shared libraries (multiple places). * Comment out a post-action Touch() of the themes/default resource. (Thanks to bradnelson for many of the above individual fixes.) Review URL: http://codereview.chromium.org/8207 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3980 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
@ -15,5 +15,3 @@ sconscript_files = [
|
||||
]
|
||||
|
||||
SConscript(sconscript_files, exports=['env'])
|
||||
|
||||
env.Alias('base', '.')
|
||||
|
@ -182,7 +182,8 @@ if env['PLATFORM'] == 'darwin':
|
||||
|
||||
base_unittests = env.ChromeTestProgram('base_unittests', input_files)
|
||||
|
||||
env.Depends(base_unittests, '$EXPORTED_SYMBOLS_FILE')
|
||||
if env['PLATFORM'] == 'posix':
|
||||
env.Depends(base_unittests, '$EXPORTED_SYMBOLS_FILE')
|
||||
|
||||
# Install up a level to allow unit test path assumptions to be valid.
|
||||
installed_base_unittests = env.Install('$TARGET_ROOT', base_unittests)
|
||||
|
@ -109,6 +109,13 @@ env.AddMethod(ChromeObject)
|
||||
if env['PLATFORM'] == 'win32':
|
||||
env.Tool('target_platform_windows')
|
||||
env.Tool('target_debug')
|
||||
env.Tool('midl')
|
||||
|
||||
# TODO(bradnelson): this is needed for now because target_platform_windows
|
||||
# has OS_WINDOWS defined in a weird way.
|
||||
env.FilterOut(CPPDEFINES = ['OS_WINDOWS=OS_WINDOWS'])
|
||||
|
||||
env['PDB'] = '${TARGET.base}.pdb'
|
||||
|
||||
processors = int(os.environ.get('NUMBER_OF_PROCESSORS', 1))
|
||||
SetOption('num_jobs', processors + 1)
|
||||
@ -124,7 +131,7 @@ if env['PLATFORM'] == 'win32':
|
||||
CSCRIPT = 'c:\\Windows\\System32\\cscript',
|
||||
|
||||
PLATFORMSDK_VISTA_REL = '../third_party/platformsdk_vista_6_0',
|
||||
PLATFORMSDK_VISTA = '$CHROME_SRC_DIR/$PLATFORMSDK_VISTA_REL',
|
||||
PLATFORMSDK_VISTA = '$CHROME_SRC_DIR/third_party/platformsdk_vista_6_0',
|
||||
VISUAL_STUDIO = visual_studio_path,
|
||||
|
||||
CYGWIN_DIR = env.Dir('$CHROME_SRC_DIR/third_party/cygwin'),
|
||||
|
@ -200,16 +200,6 @@ libs = [
|
||||
]
|
||||
|
||||
|
||||
if env_dll['PLATFORM'] == 'win32':
|
||||
targets = [
|
||||
'chrome.dll',
|
||||
'chrome_dll.pdb',
|
||||
'chrome_dll.lib',
|
||||
]
|
||||
else:
|
||||
targets = ['chrome']
|
||||
|
||||
|
||||
|
||||
# TODO(sgk): make a pseudo-Builder for these
|
||||
import sys
|
||||
@ -237,17 +227,18 @@ grit_files.extend(google_chrome)
|
||||
|
||||
# TODO(port)
|
||||
if env_dll['PLATFORM'] == 'win32':
|
||||
dll_targets = env_dll.ChromeSharedLibrary(targets,
|
||||
dll_resources + input_files + libs)
|
||||
dll_targets = env_dll.ChromeSharedLibrary('chrome.dll',
|
||||
dll_resources + input_files + libs,
|
||||
PDB='chrome_dll.pdb')
|
||||
install_targets.extend(dll_targets)
|
||||
|
||||
for g in [ g for g in grit_files if str(g).endswith('.rc') ]:
|
||||
env_res.RES(g)
|
||||
|
||||
def chrome_version_emitter(target, source, env):
|
||||
source.append('$CHROME_SRC_DIR/chrome/VERSION')
|
||||
source.append(env.File('$CHROME_SRC_DIR/chrome/VERSION'))
|
||||
# TODO(sgk): parameterize for chromium-vs.-google_chrome
|
||||
source.append('$CHROME_SRC_DIR/chrome/app/theme/google_chrome/BRANDING')
|
||||
source.append(env.File('$CHROME_SRC_DIR/chrome/app/theme/google_chrome/BRANDING'))
|
||||
return target, source
|
||||
|
||||
b = Builder(action = '$CHROME_VERSION_RC_COM',
|
||||
@ -323,19 +314,10 @@ env_exe.Append(
|
||||
],
|
||||
)
|
||||
|
||||
if env['PLATFORM'] == 'win32':
|
||||
targets = [
|
||||
'chrome.exe',
|
||||
'chrome_exe.pdb',
|
||||
'chrome_exe_implib.lib',
|
||||
]
|
||||
else:
|
||||
targets = ['chrome']
|
||||
|
||||
# TODO(port)
|
||||
if env['PLATFORM'] == 'win32':
|
||||
chrome_exe = env_exe.ChromeProgram(
|
||||
targets,
|
||||
'chrome',
|
||||
[
|
||||
env_res.RES('app/chrome_exe.rc'),
|
||||
'app/breakpad.cc',
|
||||
|
@ -93,7 +93,6 @@ ui_test_files = [
|
||||
'browser/download/download_uitest.cc',
|
||||
'browser/download/save_page_uitest.cc',
|
||||
'browser/errorpage_uitest.cc',
|
||||
'browser/find_in_page_controller_uitest.cc',
|
||||
'browser/history/redirect_uitest.cc',
|
||||
'browser/iframe_uitest.cc',
|
||||
'browser/images_uitest.cc',
|
||||
@ -134,6 +133,12 @@ ui_test_files = [
|
||||
'$NET_DIR/url_request/url_request_test_job$OBJSUFFIX',
|
||||
]
|
||||
|
||||
if env_test['PLATFORM'] == 'win32':
|
||||
ui_test_files.extend([
|
||||
'find_bar_win_interactive_uitest.cc',
|
||||
'find_bar_win_uitest.cc',
|
||||
])
|
||||
|
||||
ui_tests = env_test.ChromeTestProgram('ui_tests', ui_test_files + libs)
|
||||
|
||||
i = env_test.Install('$TARGET_ROOT', ui_tests)
|
||||
|
@ -44,7 +44,8 @@ env.Append(
|
||||
|
||||
themes_default = env.ChromeSharedLibrary("$CHROME_DIR/themes/default", res)
|
||||
|
||||
env.AddPostAction(themes_default[1], Touch(themes_default[1:]))
|
||||
# TODO(bradnelson): figure out why this was needed
|
||||
#env.AddPostAction(themes_default[1], Touch(themes_default[1:]))
|
||||
|
||||
i = env.Install("$TARGET_ROOT/themes", themes_default)
|
||||
env.Alias('chrome', i)
|
||||
|
@ -72,16 +72,7 @@ input_files = [
|
||||
"pe_resource.cc",
|
||||
]
|
||||
|
||||
if env['PLATFORM'] == 'win32':
|
||||
targets = [
|
||||
'mini_installer.exe',
|
||||
'mini_installer.pdb',
|
||||
'mini_installer.map',
|
||||
]
|
||||
else:
|
||||
targets = ['mini_installer']
|
||||
|
||||
exe = env.ChromeProgram(targets, components + resources + input_files)
|
||||
exe = env.ChromeProgram('mini_installer', components + resources + input_files)
|
||||
i = env.Install('$TARGET_ROOT', exe)
|
||||
env.Alias('chrome', i)
|
||||
|
||||
|
@ -76,16 +76,7 @@ input_files = [
|
||||
'uninstall.cc',
|
||||
]
|
||||
|
||||
if env['PLATFORM'] == 'win32':
|
||||
targets = [
|
||||
'setup.exe',
|
||||
'setup.pdb',
|
||||
'setup.lib',
|
||||
]
|
||||
else:
|
||||
targets = ['setup']
|
||||
|
||||
exe = env.ChromeProgram(targets, resources + input_files)
|
||||
exe = env.ChromeProgram('setup', resources + input_files)
|
||||
i = env.Install('$TARGET_ROOT', exe)
|
||||
|
||||
env.Alias('chrome', i)
|
||||
|
@ -41,8 +41,7 @@ input_files = [
|
||||
'chrome_test_control.cc',
|
||||
]
|
||||
|
||||
dll = env.ChromeSharedLibrary(['activex_test_control', 'activex_test_control.lib'],
|
||||
input_files)
|
||||
dll = env.ChromeSharedLibrary('activex_test_control', input_files)
|
||||
|
||||
i = env.Install('$TARGET_ROOT', dll)
|
||||
env.Alias('chrome', i)
|
||||
|
@ -41,15 +41,6 @@ input_files = [
|
||||
'$SANDBOX_DIR/tests/validation_tests/commands${OBJSUFFIX}',
|
||||
]
|
||||
|
||||
dll = env.ChromeSharedLibrary(['security_tests',
|
||||
'security_tests.lib',
|
||||
'security_tests.ilk',
|
||||
'security_tests.pdb'],
|
||||
input_files)
|
||||
|
||||
# TODO(sgk): can go away once ChromeSharedLibrary() handles this.
|
||||
env.Install('$LIBS_DIR', dll[1])
|
||||
|
||||
dll = env.ChromeSharedLibrary('security_tests', input_files)
|
||||
i = env.Install('$TARGET_ROOT', dll)
|
||||
env.Alias('chrome', i)
|
||||
|
||||
|
Reference in New Issue
Block a user