From caeb7a0ca33ec99cd3dc68e95ca23ca4aa7e8068 Mon Sep 17 00:00:00 2001 From: "sgk@google.com" Date: Sat, 17 Jan 2009 02:25:22 +0000 Subject: Generate all chrome .vcproj files: * Path name translation (/ to \) of various MSVSTool attributes. * Explicit keyword= arguments to MSVSProject. This will likely go away eventually in favor of uniform behavior. * Add a relative_path_substitutions array that can be used to substitute in Visual Studio variable like $(OutDir). * Add a local_directory_prefix that can be set to './' to only affect files in the current directory. * Additional Keyword ordering in Tool attributes to continue to match the default order Visual Studio generates. * Add a Derived() proxy class that can wrap a File node to tell the .vcproj generation that we want the derived file, not its source(s), in the file list. * In the individual *.scons files, add the necessary files (mostly .h files) to file lists, and update MSVSProject() calls with the additional necessary information. Result is identical .vcproj files modulo the following differences: * Four locales .vcproj files (da, en-US, he and zh-TW) with source file orders that don't match the other locale .vcproj files have re-ordered file lists to match the rest. * Cosmetic XML changes (white space, ending tags) in: chrome/app/chrome_dll.vcproj chrome/app/generated_resources.vcproj net/build/net_resources.vcproj * Removal or addition of ./ prefixes from various files that don't match the other file specifications within their individual .vcproj files: chrome/installer/util/util.vcproj net/build/net.vcproj net/build/net_unittests.vcproj * Add missing empty sections (, , ) for consistency with other .vcproj files: chrome/tools/test/image_diff/image_diff.vcproj third_party/libpng/libpng.vcproj third_party/zlib/zlib.vcproj * Add missing RootNameSpace attribute: chrome/test/automation/automation.vcproj testing/gtest.vcproj * Use && instead of \r\n as a command separator, to sidestep XML-generation problems: chrome/app/chrome_exe.vcproj * Remove unnecessary (?) duplicate files in the file list: chrome/browser/views/browser_views.vcproj (event_utils.cc and event_utils.h were duplicated) Review URL: http://codereview.chromium.org/17603 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8253 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/installer/setup/setup.scons | 75 +++++++++++++++++++++++++++++--------- 1 file changed, 58 insertions(+), 17 deletions(-) (limited to 'chrome/installer/setup/setup.scons') diff --git a/chrome/installer/setup/setup.scons b/chrome/installer/setup/setup.scons index aa500eb..260d0e6 100644 --- a/chrome/installer/setup/setup.scons +++ b/chrome/installer/setup/setup.scons @@ -72,35 +72,76 @@ if env.Bit('windows'): ], ) - -input_files = [ +input_files = ChromeFileList([ + # TODO(sgk): violate standard indentation so we don't have to + # reindent too much when we remove the explicit MSVSFilter() calls + # in favor of generating the hierarchy to reflect the file system. + MSVSFilter('resources', [ + 'setup.ico', + 'setup.rc', + 'setup_exe_version.rc.version', + 'setup_resource.h', + ]), 'install.cc', 'main.cc', 'setup.cc', + 'setup.h', 'setup_constants.cc', + 'setup_constants.h', 'uninstall.cc', -] + 'uninstall.h', +]) # TODO(port): if env.Bit('windows'): - env.ChromeProgram('setup', resources + input_files) - -env.ChromeMSVSProject('$CHROME_DIR/installer/setup/setup.vcproj', - dependencies = [ - '$BASE_DIR/build/base.vcproj', - '$CHROME_DIR/common/common.vcproj', - '$ICU38_DIR/build/icu.vcproj', - '$LZMA_SDK_DIR/7z_C.vcproj', - '$BSPATCH_DIR/bspatch.vcproj', - '$CHROME_DIR/installer/util/util.vcproj', - ], - guid='{21C76E6E-8B38-44D6-8148-B589C13B9554}') + env.ChromeProgram('setup', resources + input_files[1:]) + +p = env.ChromeMSVSProject('setup.vcproj', + dest=('$CHROME_SRC_DIR/chrome/' + + 'installer/setup/setup.vcproj'), + guid='{21C76E6E-8B38-44D6-8148-B589C13B9554}', + keyword='Win32Proj', + dependencies = [ + '$BASE_DIR/build/base.vcproj', + '$CHROME_DIR/common/common.vcproj', + '$ICU38_DIR/build/icu.vcproj', + '$LZMA_SDK_DIR/7z_C.vcproj', + '$BSPATCH_DIR/bspatch.vcproj', + '$CHROME_DIR/installer/util/util.vcproj', + ], + # TODO(sgk): when we can intuit the hierarchy + # from the built targets. + #buildtargets=TODO, + files=input_files, + relative_path_prefix='./', + tools=[ + 'Version', + 'VCCLCompilerTool', + 'VCResourceCompilerTool', + 'VCLinkerTool', + 'VCManifestTool', + ], + ConfigurationType='1') + +p.AddToolFile('$CHROME_DIR/tools/build/win/version.rules') + +p.AddConfig('Debug|Win32', + InheritedPropertySheets=[ + './setup_debug.vsprops', + '$(SolutionDir)installer/util/using_util.vsprops', + ]) + +p.AddConfig('Release|Win32', + InheritedPropertySheets=[ + './setup_release.vsprops', + '$(SolutionDir)installer/util/using_util.vsprops', + ]) # TODO(port): if env.Bit('windows'): exe_version_rc = env.ChromeVersionRC('setup_exe_version.rc', - 'setup_exe_version.rc.version', - PWD = env.Dir('.')) + 'setup_exe_version.rc.version', + PWD = env.Dir('.')) # TODO(sgk): implicit dependency should be picked up automatically env_res.Depends(resources, exe_version_rc) -- cgit v1.1