blob: 104f4a4d9d8dba21e8aa7a87cbcf01293df575a7 [file] [log] [blame]
[email protected]9f8303c2008-08-13 19:49:101# Copyright 2008, Google Inc.
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met:
7#
8# * Redistributions of source code must retain the above copyright
9# notice, this list of conditions and the following disclaimer.
10# * Redistributions in binary form must reproduce the above
11# copyright notice, this list of conditions and the following disclaimer
12# in the documentation and/or other materials provided with the
13# distribution.
14# * Neither the name of Google Inc. nor the names of its
15# contributors may be used to endorse or promote products derived from
16# this software without specific prior written permission.
17#
18# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
30Import('env', 'env_res', 'env_test')
31
32
33env = env.Clone()
34
35env['LIBS'].remove('DelayImp.lib')
36
37env_res = env_res.Clone()
38env_test = env_test.Clone()
39
40
41env_res.Append(
42 CPPPATH = [
43 "$TARGET_ROOT",
44 ".",
45 "#/..",
46 ],
47 RCFLAGS = [
48 ["/l", "0x409"],
49 ],
50)
51
52resources = env_res.RES('mini_installer.rc')
53
54
55env.Prepend(
56 CPPPATH = [
57 '$GTEST_DIR/include',
58 '$GTEST_DIR',
59 '#/..',
60 ],
61 CCFLAGS = [
62 '/TP',
63 '/GS-', # because we link with /NODEFAULTLIB
64 ],
65 LINKFLAGS = [
66 '/INCREMENTAL',
67 '/NODEFAULTLIB',
68 '/DEBUG',
69 '/SUBSYSTEM:WINDOWS',
70 '/OPT:NOWIN98',
71 '/ENTRY:"MainEntryPoint"',
72 '/MACHINE:X86',
73 '/FIXED:No',
74
75 '/SAFESEH:NO',
76 '/NXCOMPAT',
77 '/DYNAMICBASE:NO',
78
79 '/PDB:${TARGETS[1]}',
80 '/MAP:${TARGETS[2]}',
81 ],
82 LIBS = [
83 'shlwapi.lib',
84 ],
85)
86
87env['CCFLAGS'].remove('/RTC1')
88
89components = [
90 "$VISUAL_STUDIO/VC/crt/src/intel/mt_lib/memset.obj",
91 "$VISUAL_STUDIO/VC/crt/src/intel/mt_lib/P4_memset.obj",
92 "$TARGET_ROOT/chrome_dll.lib",
93]
94
95input_files = [
96 "mini_installer.cc",
97 "pe_resource.cc",
98]
99
[email protected]09933442008-08-13 22:53:59100exe = env.ChromeProgram('mini_installer',
101 components + resources + input_files)
[email protected]9f8303c2008-08-13 19:49:10102i = env.Install('$TARGET_ROOT', exe)
103env.Alias('chrome', i)
104
105
106env.AppendENVPath('PATH', r'C:\WINDOWS\system32')
107
108packed = env.Command('$TARGET_ROOT/packed_files.txt',
109 ['$CHROME_DIR/tools/build/win/create_installer_archive.py',
110 '$CHROME_DIR/installer/mini_installer/chrome.release'],
111 ('$PYTHON ${SOURCES[0]}'
112 ' --output_dir=${TARGET.dir}'
113 ' --input_file=${SOURCES[1]}'))
114env.Depends(packed, '$TARGET_ROOT/setup.exe')
115
116
117env.ChromeVersionRC('mini_installer_exe_version.rc',
118 'mini_installer_exe_version.rc.version',
119 PWD=Dir('.'))
120
121
122env_test.Prepend(
123 CPPDEFINES = [
124 'UNIT_TEST',
125 ],
126 CPPPATH = [
127 '$GTEST_DIR/include',
128 '$GTEST_DIR',
129 '#/..',
130 ],
131 LIBS = [
132 'gtest',
133 'icuuc',
134 'common',
135 'base',
136 ],
137)
138
139env_test.Prepend(
140 LINKFLAGS = [
141 '/INCREMENTAL',
142 '/DEBUG',
143
144 '/DELAYLOAD:"dwmapi.dll"',
145 '/DELAYLOAD:"uxtheme.dll"',
146
147 '/MACHINE:X86',
148 '/FIXED:No',
149
150 '/safeseh',
151 '/dynamicbase',
152 '/ignore:4199',
153 '/nxcompat',
154 ],
155 LIBS = [
156 'comsupp.lib',
157 'oleacc.lib',
158 'rpcrt4.lib',
159 'shlwapi.lib',
160 ],
161)
162
163input_files = [
164 '../setup/setup_constants$OBJSUFFIX',
165 '../util/copy_tree_work_item_unittest.cc',
166 '../util/create_dir_work_item_unittest.cc',
167 '../util/create_reg_key_work_item_unittest.cc',
168 '../util/delete_tree_work_item_unittest.cc',
169 '../util/helper_unittest.cc',
170 '../util/install_util_unittest.cc',
171 '../util/run_all_unittests.cc',
172 '../util/set_reg_value_work_item_unittest.cc',
173 '../util/work_item_list_unittest.cc',
174]
175
176libs = [
177 '../util/util.lib',
178]
179
[email protected]09933442008-08-13 22:53:59180exe = env_test.ChromeTestProgram('installer_unittests', input_files + libs)
[email protected]9f8303c2008-08-13 19:49:10181i = env_test.Install('$TARGET_ROOT', exe)
182
183env.Alias('chrome', i)