diff options
author | bradnelson@chromium.org <bradnelson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-04 00:32:42 +0000 |
---|---|---|
committer | bradnelson@chromium.org <bradnelson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-04 00:32:42 +0000 |
commit | 98c01eda0df03da5b7a611edc5698b1ebb075967 (patch) | |
tree | 179022d266994ace1560479bf304143ab1cab772 | |
parent | fc2cdc1f00430d3dbfccc849b3053311e385fabb (diff) | |
download | chromium_src-98c01eda0df03da5b7a611edc5698b1ebb075967.zip chromium_src-98c01eda0df03da5b7a611edc5698b1ebb075967.tar.gz chromium_src-98c01eda0df03da5b7a611edc5698b1ebb075967.tar.bz2 |
Adding visual studio solution files.
Sandbox is currently having a problem with this so it is disabled.
Fixed a few stray items.
Review URL: http://codereview.chromium.org/9259
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4525 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | build/SConscript.main | 31 | ||||
-rw-r--r-- | build/SConscript.v8 | 2 | ||||
-rw-r--r-- | chrome/SConscript | 5 | ||||
-rw-r--r-- | chrome/app/theme/SConscript | 3 | ||||
-rw-r--r-- | chrome/installer/util/SConscript | 1 | ||||
-rw-r--r-- | chrome/test/automation/SConscript | 6 | ||||
-rw-r--r-- | site_scons/site_tools/visual_studio_solution.py | 27 | ||||
-rw-r--r-- | third_party/sqlite/SConscript | 2 |
8 files changed, 47 insertions, 30 deletions
diff --git a/build/SConscript.main b/build/SConscript.main index 5913d9c..ec0d8f7 100644 --- a/build/SConscript.main +++ b/build/SConscript.main @@ -85,6 +85,11 @@ root_env = Environment( root_env.Append(LIBPATH = ['$V8_DIR']) +# Declare a bit to gate solution generation. +# The actual generation must be at the end. +DeclareBit('solution', 'Generate a solution file') +root_env.SetBitFromOption('solution', False) + def ChromeProgram(env, *args, **kw): return env.ComponentProgram(*args, **kw) @@ -183,7 +188,10 @@ if LoadComponent('net'): if LoadComponent('rlz'): sconscripts.append('$RLZ_DIR/SConscript') -if LoadComponent('sandbox'): +# TODO(bradnelson): fix solution generation for sandbox. +# The solution generator blows up on some of the tests in sandbox. +# For now, disable sandbox for solution generation. +if LoadComponent('sandbox') and not root_env.Bit('solution'): sconscripts.append('$SANDBOX_DIR/sandbox.scons') if LoadComponent('sdch'): @@ -211,7 +219,7 @@ if LoadComponent('third_party'): ]) if LoadComponent('v8') and root_env.Dir('$CHROME_SRC_DIR/v8').exists(): - sconscripts.append('build/SConscript.v8') + sconscripts.append('$OBJ_ROOT/build/SConscript.v8') if LoadComponent('webkit'): sconscripts.append('$WEBKIT_DIR/SConscript') @@ -233,8 +241,8 @@ windows_env.Tool('midl') windows_env.Replace( BUILD_TYPE = 'debug-windows', BUILD_TYPE_DESCRIPTION = 'Windows debug build', - BUILD_GROUPS = ['default'], ) +windows_env.Append(BUILD_GROUPS = ['default']) # TODO(bradnelson): this is needed for now because target_platform_windows # has OS_WINDOWS defined in a weird way. @@ -401,8 +409,8 @@ linux_env.Tool('yacc') linux_env.Replace( BUILD_TYPE = 'debug-linux', BUILD_TYPE_DESCRIPTION = 'Linux debug build', - BUILD_GROUPS = ['default'], ) +linux_env.Append(BUILD_GROUPS = ['default']) # TODO(bradnelson): this is needed for now because target_platform_linux has @@ -503,8 +511,8 @@ mac_env.Tool('target_debug') mac_env.Replace( BUILD_TYPE = 'debug-mac', BUILD_TYPE_DESCRIPTION = 'Mac debug build', - BUILD_GROUPS = ['default'], ) +mac_env.Append(BUILD_GROUPS = ['default']) mac_env.Replace( # Reproduce XCode's behavior of using gcc even to link C++, @@ -640,3 +648,16 @@ Default(Alias(build_component)) BuildComponents(environment_list) # ------------------------------------------------------------------------- + +# This must occur after BuildComponents so that the dependency graph +# will be populated. +if root_env.Bit('solution'): + solution_env = root_env.Clone(tools = ['visual_studio_solution']) + solution = solution_env.Solution( + '$MAIN_DIR/chrome_scons', [windows_env], + exclude_pattern = '.*(Program Files|platformsdk_vista_6_0|cygwin).*', + ) + Default(None) # Delete all other default targets. + Default(solution) # Build just the solution. + +# ------------------------------------------------------------------------- diff --git a/build/SConscript.v8 b/build/SConscript.v8 index aadb4b7..34378e9 100644 --- a/build/SConscript.v8 +++ b/build/SConscript.v8 @@ -76,6 +76,6 @@ if env['PLATFORM'] == 'win32': # TODO(evanm): this may be necessary on other platforms(?) i = env.InstallAs('$TARGET_ROOT/v8_shell_sample${PROGSUFFIX}', v8[0]) -env.ChromeStaticLibrary('$V8_DIR/v8_snapshot', +env.ChromeStaticLibrary('v8_snapshot', ['$V8_MODE_DIR/libraries-empty${OBJSUFFIX}', '$V8_MODE_DIR/snapshot${OBJSUFFIX}']) diff --git a/chrome/SConscript b/chrome/SConscript index ce800c8..985e564 100644 --- a/chrome/SConscript +++ b/chrome/SConscript @@ -41,6 +41,7 @@ if env_res['PLATFORM'] == 'win32': browser_res = env_res.RES('browser/browser_resources.rc') chrome_dll_res = env_res.RES('app/chrome_dll.rc') + env_res.Depends(chrome_dll_res, 'installer/util/installer_util_strings.rc') common_res = env_res.RES('common/common_resources.rc') debugger_res = env_res.RES('browser/debugger/resources/debugger_resources.rc') renderer_res = env_res.RES('renderer/renderer_resources.rc') @@ -241,8 +242,10 @@ if env_dll['PLATFORM'] == 'win32': env['BUILDERS']['ChromeVersionRC'] = b env.Replace( + # NOTE: the / after $CHROME_SRC_DIR/chrome/ is required because + # version.bat assumes a path with a trailing slash. CHROME_VERSION_RC_COM = - '$VERSION_BAT $SOURCE $CHROME_SRC_DIR/chrome $PWD $TARGET', + '$VERSION_BAT $SOURCE $CHROME_SRC_DIR/chrome/ $PWD $TARGET', VERSION_BAT = env.File( '$CHROME_SRC_DIR/chrome/tools/build/win/version.bat'), PWD = Dir('.'), diff --git a/chrome/app/theme/SConscript b/chrome/app/theme/SConscript index 6c013ca..1f2c9c4 100644 --- a/chrome/app/theme/SConscript +++ b/chrome/app/theme/SConscript @@ -42,11 +42,10 @@ env.Append( ], ) -themes_default = env.ChromeSharedLibrary("$CHROME_DIR/themes/default", res) +themes_default = env.ChromeSharedLibrary("default", res) # 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) - diff --git a/chrome/installer/util/SConscript b/chrome/installer/util/SConscript index eaa9fb5..27fd6f9 100644 --- a/chrome/installer/util/SConscript +++ b/chrome/installer/util/SConscript @@ -73,4 +73,3 @@ env_x.Command(['$CHROME_DIR/installer/util/installer_util_strings.rc', '$CHROME_DIR/app/generated_resources.grd'] + env.Glob('$CHROME_DIR/app/resources/*.xtb'), "$PYTHON ${SOURCES[0]} ${TARGET.dir}") - diff --git a/chrome/test/automation/SConscript b/chrome/test/automation/SConscript index 1b9d786..11cead9 100644 --- a/chrome/test/automation/SConscript +++ b/chrome/test/automation/SConscript @@ -27,8 +27,4 @@ input_files = [ 'window_proxy.cc', ] -lib = env.ChromeStaticLibrary('automation', input_files) - -i = env.Install('$TARGET_ROOT', lib) -#env.Alias('chrome', i) - +env.ChromeStaticLibrary('automation', input_files) diff --git a/site_scons/site_tools/visual_studio_solution.py b/site_scons/site_tools/visual_studio_solution.py index 9cb9a4a..eae83fd 100644 --- a/site_scons/site_tools/visual_studio_solution.py +++ b/site_scons/site_tools/visual_studio_solution.py @@ -71,7 +71,7 @@ def Solution(env, solution_name, build_targets = [e.subst('$TARGET_ROOT') for e in environments] # pick out sources, headers, and resources sources, headers, resources, others = env.GatherInputs( - [SCons.Script.Dir('.')], + env.Dir('$DESTINATION_ROOT'), ['.+\\.(c|cc|m|mm|cpp)$', # source files '.+\\.(h|hh|hpp)$', # header files '.+\\.(rc)$', # resource files @@ -79,19 +79,18 @@ def Solution(env, solution_name, exclude_pattern=exclude_pattern, ) # Build main Visual Studio Project file - project_list = env.MSVSProject(target=solution_name + - env['MSVSPROJECTSUFFIX'], - srcs=sources + headers + others + resources, - incs=[], - misc=[], - resources=[], - auto_build_solution=0, - MSVSCLEANCOM='hammer.bat -c MODE=all', - MSVSBUILDCOM='hammer.bat MODE=all', - MSVSREBUILD='hammer.bat -c MODE=all;' - 'hammer.bat MODE=all', - buildtarget=build_targets, - variant=variants) + project_list = env.MSVSProject( + target=solution_name + env['MSVSPROJECTSUFFIX'], + srcs=sources + headers + others + resources, + incs=[], + misc=[], + resources=[], + auto_build_solution=0, + MSVSCLEANCOM='hammer.bat -c MODE=all', + MSVSBUILDCOM='hammer.bat MODE=all', + MSVSREBUILD='hammer.bat -c MODE=all; hammer.bat MODE=all', + buildtarget=build_targets, + variant=variants) # Collect other projects for e in extra_build_targets: # Explicitly create a node for target, so SCons will expand env variables. diff --git a/third_party/sqlite/SConscript b/third_party/sqlite/SConscript index 72f4fc1..b348a54 100644 --- a/third_party/sqlite/SConscript +++ b/third_party/sqlite/SConscript @@ -11,7 +11,7 @@ env.Prepend( CPPPATH = [ '$ICU38_DIR/public/common', '$ICU38_DIR/public/i18n', - '..', + '$CHROME_SRC_DIR', ], ) |