| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 # |
| 5 # this file is meant to be included within a target dict to generate the |
| 6 # mini_installer, the embedder must provide the following variables: |
| 7 # - chrome_dll_project: The target generating the main chrome DLLs. |
| 8 # - chrome_dll_path: The path to the version of chrome.dll to put in the |
| 9 # mini_installer. |
| 10 # - The output directory for mini_installer.exe. |
| 4 { | 11 { |
| 12 'type': 'executable', |
| 5 'dependencies': [ | 13 'dependencies': [ |
| 6 '<@(chrome_dll_project)', | 14 '<@(chrome_dll_project)', |
| 7 '../chrome.gyp:chrome', | 15 '../chrome.gyp:chrome', |
| 8 '../chrome.gyp:chrome_nacl_win64', | 16 '../chrome.gyp:chrome_nacl_win64', |
| 9 '../chrome.gyp:default_extensions', | 17 '../chrome.gyp:default_extensions', |
| 10 '../chrome.gyp:setup', | 18 '../chrome.gyp:setup', |
| 19 'installer_tools.gyp:test_installer_sentinel', |
| 11 ], | 20 ], |
| 12 'include_dirs': [ | 21 'include_dirs': [ |
| 13 '../..', | 22 '../..', |
| 14 '<(INTERMEDIATE_DIR)', | 23 '<(INTERMEDIATE_DIR)', |
| 15 '<(SHARED_INTERMEDIATE_DIR)/chrome', | 24 '<(SHARED_INTERMEDIATE_DIR)/chrome', |
| 16 ], | 25 ], |
| 17 'sources': [ | 26 'sources': [ |
| 18 '<(INTERMEDIATE_DIR)/packed_files.rc', | 27 '<(INTERMEDIATE_DIR)/packed_files.rc', |
| 19 'mini_installer/appid.h', | 28 'mini_installer/appid.h', |
| 20 'mini_installer/chrome.release', | 29 'mini_installer/chrome.release', |
| (...skipping 10 matching lines...) Expand all Loading... |
| 31 'mini_installer/mini_installer_constants.h', | 40 'mini_installer/mini_installer_constants.h', |
| 32 'mini_installer/mini_installer_exe_version.rc.version', | 41 'mini_installer/mini_installer_exe_version.rc.version', |
| 33 'mini_installer/mini_installer_resource.h', | 42 'mini_installer/mini_installer_resource.h', |
| 34 'mini_installer/mini_string.cc', | 43 'mini_installer/mini_string.cc', |
| 35 'mini_installer/mini_string.h', | 44 'mini_installer/mini_string.h', |
| 36 'mini_installer/pe_resource.cc', | 45 'mini_installer/pe_resource.cc', |
| 37 'mini_installer/pe_resource.h', | 46 'mini_installer/pe_resource.h', |
| 38 'mini_installer/regkey.cc', | 47 'mini_installer/regkey.cc', |
| 39 'mini_installer/regkey.h', | 48 'mini_installer/regkey.h', |
| 40 ], | 49 ], |
| 41 # Disable precompiled headers for this project, to avoid | |
| 42 # linker errors when building with VS 2008. | |
| 43 'msvs_precompiled_header': '', | |
| 44 'msvs_precompiled_source': '', | |
| 45 'msvs_settings': { | 50 'msvs_settings': { |
| 46 'VCCLCompilerTool': { | 51 'VCCLCompilerTool': { |
| 47 'EnableIntrinsicFunctions': 'true', | 52 'EnableIntrinsicFunctions': 'true', |
| 48 'BufferSecurityCheck': 'false', | 53 'BufferSecurityCheck': 'false', |
| 49 'BasicRuntimeChecks': '0', | 54 'BasicRuntimeChecks': '0', |
| 50 'ExceptionHandling': '0', | 55 'ExceptionHandling': '0', |
| 51 }, | 56 }, |
| 52 'VCLinkerTool': { | 57 'VCLinkerTool': { |
| 53 'OutputFile': '<(output_dir)/mini_installer.exe', | 58 'OutputFile': '<(output_dir)/mini_installer.exe', |
| 54 'RandomizedBaseAddress': '1', | 59 'RandomizedBaseAddress': '1', |
| (...skipping 19 matching lines...) Expand all Loading... |
| 74 }, | 79 }, |
| 75 'configurations': { | 80 'configurations': { |
| 76 'Debug_Base': { | 81 'Debug_Base': { |
| 77 'msvs_settings': { | 82 'msvs_settings': { |
| 78 'VCCLCompilerTool': { | 83 'VCCLCompilerTool': { |
| 79 'BasicRuntimeChecks': '0', | 84 'BasicRuntimeChecks': '0', |
| 80 'BufferSecurityCheck': 'false', | 85 'BufferSecurityCheck': 'false', |
| 81 'ExceptionHandling': '0', | 86 'ExceptionHandling': '0', |
| 82 }, | 87 }, |
| 83 'VCLinkerTool': { | 88 'VCLinkerTool': { |
| 84 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS | 89 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS |
| 85 'AdditionalOptions': [ | 90 'AdditionalOptions': [ |
| 86 '/safeseh:no', | 91 '/safeseh:no', |
| 87 '/dynamicbase:no', | 92 '/dynamicbase:no', |
| 88 '/ignore:4199', | 93 '/ignore:4199', |
| 89 '/ignore:4221', | 94 '/ignore:4221', |
| 90 '/nxcompat', | 95 '/nxcompat', |
| 91 ], | 96 ], |
| 92 }, | 97 }, |
| 93 }, | 98 }, |
| 94 }, | 99 }, |
| 95 'Release_Base': { | 100 'Release_Base': { |
| 96 'includes': ['../../build/internal/release_defaults.gypi'], | 101 'includes': ['../../build/internal/release_defaults.gypi'], |
| 97 'msvs_settings': { | 102 'msvs_settings': { |
| 98 'VCCLCompilerTool': { | 103 'VCCLCompilerTool': { |
| 99 'EnableIntrinsicFunctions': 'true', | 104 'EnableIntrinsicFunctions': 'true', |
| 100 'BasicRuntimeChecks': '0', | 105 'BasicRuntimeChecks': '0', |
| 101 'BufferSecurityCheck': 'false', | 106 'BufferSecurityCheck': 'false', |
| 102 'ExceptionHandling': '0', | 107 'ExceptionHandling': '0', |
| 108 'WholeProgramOptimization': 'false', |
| 103 }, | 109 }, |
| 104 'VCLinkerTool': { | 110 'VCLinkerTool': { |
| 105 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS | 111 'SubSystem': '2', # Set /SUBSYSTEM:WINDOWS |
| 106 'Profile': 'false', # Conflicts with /FIXED | 112 'Profile': 'false', # Conflicts with /FIXED |
| 107 'AdditionalOptions': [ | 113 'AdditionalOptions': [ |
| 108 '/SAFESEH:NO', | 114 '/SAFESEH:NO', |
| 109 '/NXCOMPAT', | 115 '/NXCOMPAT', |
| 110 '/DYNAMICBASE:NO', | 116 '/DYNAMICBASE:NO', |
| 111 '/FIXED', | 117 '/FIXED', |
| 112 ], | 118 ], |
| 113 }, | 119 }, |
| 114 }, | 120 }, |
| 115 }, | 121 }, |
| 116 }, | 122 }, |
| 123 |
| 124 # Disable precompiled headers for this project, to avoid |
| 125 # linker errors when building with VS 2008. |
| 126 'msvs_precompiled_header': '', |
| 127 'msvs_precompiled_source': '', |
| 128 |
| 129 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
| 130 'msvs_disabled_warnings': [ 4267, ], |
| 131 |
| 132 'variables': { |
| 133 # Opt out the common compatibility manifest to work around |
| 134 # crbug.com/272660. |
| 135 # TODO(yukawa): Enable the common compatibility manifest again. |
| 136 'win_exe_compatibility_manifest': '', |
| 137 }, |
| 117 'rules': [ | 138 'rules': [ |
| 118 { | 139 { |
| 119 'rule_name': 'mini_installer_version', | 140 'rule_name': 'mini_installer_version', |
| 120 'extension': 'version', | 141 'extension': 'version', |
| 121 'variables': { | 142 'variables': { |
| 122 'template_input_path': | 143 'template_input_path': 'mini_installer/mini_installer_exe_version.rc.ver
sion', |
| 123 'mini_installer/mini_installer_exe_version.rc.version', | |
| 124 }, | 144 }, |
| 125 'inputs': [ | 145 'inputs': [ |
| 126 '<(template_input_path)', | 146 '<(template_input_path)', |
| 127 '<(version_path)', | 147 '<(version_path)', |
| 128 '<(lastchange_path)', | 148 '<(lastchange_path)', |
| 129 '<(branding_dir)/BRANDING', | 149 '<(branding_dir)/BRANDING', |
| 130 ], | 150 ], |
| 131 'outputs': [ | 151 'outputs': [ |
| 132 '<(INTERMEDIATE_DIR)/mini_installer_exe_version.rc', | 152 '<(PRODUCT_DIR)/mini_installer_exe_version.rc', |
| 133 ], | 153 ], |
| 134 'action': [ | 154 'action': [ |
| 135 'python', '<(version_py)', | 155 'python', '<(version_py)', |
| 136 '-f', '<(version_path)', | 156 '-f', '<(version_path)', |
| 137 '-f', '<(lastchange_path)', | 157 '-f', '<(lastchange_path)', |
| 138 '-f', '<(branding_dir)/BRANDING', | 158 '-f', '<(branding_dir)/BRANDING', |
| 139 '<(template_input_path)', | 159 '<(template_input_path)', |
| 140 '<@(_outputs)', | 160 '<@(_outputs)', |
| 141 ], | 161 ], |
| 142 'process_outputs_as_sources': 1, | 162 'process_outputs_as_sources': 1, |
| 143 'message': 'Generating version information' | 163 'message': 'Generating version information' |
| 144 }, | 164 }, |
| 165 ], |
| 166 'actions': [ |
| 145 { | 167 { |
| 146 'rule_name': 'installer_archive', | 168 'action_name': 'installer_archive', |
| 147 'extension': 'release', | |
| 148 'variables': { | 169 'variables': { |
| 149 'create_installer_archive_py_path': | 170 'create_installer_archive_py_path': |
| 150 '../tools/build/win/create_installer_archive.py', | 171 '../tools/build/win/create_installer_archive.py', |
| 151 }, | 172 }, |
| 152 'conditions': [ | 173 'conditions': [ |
| 153 ['enable_hidpi == 1', { | 174 ['enable_hidpi == 1', { |
| 154 'variables': { | 175 'variables': { |
| 155 'enable_hidpi_flag': '--enable_hidpi=1', | 176 'enable_hidpi_flag': '--enable_hidpi=1', |
| 156 }, | 177 }, |
| 157 }, { | 178 }, { |
| 158 'variables': { | 179 'variables': { |
| 159 'enable_hidpi_flag': '', | 180 'enable_hidpi_flag': '', |
| 160 }, | 181 }, |
| 161 }], | 182 }], |
| 183 ['component == "shared_library"', { |
| 184 'variables': { |
| 185 'component_build_flag': '--component_build=1', |
| 186 }, |
| 187 }, { |
| 188 'variables': { |
| 189 'component_build_flag': '', |
| 190 }, |
| 191 'outputs': [ |
| 192 '<(output_dir)/chrome.packed.7z', |
| 193 ], |
| 194 }], |
| 195 ['disable_nacl==1', { |
| 196 'inputs!': [ |
| 197 '<(PRODUCT_DIR)/nacl64.exe', |
| 198 '<(PRODUCT_DIR)/nacl_irt_x86_32.nexe', |
| 199 '<(PRODUCT_DIR)/nacl_irt_x86_64.nexe', |
| 200 ], |
| 201 }], |
| 162 ['target_arch=="x64"', { | 202 ['target_arch=="x64"', { |
| 163 'inputs!': [ | 203 'inputs!': [ |
| 164 '<(PRODUCT_DIR)/nacl64.exe', | 204 '<(PRODUCT_DIR)/nacl64.exe', |
| 165 '<(PRODUCT_DIR)/nacl_irt_x86_32.nexe', | 205 '<(PRODUCT_DIR)/nacl_irt_x86_32.nexe', |
| 166 ], | 206 ], |
| 167 'variables': { | 207 'variables': { |
| 168 'target_arch_flag': '--target_arch=x64', | 208 'target_arch_flag': '--target_arch=x64', |
| 169 }, | 209 }, |
| 170 }, { | 210 }, { |
| 171 'variables': { | 211 'variables': { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 189 }], | 229 }], |
| 190 ], | 230 ], |
| 191 'inputs': [ | 231 'inputs': [ |
| 192 '<(create_installer_archive_py_path)', | 232 '<(create_installer_archive_py_path)', |
| 193 '<(PRODUCT_DIR)/chrome.exe', | 233 '<(PRODUCT_DIR)/chrome.exe', |
| 194 '<@(chrome_dll_path)', | 234 '<@(chrome_dll_path)', |
| 195 '<(PRODUCT_DIR)/nacl64.exe', | 235 '<(PRODUCT_DIR)/nacl64.exe', |
| 196 '<(PRODUCT_DIR)/nacl_irt_x86_32.nexe', | 236 '<(PRODUCT_DIR)/nacl_irt_x86_32.nexe', |
| 197 '<(PRODUCT_DIR)/nacl_irt_x86_64.nexe', | 237 '<(PRODUCT_DIR)/nacl_irt_x86_64.nexe', |
| 198 '<(PRODUCT_DIR)/locales/en-US.pak', | 238 '<(PRODUCT_DIR)/locales/en-US.pak', |
| 239 '<(PRODUCT_DIR)/setup.exe', |
| 240 'mini_installer/chrome.release', |
| 199 ], | 241 ], |
| 200 'outputs': [ | 242 'outputs': [ |
| 201 'xxx.out', | 243 # Also note that chrome.packed.7z is defined as an output in a |
| 202 '<(output_dir)/<(RULE_INPUT_NAME).7z', | 244 # conditional above. |
| 203 '<(output_dir)/<(RULE_INPUT_NAME).packed.7z', | 245 '<(output_dir)/chrome.7z', |
| 204 '<(output_dir)/setup.ex_', | 246 '<(output_dir)/setup.ex_', |
| 205 '<(INTERMEDIATE_DIR)/packed_files.rc', | 247 '<(INTERMEDIATE_DIR)/packed_files.rc', |
| 206 ], | 248 ], |
| 249 'depfile': '<(INTERMEDIATE_DIR)/installer_archive.d', |
| 207 'action': [ | 250 'action': [ |
| 208 'python', | 251 'python', |
| 209 '<(create_installer_archive_py_path)', | 252 '<(create_installer_archive_py_path)', |
| 210 '--build_dir=<(PRODUCT_DIR)', | 253 '--build_dir=<(PRODUCT_DIR)', |
| 211 '--output_dir=<(output_dir)', | 254 '--output_dir=<(output_dir)', |
| 212 '--staging_dir=<(INTERMEDIATE_DIR)', | 255 '--staging_dir=<(INTERMEDIATE_DIR)', |
| 213 '--input_file=<(RULE_INPUT_PATH)', | 256 '--input_file=mini_installer/chrome.release', |
| 214 '--resource_file_path=<(INTERMEDIATE_DIR)/packed_files.rc', | 257 '--resource_file_path=<(INTERMEDIATE_DIR)/packed_files.rc', |
| 258 '--depfile=<(INTERMEDIATE_DIR)/installer_archive.d', |
| 215 '<(enable_hidpi_flag)', | 259 '<(enable_hidpi_flag)', |
| 260 '<(component_build_flag)', |
| 216 '<(target_arch_flag)', | 261 '<(target_arch_flag)', |
| 217 # TODO(sgk): may just use environment variables | 262 # TODO(sgk): may just use environment variables |
| 218 #'--distribution=$(CHROMIUM_BUILD)', | 263 #'--distribution=$(CHROMIUM_BUILD)', |
| 219 '--distribution=_google_chrome', | 264 '--distribution=_google_chrome', |
| 220 # Optional arguments to generate diff installer | 265 # Optional arguments to generate diff installer |
| 221 #'--last_chrome_installer=C:/Temp/base', | 266 #'--last_chrome_installer=C:/Temp/base', |
| 222 #'--setup_exe_format=DIFF', | 267 #'--setup_exe_format=DIFF', |
| 223 #'--diff_algorithm=COURGETTE', | 268 #'--diff_algorithm=COURGETTE', |
| 224 # Optional argument for verbose archiving output. | 269 # Optional argument for verbose archiving output. |
| 225 #'--verbose', | 270 #'--verbose', |
| 226 ], | 271 ], |
| 227 'message': 'Create installer archive', | 272 'message': 'Create installer archive', |
| 228 }, | 273 }, |
| 229 ], | 274 ], |
| 230 'conditions': [ | 275 'conditions': [ |
| 231 # TODO(mark): <(branding_dir) should be defined by the | |
| 232 # global condition block at the bottom of the file, but | |
| 233 # this doesn't work due to the following issue: | |
| 234 # | |
| 235 # http://code.google.com/p/gyp/issues/detail?id=22 | |
| 236 # | |
| 237 # Remove this block once the above issue is fixed. | |
| 238 ['branding == "Chrome"', { | |
| 239 'variables': { | |
| 240 'branding_dir': '../app/theme/google_chrome', | |
| 241 }, | |
| 242 }, { # else branding!="Chrome" | |
| 243 'variables': { | |
| 244 'branding_dir': '../app/theme/chromium', | |
| 245 }, | |
| 246 }], | |
| 247 ['OS=="win" and buildtype=="Official"', { | 276 ['OS=="win" and buildtype=="Official"', { |
| 248 # Optimize for size when doing an official build. | 277 # Optimize for size when doing an official build. |
| 249 'optimize' :'size', | 278 'optimize' :'size', |
| 250 }], | 279 }], |
| 251 ], | 280 ], |
| 252 } | 281 } |
| OLD | NEW |