1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import("//build/config/features.gni")
6 import("//build/config/ui.gni")
7 import("//build/module_args/v8.gni")
8 import("//chrome/version.gni")
9 import("//third_party/icu/config.gni")
11 config("mini_installer_compiler_flags") {
14 "/Gy", # Enable function-level linking.
15 "/GS-", # Disable buffer security checking.
16 "/FS", # Preserve previous PDB behavior.
34 "mini_installer_constants.cc",
35 "mini_installer_constants.h",
36 "mini_installer_resource.h",
45 configs -= [ "//build/config/compiler:compiler" ]
46 configs += [ ":mini_installer_compiler_flags" ]
49 #"test_installer_sentinel", TODO(GYP) bug 521052.
53 process_version("version") {
54 template_file = "mini_installer_exe_version.rc.version"
55 output = "$target_gen_dir/mini_installer_version.rc"
58 source_set("unit_tests") {
62 "configuration_test.cc",
64 "mini_string_test.cc",
75 packed_files_rc_file = "$target_gen_dir/packed_files.rc"
78 script = "//chrome/tools/build/win/create_installer_archive.py"
80 release_file = "chrome.release"
83 "$root_out_dir/chrome.exe",
84 "$root_out_dir/chrome.dll",
85 "$root_out_dir/locales/en-US.pak",
86 "$root_out_dir/setup.exe",
91 # See also chrome.packed.7z conditionally added below.
92 "$root_out_dir/chrome.7z",
93 "$root_out_dir/setup.ex_",
98 rebase_path(root_out_dir, root_build_dir),
100 rebase_path(root_gen_dir, root_build_dir),
102 rebase_path(release_file, root_build_dir),
103 "--resource_file_path",
104 rebase_path(packed_files_rc_file, root_build_dir),
105 "--target_arch=$current_cpu",
106 "--distribution=_google_chrome",
108 # Optional arguments to generate diff installer.
109 #'--last_chrome_installer=C:/Temp/base',
110 #'--setup_exe_format=DIFF',
111 #'--diff_algorithm=COURGETTE',
115 args += [ "--enable_hidpi=1" ]
117 if (is_component_build) {
118 args += [ "--component_build=1" ]
120 outputs += [ "$root_out_dir/chrome.packed.7z" ]
124 inputs += [ "$root_out_dir/nacl_irt_x86_64.nexe" ]
125 if (cpu_arch == "x86") {
127 "$root_out_dir/nacl64.exe",
128 "$root_out_dir/nacl_irt_x86_32.nexe",
133 if (icu_use_data_file) {
134 inputs += [ "$root_out_dir/icudtl.dat" ]
136 inputs += [ "$root_out_dir/icudt.dll" ]
139 if (v8_use_external_startup_data) {
141 "$root_out_dir/natives_blob.bin",
142 "$root_out_dir/snapshot_blob.bin",
146 depfile = "$target_gen_dir/archive.d"
149 rebase_path(depfile, root_build_dir),
155 "//chrome/browser/extensions/default_extensions",
156 "//chrome/installer/setup",
157 "//third_party/icu:icudata",
159 #"../chrome.gyp:chrome_nacl_win64", TODO(GYP) bug 512869.
163 # TODO(GYP) bug 521052: This target needs to be checked to make sure its the
164 # same size as the GYP build.
165 executable("mini_installer") {
168 packed_files_rc_file,
171 # This target is special so we manually override most linker flags and
172 # specify our own to keep the size down.
174 "//build/config/compiler:compiler",
175 "//build/config/win:common_linker_setup",
176 "//build/config/win:console",
179 ":mini_installer_compiler_flags",
180 "//build/config/win:windowed",
184 "/ENTRY:MainEntryPoint",
189 libs = [ "setupapi.lib" ]
195 "//build/config/sanitizers:deps",
196 "//build/win:default_exe_manifest",