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

Side by Side Diff: chrome/installer/mini_installer/mini_installer.scons

Issue 15051: Convert from using env['PLATFORM'] directly to using the more flexible... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 Import('env') 5 Import('env')
6 6
7 env = env.Clone() 7 env = env.Clone()
8 8
9 env.ApplySConscript([ 9 env.ApplySConscript([
10 '$GTEST_DIR/../using_gtest.scons', 10 '$GTEST_DIR/../using_gtest.scons',
11 ]) 11 ])
12 12
13 13
14 # TODO(port): Don't be too fooled by the presence of all the 14 # TODO(port): Don't be too fooled by the presence of all the
15 # if env['PLATFORM'] == 'win32' tests in this file into thinking 15 # if env.Bit('windows') tests in this file into thinking
16 # this is necessarily portable. They're just there to wall off the 16 # this is necessarily portable. They're just there to wall off the
17 # obviously windows-specific things 17 # obviously windows-specific things
18 18
19 if env['PLATFORM'] == 'win32': 19 if env.Bit('windows'):
20 env_res = env.Clone() 20 env_res = env.Clone()
21 21
22 env_res.Append( 22 env_res.Append(
23 CPPPATH = [ 23 CPPPATH = [
24 "$DESTINATION_ROOT", 24 "$DESTINATION_ROOT",
25 ".", 25 ".",
26 "$CHROME_SRC_DIR", 26 "$CHROME_SRC_DIR",
27 ], 27 ],
28 RCFLAGS = [ 28 RCFLAGS = [
29 ["/l", "0x409"], 29 ["/l", "0x409"],
30 ], 30 ],
31 ) 31 )
32 32
33 resources = env_res.RES('mini_installer.rc') 33 resources = env_res.RES('mini_installer.rc')
34 34
35 35
36 env.Prepend( 36 env.Prepend(
37 CPPPATH = [ 37 CPPPATH = [
38 '$CHROME_SRC_DIR', 38 '$CHROME_SRC_DIR',
39 ], 39 ],
40 LIBS = [ 40 LIBS = [
41 'chrome', 41 'chrome',
42 ], 42 ],
43 ) 43 )
44 44
45 if env['PLATFORM'] == 'win32': 45 if env.Bit('windows'):
46 env.FilterOut( 46 env.FilterOut(
47 LIBS = ['DelayImp.lib'], 47 LIBS = ['DelayImp.lib'],
48 CCFLAGS = ['/RTC1'], 48 CCFLAGS = ['/RTC1'],
49 ) 49 )
50 50
51 env.Prepend( 51 env.Prepend(
52 CCFLAGS = [ 52 CCFLAGS = [
53 '/TP', 53 '/TP',
54 '/GS-', # because we link with /NODEFAULTLIB 54 '/GS-', # because we link with /NODEFAULTLIB
55 ], 55 ],
(...skipping 17 matching lines...) Expand all
73 LIBS = [ 73 LIBS = [
74 'shlwapi', 74 'shlwapi',
75 ], 75 ],
76 ) 76 )
77 77
78 input_files = [ 78 input_files = [
79 "mini_installer.cc", 79 "mini_installer.cc",
80 "pe_resource.cc", 80 "pe_resource.cc",
81 ] 81 ]
82 82
83 if env['PLATFORM'] == 'win32': 83 if env.Bit('windows'):
84 input_files.extend([ 84 input_files.extend([
85 "$VISUAL_STUDIO/VC/crt/src/intel/mt_lib/memset.obj", 85 "$VISUAL_STUDIO/VC/crt/src/intel/mt_lib/memset.obj",
86 "$VISUAL_STUDIO/VC/crt/src/intel/mt_lib/P4_memset.obj", 86 "$VISUAL_STUDIO/VC/crt/src/intel/mt_lib/P4_memset.obj",
87 ]) 87 ])
88 input_files.extend(resources) 88 input_files.extend(resources)
89 89
90 env.ChromeProgram('mini_installer', input_files) 90 env.ChromeProgram('mini_installer', input_files)
91 91
92 92
93 env.AppendENVPath('PATH', r'C:\WINDOWS\system32') 93 env.AppendENVPath('PATH', r'C:\WINDOWS\system32')
94 94
95 packed = env.Command('$DESTINATION_ROOT/packed_files.txt', 95 packed = env.Command('$DESTINATION_ROOT/packed_files.txt',
96 ['$CHROME_DIR/tools/build/win/create_installer_archive.py', 96 ['$CHROME_DIR/tools/build/win/create_installer_archive.py',
97 '$CHROME_DIR/installer/mini_installer/chrome.release'], 97 '$CHROME_DIR/installer/mini_installer/chrome.release'],
98 ('$PYTHON ${SOURCES[0]}' 98 ('$PYTHON ${SOURCES[0]}'
99 ' --output_dir=${TARGET.dir}' 99 ' --output_dir=${TARGET.dir}'
100 ' --input_file=${SOURCES[1]}')) 100 ' --input_file=${SOURCES[1]}'))
101 env.Depends(packed, '$DESTINATION_ROOT/setup.exe') 101 env.Depends(packed, '$DESTINATION_ROOT/setup.exe')
102 102
103 # mini_installer.rc depends on the generated packed_files.txt 103 # mini_installer.rc depends on the generated packed_files.txt
104 # TODO(sgk): implicit dependency should be picked up automatically 104 # TODO(sgk): implicit dependency should be picked up automatically
105 env.Depends(resources, packed) 105 env.Depends(resources, packed)
106 106
107 107
108 exe_version_rc = env.ChromeVersionRC('mini_installer_exe_version.rc', 108 exe_version_rc = env.ChromeVersionRC('mini_installer_exe_version.rc',
109 'mini_installer_exe_version.rc.version', 109 'mini_installer_exe_version.rc.version',
110 PWD=Dir('.')) 110 PWD=Dir('.'))
111 111
112 if env['PLATFORM'] == 'win32': 112 if env.Bit('windows'):
113 # TODO(sgk): implicit dependency should be picked up automatically 113 # TODO(sgk): implicit dependency should be picked up automatically
114 env_res.Depends(resources, exe_version_rc) 114 env_res.Depends(resources, exe_version_rc)
OLDNEW
« no previous file with comments | « chrome/installer/mini_installer/installer_unittests.scons ('k') | chrome/installer/setup/setup.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698