1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
Import('env')
env = env.Clone()
env.ApplySConscript([
'$GTEST_DIR/../using_gtest.scons',
])
# TODO(port): Don't be too fooled by the presence of all the
# if env['PLATFORM'] == 'win32' tests in this file into thinking
# this is necessarily portable. They're just there to wall off the
# obviously windows-specific things
if env['PLATFORM'] == 'win32':
env_res = env.Clone()
env_res.Append(
CPPPATH = [
"$DESTINATION_ROOT",
".",
"$CHROME_SRC_DIR",
],
RCFLAGS = [
["/l", "0x409"],
],
)
resources = env_res.RES('mini_installer.rc')
env.Prepend(
CPPPATH = [
'$CHROME_SRC_DIR',
],
LIBS = [
'chrome',
],
)
if env['PLATFORM'] == 'win32':
env.FilterOut(
LIBS = ['DelayImp.lib'],
CCFLAGS = ['/RTC1'],
)
env.Prepend(
CCFLAGS = [
'/TP',
'/GS-', # because we link with /NODEFAULTLIB
],
LINKFLAGS = [
'/INCREMENTAL',
'/NODEFAULTLIB',
'/DEBUG',
'/SUBSYSTEM:WINDOWS',
'/OPT:NOWIN98',
'/ENTRY:"MainEntryPoint"',
'/MACHINE:X86',
'/FIXED:No',
'/SAFESEH:NO',
'/NXCOMPAT',
'/DYNAMICBASE:NO',
'/PDB:${TARGETS[1]}',
#'/MAP:${TARGETS[2]}',
],
LIBS = [
'shlwapi',
],
)
input_files = [
"mini_installer.cc",
"pe_resource.cc",
]
if env['PLATFORM'] == 'win32':
input_files.extend([
"$VISUAL_STUDIO/VC/crt/src/intel/mt_lib/memset.obj",
"$VISUAL_STUDIO/VC/crt/src/intel/mt_lib/P4_memset.obj",
])
input_files.extend(resources)
env.ChromeProgram('mini_installer', input_files)
env.AppendENVPath('PATH', r'C:\WINDOWS\system32')
packed = env.Command('$DESTINATION_ROOT/packed_files.txt',
['$CHROME_DIR/tools/build/win/create_installer_archive.py',
'$CHROME_DIR/installer/mini_installer/chrome.release'],
('$PYTHON ${SOURCES[0]}'
' --output_dir=${TARGET.dir}'
' --input_file=${SOURCES[1]}'))
env.Depends(packed, '$DESTINATION_ROOT/setup.exe')
# mini_installer.rc depends on the generated packed_files.txt
# TODO(sgk): implicit dependency should be picked up automatically
env.Depends(resources, packed)
exe_version_rc = env.ChromeVersionRC('mini_installer_exe_version.rc',
'mini_installer_exe_version.rc.version',
PWD=Dir('.'))
if env['PLATFORM'] == 'win32':
# TODO(sgk): implicit dependency should be picked up automatically
env_res.Depends(resources, exe_version_rc)
|