OLD | NEW |
| 1 # |
| 2 # Expects command line definition for variable 'target_arch' |
| 3 # Must be either 'ia32' or 'x64' |
| 4 # |
| 5 # This .gyp file sits in directory 'installer'. |
| 6 # When gyp translates files locations, base them here. |
| 7 # |
| 8 # The solution file from this .gyp source lands in 'installer/build/<(target_arc
h)'. |
| 9 # When gyp does not translate file locations, base them here. |
| 10 # |
1 { | 11 { |
2 'includes': [ '../defaults.gypi' ], | 12 'includes': [ '../defaults.gypi' ], |
3 | |
4 'variables': | 13 'variables': |
5 { | 14 { |
| 15 # |
| 16 # Architecture specification |
| 17 # -- WiX uses {x86,x64}. VS uses {ia32,x64} |
| 18 # |
| 19 'conditions' : |
| 20 [ |
| 21 [ 'target_arch=="ia32"', { 'candle_arch': 'x86' } ], |
| 22 [ 'target_arch=="x64"', { 'candle_arch': 'x64' } ] |
| 23 ], |
| 24 |
| 25 # |
| 26 # Build directories, both common and architecture-specific |
| 27 # |
| 28 'build_dir_arch': 'build/<(target_arch)', |
| 29 'build_dir_common': 'build/common', |
| 30 |
| 31 # |
| 32 # MSI file names. |
| 33 # -- The base MSI is a single-language MSI as originally constructed. |
| 34 # This is the one from which all transforms are derived. |
| 35 # -- The interim MSI is the working copy of the multilanguage MSI during the
build process. |
| 36 # It starts off as a copy of the base MSI. |
| 37 # Transforms are added to the MSI one at a time. |
| 38 # -- The final MSI is the ultimate product of the build. |
| 39 # It is simply the last interim MSI, after all the transforms have been
embedded. |
| 40 # |
| 41 'base_msi': '<(build_dir_arch)/adblockplusie-BASE-<(target_arch).msi', |
| 42 'interim_msi': '<(build_dir_arch)/adblockplusie-INTERIM-<(target_arch).msi', |
| 43 'final_msi': '<(build_dir_arch)/adbblockplusie-multilanguage-<(target_arch).
msi', |
| 44 |
| 45 # |
| 46 # WiX installer sources for the compiler, architecture-specific. |
| 47 # The top source is what goes on the command line. |
| 48 # All the sources are inputs. |
| 49 # Note that locality sources (.wxl) are not present here because they're han
dled at link time. |
| 50 # |
| 51 'installer_source_top_file': 'src/msi/adblockplusie.wxs', |
| 52 'installer_source_files': |
| 53 [ |
| 54 '<(installer_source_top_file)', |
| 55 'src/msi/bho_registry_value.wxi', |
| 56 'src/msi/dll_class.wxi', |
| 57 ], |
| 58 'installer_object_file': '<(build_dir_arch)/adblockplusie.wixobj', |
| 59 |
| 60 # |
| 61 # WiX installer sources for the compiler, common to all architectures |
| 62 # |
| 63 'common_source_files': [ 'src/msi/custom_WixUI_InstallDir.wxs' ], |
| 64 'common_object_file': '<(build_dir_common)/common.wixobj', |
| 65 |
| 66 # |
| 67 # All the assets from the plug-in that are copied into the MSI file. |
| 68 # |
| 69 'payloads': [], |
| 70 |
6 # The 'component' variable is required to use 'defaults.gypi'. | 71 # The 'component' variable is required to use 'defaults.gypi'. |
7 # It's value 'shared_library' is duplicated by the 'type' property of a
target. | 72 # It's value 'shared_library' is duplicated by the 'type' property of a
target. |
8 # We may want to migrate compiler settings for the CA library at some po
int and stop using 'defaults.gypi' here | 73 # We may want to migrate compiler settings for the CA library at some po
int and stop using 'defaults.gypi' here |
9 'component%': '', | 74 'component%': '', |
10 }, | 75 }, |
11 | 76 |
12 'target_defaults': | 77 'target_defaults': |
13 { | 78 { |
14 'msvs_cygwin_shell': 0, | 79 'msvs_cygwin_shell': 0, |
| 80 'variables': { |
| 81 # |
| 82 # We don't really want a default 'locale_id', but we need one to avoid
an "undefined variable" error when the ".wxl" rule is invoked. |
| 83 # Note that the action in the rule uses later-phase substitution with
">", which occurs after the rule is merged with the target. |
| 84 # Apparently, though, it's also being evaluated earlier, before 'local
e_id' is defined in the target. |
| 85 # Therefore, count this as a workaround for a gyp defect. |
| 86 # |
| 87 'locale_id%': '0', |
| 88 |
| 89 # |
| 90 # We do want a default 'msi_build_phase', because in all but the first
MSI build we want the flag "additional" |
| 91 # |
| 92 'msi_build_phase%': 'additional', |
| 93 }, |
| 94 'rules': |
| 95 [ { |
| 96 # |
| 97 # Rule to build a single-language MSI as part of a chain to create a m
ultiple-language MSI |
| 98 # The rule runs a .cmd file to execute the commands; this chose arise
s from gyp limitations and defects. |
| 99 # |
| 100 # gyp can only handle a single rule per extension. |
| 101 # Since we have only one ".wxl" file, we need to run all the operation
s (link MSI, diff to MST, embed MST into MSI) with a single action. |
| 102 # gyp does not have syntax for multi-line actions. |
| 103 # Including a newline as a token doesn't work because of the way gyp "
fixes" path names; it treats the newline as a path, prefixes it, and quotes it a
ll. |
| 104 # |
| 105 # Furthermore, there's the issue of overriding the rule for the first
MSI, the one that generates the BASE against which transforms are generated. |
| 106 # In order to override the rule, we'd need to duplicate most of this o
ne, particularly all the file name expressions, violating the write-once princip
le. |
| 107 # |
| 108 'rule_name': 'MSI Build', |
| 109 'extension': 'wxl', |
| 110 'message': 'Generating embedded transform for "<(RULE_INPUT_ROOT)"', |
| 111 'inputs': [ 'emb.vbs', '<(base_msi)', '<@(payloads)' ], |
| 112 'outputs': [ '<(build_dir_arch)/adblockplusie-<(RULE_INPUT_ROOT)-<(tar
get_arch).msi', '<(build_dir_arch)/adblockplusie-<(RULE_INPUT_ROOT)-<(target_arc
h).mst' ], |
| 113 'action': |
| 114 [ |
| 115 '..\..\msibuild.cmd >(msi_build_phase) >(locale_id) >(RULE_INPUT_ROO
T)', '<(RULE_INPUT_PATH)', |
| 116 '<(build_dir_arch)/adblockplusie-<(RULE_INPUT_ROOT)-<(target_arc
h).msi', |
| 117 '<(build_dir_arch)/adblockplusie-<(RULE_INPUT_ROOT)-<(target_arc
h).mst', |
| 118 '<(build_dir_arch)/adblockplusie-BASE-<(target_arch).msi', |
| 119 '<(build_dir_arch)/adblockplusie-INTERIM-<(target_arch).msi', |
| 120 '<(installer_object_file)', '<(common_object_file)', |
| 121 ] |
| 122 } ], |
15 }, | 123 }, |
16 | 124 |
17 'targets': | 125 'targets': |
18 [ | 126 [ |
19 ############# | 127 ############# |
20 # Custom Action library for the installer | 128 # Compile common WiX source. |
| 129 # All the WiX-linked sources that depend neither on architecture nor confi
guration. |
| 130 # Principally for user interface. |
| 131 ############# |
| 132 { |
| 133 'target_name': 'Installer, common WiX', |
| 134 'type': 'none', |
| 135 'actions': |
| 136 [ { |
| 137 'action_name': 'WiX compile common', |
| 138 'message': 'Compiling common WiX sources', |
| 139 'inputs': |
| 140 [ |
| 141 '<@(common_source_files)' |
| 142 ], |
| 143 'outputs': |
| 144 [ |
| 145 # List must contain only a single element so that "-out" argument works
correctly. |
| 146 '<(common_object_file)' |
| 147 ], |
| 148 'action': |
| 149 [ 'candle -nologo -dNoDefault ', '-out', '<@(_outputs)', '<@(_inputs)' ] |
| 150 } ] |
| 151 }, |
| 152 |
| 153 ############# |
| 154 # Compile installer WiX source. |
| 155 # Platform-specific. |
| 156 ############# |
| 157 { |
| 158 'target_name': 'Installer, architecture-specific WiX', |
| 159 'type': 'none', |
| 160 'actions': |
| 161 [ { |
| 162 'action_name': 'Compile WiX installer', |
| 163 'message': 'Compiling installer WiX sources', |
| 164 'inputs': |
| 165 [ |
| 166 '<@(installer_source_files)' |
| 167 ], |
| 168 'outputs': |
| 169 [ |
| 170 # List must contain only a single element so that "-out" argument works
correctly. |
| 171 '<(installer_object_file)' |
| 172 ], |
| 173 'action': |
| 174 [ 'candle -nologo -arch <(candle_arch) -dNoDefault -dVersion=91.0 -dConf
iguration=Release', '-out', '<@(_outputs)', '<(installer_source_top_file)' ] |
| 175 } ] |
| 176 }, |
| 177 |
| 178 ################################## |
| 179 # MSI targets |
| 180 # |
| 181 # Building a multiple-language MSI requires embedding a transform for each lan
guage into a single MSI database. |
| 182 # Each step requires a locale identifier (Microsoft LCID) as a parameter and a
WiX localization file (.wxl) as a source. |
| 183 # gyp does not support per-source-file parameters, so we're stuck with one pro
ject per step. |
| 184 # The naming convention for projects: |
| 185 # - The token "MSI". Projects appear in dictionary order in the resulting solu
tion file. A common initial token groups them. |
| 186 # - The language tag. These are mostly just the two-letter language codes. The
re are a few sublanguage tags, though. |
| 187 # - The LCID of the language in four digit hexadecimal form, zero-padded if ne
cessary. |
| 188 # Note: This supports Traditional Chinese (used in Taiwan) with LCID 0x7C0
4. |
| 189 # Exception: The BASE MSI is named so that it appears first. |
| 190 # |
| 191 # These steps are arranged as a linked list, starting with the BASE version of
the MSI, |
| 192 # which is simply a single-language MSI whose language will be the default l
anguage for the final installer. |
| 193 # The list is singly-linked by the 'dependencies' element. |
| 194 # For sanity (and code audit), the project declarations appear below in the sa
me order as they will appear in the compiled solution file. |
| 195 # |
| 196 # The naming convention for WiX localization files (.wxl) is a combination of
the language ID and the sublanguage ID. |
| 197 # It can be thought of as a text representation of the LCID as the Windows API
sees it. |
| 198 # Mostly these agree with IETF-style two-part identifiers, but they're not alw
ays the same. |
| 199 # For many languages, there is only a single sublanguage defined; these langua
ges still use a two-part name for consistency. |
| 200 # Generic languages, that is, those with no sublanguage ID (it's zero), use na
mes of only a single part. |
| 201 # The generic languages currently used are these: ar, de, en, fr, it, ms, nl. |
| 202 # We currently don't have generic "es" (Spanish), nor a specific "es-MX" (Span
ish - Mexico). |
| 203 # |
| 204 # Adding a new language consists of three steps. |
| 205 # 1. Create a '.wxl' localization file in 'src\msi\locale'. |
| 206 # This file contains an XML element <String Id="LANG"> that specifies the
LCID. |
| 207 # Set the codepage element also, if needed. |
| 208 # 2. In the <Package> element inside 'adblockplusie.wxs', the attribute "langu
ages" contains a comma-separated list of all languages supported by the installe
r. |
| 209 # Add the LCID to this list. |
| 210 # If this isn't done, the build will succeed but the embedded transform w
ill be ignored at run-time. |
| 211 # 3. Create a target for the language. |
| 212 # Define the gyp variable 'locale_id' as the LCID. |
| 213 # Add the target to the linked project list by setting the gyp variable '
dependencies' of both the new project and the one following it. |
| 214 # |
| 215 # Reference: MSDN "Language Identifier Constants and Strings" http://msdn.micr
osoft.com/en-us/library/dd318693%28v=vs.85%29.aspx |
| 216 # Many languages have only a single sublanguage. For these, we use the sublang
uage-specific LCID (usually starting with 0x04). |
| 217 # For languages with more than one sublanguage (English, German, French, etc.)
, we use the generic LCID (sublanguage code equals zero). |
| 218 # Exception: Spanish is currently es-ES, and the sublanguage-specific LCID is
used. |
| 219 # |
| 220 # We use Alpha-3 codes (from ISO 693-2): fil. |
| 221 # Filipino (fil) doesn't have a two-letter code. |
| 222 # |
| 223 # Warning: The Windows Installer still (as of 2013) does not fully support Uni
code. |
| 224 # Strings remain encoded by code page specification. |
| 225 # Certain languages are Unicode-only, such as Hindi (hi), do not have code pag
e assignments. |
| 226 # Such languages might not work if localized, either partially or completely. |
| 227 # These languages _need_ testing before publication, not just a wish and a pra
yer. |
| 228 # |
| 229 # Warning Continued: The issue is that Win32 ANSI entry points (those ending i
n "A") will fail for such languages. |
| 230 # Wide-character entry points (those ending in "W") should work. |
| 231 # The issue is that much of the interior of the installer is opaque, and it's
not possible to know if any ANSI calls remain enabled. |
| 232 # The WiX user interface code (generally) uses wide characters, but it calls s
ome default error notifications that may not behave correctly. |
| 233 # |
| 234 # Another warning, the .wxl files are all XML files, whose declared encoding i
s "utf-8". |
| 235 # This encoding may need to be changed for certain files to ensure that charac
ter input is correct. |
| 236 # |
| 237 # Reference: MSDN "Code Page Identifiers" http://msdn.microsoft.com/en-us/libr
ary/dd317756%28VS.85%29.aspx |
| 238 # |
| 239 ################################## |
| 240 ############# |
| 241 # Link WiX objects and payloads, creating base MSI. |
| 242 # Platform-specific. |
| 243 # Generates the reference MSI upon which all transforms are based. |
| 244 ############# |
| 245 { |
| 246 'target_name': 'MSI @ en 9 (English) [BASE]', |
| 247 'type': 'none', |
| 248 'dependencies' : |
| 249 [ |
| 250 'Installer, architecture-specific WiX', |
| 251 'Installer, common WiX', |
| 252 'installer-ca' |
| 253 ], |
| 254 'variables': { |
| 255 # Only define 'msi_build_phase' once as 'initial', here in the BASE ta
rget. All others use the default value. |
| 256 'msi_build_phase': 'initial', |
| 257 'locale_id': '9', |
| 258 }, |
| 259 'sources': [ 'src/msi/locale/en.wxl' ], |
| 260 }, |
| 261 |
| 262 ############# |
| 263 # MSI ar 1 (Arabic - Saudi Arabia) |
| 264 ############# |
| 265 { |
| 266 'target_name': 'MSI ar 1 (Arabic - Saudi Arabia)', |
| 267 'type': 'none', |
| 268 'dependencies' : [ 'MSI @ en 9 (English) [BASE]' ], |
| 269 'variables': { 'locale_id': '1' }, |
| 270 'sources': [ 'src/msi/locale/ar-SA.wxl' ], |
| 271 }, |
| 272 |
| 273 ############# |
| 274 # MSI bg-BG 1026 (Bulgarian - Bulgaria) |
| 275 ############# |
| 276 { |
| 277 'target_name': 'MSI bg-BG 1026 (Bulgarian - Bulgaria)', |
| 278 'type': 'none', |
| 279 'dependencies' : [ 'MSI ar 1 (Arabic - Saudi Arabia)' ], |
| 280 'variables': { 'locale_id': '1026' }, |
| 281 'sources': [ 'src/msi/locale/bg-BG.wxl' ], |
| 282 }, |
| 283 |
| 284 ############# |
| 285 # MSI ca-ES 1027 (Catalan - Spain) |
| 286 ############# |
| 287 { |
| 288 'target_name': 'MSI ca-ES 1027 (Catalan - Spain)', |
| 289 'type': 'none', |
| 290 'dependencies' : [ 'MSI bg-BG 1026 (Bulgarian - Bulgaria)' ], |
| 291 'variables': { 'locale_id': '1027' }, |
| 292 'sources': [ 'src/msi/locale/ca-ES.wxl' ], |
| 293 }, |
| 294 |
| 295 ############# |
| 296 # MSI cs-CZ 1029 (Czech - Czech Republic) |
| 297 ############# |
| 298 { |
| 299 'target_name': 'MSI cs-CZ 1029 (Czech - Czech Republic)', |
| 300 'type': 'none', |
| 301 'dependencies' : [ 'MSI ca-ES 1027 (Catalan - Spain)' ], |
| 302 'variables': { 'locale_id': '1029' }, |
| 303 'sources': [ 'src/msi/locale/cs-CZ.wxl' ], |
| 304 }, |
| 305 |
| 306 ############# |
| 307 # MSI da-DK 1030 (Danish - Denmark) |
| 308 ############# |
| 309 { |
| 310 'target_name': 'MSI da-DK 1030 (Danish - Denmark)', |
| 311 'type': 'none', |
| 312 'dependencies' : [ 'MSI cs-CZ 1029 (Czech - Czech Republic)' ], |
| 313 'variables': { 'locale_id': '1030' }, |
| 314 'sources': [ 'src/msi/locale/da-DK.wxl' ], |
| 315 }, |
| 316 |
| 317 ############# |
| 318 # MSI el-GR 1032 (Greek - Greece) |
| 319 ############# |
| 320 { |
| 321 'target_name': 'MSI el-GR 1032 (Greek - Greece)', |
| 322 'type': 'none', |
| 323 'dependencies' : [ 'MSI da-DK 1030 (Danish - Denmark)' ], |
| 324 'variables': { 'locale_id': '1032' }, |
| 325 'sources': [ 'src/msi/locale/el-GR.wxl' ], |
| 326 }, |
| 327 |
| 328 ############# |
| 329 # MSI de 7 (German - Germany) |
| 330 ############# |
| 331 { |
| 332 'target_name': 'MSI de 7 (German - Germany)', |
| 333 'type': 'none', |
| 334 'dependencies' : [ 'MSI el-GR 1032 (Greek - Greece)' ], |
| 335 'variables': { 'locale_id': '7' }, |
| 336 'sources': [ 'src/msi/locale/de-DE.wxl' ], |
| 337 }, |
| 338 |
| 339 ############# |
| 340 # MSI es-ES 1034 (Spanish - Spain) |
| 341 ############# |
| 342 { |
| 343 'target_name': 'MSI es-ES 1034 (Spanish - Spain)', |
| 344 'type': 'none', |
| 345 'dependencies' : [ 'MSI de 7 (German - Germany)' ], |
| 346 'variables': { 'locale_id': '1034' }, |
| 347 'sources': [ 'src/msi/locale/es-ES.wxl' ], |
| 348 }, |
| 349 |
| 350 ############# |
| 351 # MSI et-EE 1061 (Estonian - Estonia) |
| 352 ############# |
| 353 { |
| 354 'target_name': 'MSI et-EE 1061 (Estonian - Estonia)', |
| 355 'type': 'none', |
| 356 'dependencies' : [ 'MSI es-ES 1034 (Spanish - Spain)' ], |
| 357 'variables': { 'locale_id': '1061' }, |
| 358 'sources': [ 'src/msi/locale/et-EE.wxl' ], |
| 359 }, |
| 360 |
| 361 ############# |
| 362 # MSI fi 1035 (Finnish - Finland) |
| 363 ############# |
| 364 { |
| 365 'target_name': 'MSI fi 1035 (Finnish - Finland)', |
| 366 'type': 'none', |
| 367 'dependencies' : [ 'MSI et-EE 1061 (Estonian - Estonia)' ], |
| 368 'variables': { 'locale_id': '1035' }, |
| 369 'sources': [ 'src/msi/locale/fi-FI.wxl' ], |
| 370 }, |
| 371 |
| 372 ############# |
| 373 # MSI fr 12 (French - France) |
| 374 ############# |
| 375 { |
| 376 'target_name': 'MSI fr 12 (French - France)', |
| 377 'type': 'none', |
| 378 'dependencies' : [ 'MSI fi 1035 (Finnish - Finland)' ], |
| 379 'variables': { 'locale_id': '12' }, |
| 380 'sources': [ 'src/msi/locale/fr-FR.wxl' ], |
| 381 }, |
| 382 |
| 383 ############# |
| 384 # MSI he-IL 1037 (Hebrew - Israel) |
| 385 ############# |
| 386 { |
| 387 'target_name': 'MSI he-IL 1037 (Hebrew - Israel)', |
| 388 'type': 'none', |
| 389 'dependencies' : [ 'MSI fr 12 (French - France)' ], |
| 390 'variables': { 'locale_id': '1037' }, |
| 391 'sources': [ 'src/msi/locale/he-IL.wxl' ], |
| 392 }, |
| 393 |
| 394 ############# |
| 395 # MSI hr-HR 1050 (Croatian - Croatia) |
| 396 ############# |
| 397 { |
| 398 'target_name': 'MSI hr-HR 1050 (Croatian - Croatia)', |
| 399 'type': 'none', |
| 400 'dependencies' : [ 'MSI he-IL 1037 (Hebrew - Israel)' ], |
| 401 'variables': { 'locale_id': '1050' }, |
| 402 'sources': [ 'src/msi/locale/hr-HR.wxl' ], |
| 403 }, |
| 404 |
| 405 ############# |
| 406 # MSI hu-HU 1038 (Hungarian - Hungary) |
| 407 ############# |
| 408 { |
| 409 'target_name': 'MSI hu-HU 1038 (Hungarian - Hungary)', |
| 410 'type': 'none', |
| 411 'dependencies' : [ 'MSI hr-HR 1050 (Croatian - Croatia)' ], |
| 412 'variables': { 'locale_id': '1038' }, |
| 413 'sources': [ 'src/msi/locale/hu-HU.wxl' ], |
| 414 }, |
| 415 |
| 416 ############# |
| 417 # MSI it 16 (Italian - Italy) |
| 418 ############# |
| 419 { |
| 420 'target_name': 'MSI it 16 (Italian - Italy)', |
| 421 'type': 'none', |
| 422 'dependencies' : [ 'MSI hu-HU 1038 (Hungarian - Hungary)' ], |
| 423 'variables': { 'locale_id': '16' }, |
| 424 'sources': [ 'src/msi/locale/it-IT.wxl' ], |
| 425 }, |
| 426 |
| 427 ############# |
| 428 # MSI ja-JP 1041 (Japanese - Japan) |
| 429 ############# |
| 430 { |
| 431 'target_name': 'MSI ja-JP 1041 (Japanese - Japan)', |
| 432 'type': 'none', |
| 433 'dependencies' : [ 'MSI it 16 (Italian - Italy)' ], |
| 434 'variables': { 'locale_id': '1041' }, |
| 435 'sources': [ 'src/msi/locale/ja-JP.wxl' ], |
| 436 }, |
| 437 |
| 438 ############# |
| 439 # MSI nb-NO 1044 (Norwegian - Bokmål, Norway) |
| 440 # Target name has a vowel change to work around a character encoding problem
in gyp/MSVS. |
| 441 ############# |
| 442 { |
| 443 'target_name': 'MSI nb-NO 1044 (Norwegian - Bokmal, Norway)', |
| 444 'type': 'none', |
| 445 'dependencies' : [ 'MSI ja-JP 1041 (Japanese - Japan)' ], |
| 446 'variables': { 'locale_id': '1044' }, |
| 447 'sources': [ 'src/msi/locale/nb-NO.wxl' ], |
| 448 }, |
| 449 |
| 450 ############# |
| 451 # MSI nl 19 (Dutch - Netherlands) |
| 452 ############# |
| 453 { |
| 454 'target_name': 'MSI nl 19 (Dutch - Netherlands)', |
| 455 'type': 'none', |
| 456 'dependencies' : [ 'MSI nb-NO 1044 (Norwegian - Bokmal, Norway)' ], |
| 457 'variables': { 'locale_id': '19' }, |
| 458 'sources': [ 'src/msi/locale/nl-NL.wxl' ], |
| 459 }, |
| 460 |
| 461 ############# |
| 462 # MSI pl-PL 1045 (Polish - Poland) |
| 463 ############# |
| 464 { |
| 465 'target_name': 'MSI pl-PL 1045 (Polish - Poland)', |
| 466 'type': 'none', |
| 467 'dependencies' : [ 'MSI nl 19 (Dutch - Netherlands)' ], |
| 468 'variables': { 'locale_id': '1045' }, |
| 469 'sources': [ 'src/msi/locale/pl-PL.wxl' ], |
| 470 }, |
| 471 |
| 472 ############# |
| 473 # MSI pt-BR 1046 (Portuguese - Brazil) |
| 474 ############# |
| 475 { |
| 476 'target_name': 'MSI pt-BR 1046 (Portuguese - Brazil)', |
| 477 'type': 'none', |
| 478 'dependencies' : [ 'MSI pl-PL 1045 (Polish - Poland)' ], |
| 479 'variables': { 'locale_id': '1046' }, |
| 480 'sources': [ 'src/msi/locale/pt-BR.wxl' ], |
| 481 }, |
| 482 |
| 483 ############# |
| 484 # MSI pt-PT 2070 (Portuguese - Portugal) |
| 485 ############# |
| 486 { |
| 487 'target_name': 'MSI pt-PT 2070 (Portuguese - Portugal)', |
| 488 'type': 'none', |
| 489 'dependencies' : [ 'MSI pt-BR 1046 (Portuguese - Brazil)' ], |
| 490 'variables': { 'locale_id': '2070' }, |
| 491 'sources': [ 'src/msi/locale/pt-PT.wxl' ], |
| 492 }, |
| 493 |
| 494 ############# |
| 495 # MSI ro-RO 1048 (Romanian - Romania) |
| 496 ############# |
| 497 { |
| 498 'target_name': 'MSI ro-RO 1048 (Romanian - Romania)', |
| 499 'type': 'none', |
| 500 'dependencies' : [ 'MSI pt-PT 2070 (Portuguese - Portugal)' ], |
| 501 'variables': { 'locale_id': '1048' }, |
| 502 'sources': [ 'src/msi/locale/ro-RO.wxl' ], |
| 503 }, |
| 504 |
| 505 ############# |
| 506 # MSI ru-RU 1049 (Russian - Russia) |
| 507 ############# |
| 508 { |
| 509 'target_name': 'MSI ru-RU 1049 (Russian - Russia)', |
| 510 'type': 'none', |
| 511 'dependencies' : [ 'MSI ro-RO 1048 (Romanian - Romania)' ], |
| 512 'variables': { 'locale_id': '1049' }, |
| 513 'sources': [ 'src/msi/locale/ru-RU.wxl' ], |
| 514 }, |
| 515 |
| 516 ############# |
| 517 # MSI sk-SK 1051 (Slovak - Slovakia) |
| 518 ############# |
| 519 { |
| 520 'target_name': 'MSI sk-SK 1051 (Slovak - Slovakia)', |
| 521 'type': 'none', |
| 522 'dependencies' : [ 'MSI ru-RU 1049 (Russian - Russia)' ], |
| 523 'variables': { 'locale_id': '1051' }, |
| 524 'sources': [ 'src/msi/locale/sk-SK.wxl' ], |
| 525 }, |
| 526 |
| 527 ############# |
| 528 # MSI sv-SE 1053 (Swedish - Sweden) |
| 529 ############# |
| 530 { |
| 531 'target_name': 'MSI sv-SE 1053 (Swedish - Sweden)', |
| 532 'type': 'none', |
| 533 'dependencies' : [ 'MSI sk-SK 1051 (Slovak - Slovakia)' ], |
| 534 'variables': { 'locale_id': '1053' }, |
| 535 'sources': [ 'src/msi/locale/sv-SE.wxl' ], |
| 536 }, |
| 537 |
| 538 ############# |
| 539 # MSI th-TH 1054 (Thai - Thailand) |
| 540 ############# |
| 541 { |
| 542 'target_name': 'MSI th-TH 1054 (Thai - Thailand)', |
| 543 'type': 'none', |
| 544 'dependencies' : [ 'MSI sv-SE 1053 (Swedish - Sweden)' ], |
| 545 'variables': { 'locale_id': '1054' }, |
| 546 'sources': [ 'src/msi/locale/th-TH.wxl' ], |
| 547 }, |
| 548 |
| 549 ############# |
| 550 # MSI tr-TR 1055 (Turkish - Turkey) |
| 551 ############# |
| 552 { |
| 553 'target_name': 'MSI tr-TR 1055 (Turkish - Turkey)', |
| 554 'type': 'none', |
| 555 'dependencies' : [ 'MSI th-TH 1054 (Thai - Thailand)' ], |
| 556 'variables': { 'locale_id': '1055' }, |
| 557 'sources': [ 'src/msi/locale/tr-TR.wxl' ], |
| 558 }, |
| 559 |
| 560 ############# |
| 561 # MSI uk-UA 1058 (Ukrainian - Ukraine) |
| 562 ############# |
| 563 { |
| 564 'target_name': 'MSI uk-UA 1058 (Ukrainian - Ukraine)', |
| 565 'type': 'none', |
| 566 'dependencies' : [ 'MSI tr-TR 1055 (Turkish - Turkey)' ], |
| 567 'variables': { 'locale_id': '1058' }, |
| 568 'sources': [ 'src/msi/locale/uk-UA.wxl' ], |
| 569 }, |
| 570 |
| 571 ##################### |
| 572 # Note: The locale codes for Chinese differ between the usage in the .NET libr
ary and the Windows OS. |
| 573 # Mostly these are the same, but there are some places where LCID's are list
ed that use the .NET values. |
| 574 # The Windows Installer is a laggard in i18n issues, so we're taking the pre
cautionary approach to use Windows API values for the LCID. |
| 575 # The .NET version has the notion of culture hierarchies, an invariant cultu
re, and a neutral culture. |
| 576 # The .NET neutral culture ID for Traditional Chinese is 0x7C04, but this is
not supported in the Windows API. |
| 577 # The .NET neutral culture ID for Simplified Chinese 0x0004, but this is the
neutral/invariant LCID for the Windows API. |
| 578 # As a result, we're using sublanguage codes 0x01 and 0x02 for Taiwan and Ch
ina, respectively, in the LCID's below. |
| 579 ##################### |
| 580 ############# |
| 581 # MSI zh-CN 2052 (Chinese - China) |
| 582 ############# |
| 583 { |
| 584 'target_name': 'MSI zh-CN 2052 (Chinese - China)', |
| 585 'type': 'none', |
| 586 'dependencies' : [ 'MSI uk-UA 1058 (Ukrainian - Ukraine)' ], |
| 587 'variables': { 'locale_id': '2052' }, |
| 588 'sources': [ 'src/msi/locale/zh-CN.wxl' ], |
| 589 }, |
| 590 |
| 591 ############# |
| 592 # MSI zh-TW 1028 (Chinese - Taiwan) |
| 593 ############# |
| 594 { |
| 595 'target_name': 'MSI zh-TW 1028 (Chinese - Taiwan)', |
| 596 'type': 'none', |
| 597 'dependencies' : [ 'MSI zh-CN 2052 (Chinese - China)' ], |
| 598 'variables': { 'locale_id': '1028' }, |
| 599 'sources': [ 'src/msi/locale/zh-TW.wxl' ], |
| 600 }, |
| 601 |
| 602 ##################### |
| 603 # The last step is to copy the INTERIM file to the FINAL file |
| 604 ##################### |
| 605 ############# |
| 606 # MSI Final |
| 607 ############# |
| 608 { |
| 609 'target_name': 'MSI _ [FINAL]', |
| 610 'type': 'none', |
| 611 'dependencies': [ 'MSI zh-TW 1028 (Chinese - Taiwan)' ], |
| 612 'actions': |
| 613 [{ |
| 614 'action_name': 'MSI Final', |
| 615 'message': '', |
| 616 'inputs': [ '<(build_dir_arch)/adblockplusie-INTERIM-<(target_arch).ms
i' ], |
| 617 'outputs': [ '<(build_dir_arch)/adblockplusie-FINAL-<(target_arch).msi
' ], |
| 618 'action': |
| 619 [ |
| 620 'copy', |
| 621 '<(build_dir_arch)/adblockplusie-INTERIM-<(target_arch).msi', |
| 622 '<(build_dir_arch)/adblockplusie-FINAL-<(target_arch).msi', |
| 623 ] |
| 624 }] |
| 625 }, |
| 626 |
| 627 ################################## |
| 628 # END of MSI section |
| 629 ################################## |
| 630 |
| 631 ############# |
| 632 # Custom Action DLL for the installer |
21 ############# | 633 ############# |
22 { | 634 { |
23 'target_name': 'installer-ca', | 635 'target_name': 'installer-ca', |
24 'type': 'shared_library', | 636 'type': 'shared_library', |
25 'component': 'shared_library', | 637 » 'dependencies': [ 'installer-library' ], |
26 'sources': | 638 'sources': |
27 [ | 639 [ |
28 # | |
29 # Custom Action | |
30 # | |
31 'src/custom-action/abp_ca.cpp', | 640 'src/custom-action/abp_ca.cpp', |
32 'src/custom-action/abp_ca.def', | 641 'src/custom-action/abp_ca.def', |
33 'src/custom-action/abp_ca.rc', | 642 'src/custom-action/abp_ca.rc', |
34 'src/custom-action/close_application.cpp', | 643 'src/custom-action/close_application.cpp', |
35 # | 644 'src/custom-action/close_ie.wxi', |
36 # Windows Installer library | |
37 # | |
38 'src/installer-lib/database.cpp', | |
39 'src/installer-lib/database.h', | |
40 'src/installer-lib/DLL.cpp', | |
41 'src/installer-lib/DLL.h', | |
42 'src/installer-lib/interaction.cpp', | |
43 'src/installer-lib/interaction.h', | |
44 'src/installer-lib/property.cpp', | |
45 'src/installer-lib/property.h', | |
46 'src/installer-lib/record.cpp', | |
47 'src/installer-lib/record.h', | |
48 'src/installer-lib/session.cpp', | |
49 'src/installer-lib/session.h', | |
50 ], | 645 ], |
51 'include_dirs': | 646 'include_dirs': |
52 [ | 647 [ |
53 'src/installer-lib', | 648 'src/installer-lib', |
54 ], | 649 ], |
55 'link_settings': | 650 'link_settings': |
56 { | 651 { |
57 'libraries': [ 'user32.lib', 'Shell32.lib', 'advapi32.lib', 'msi.lib', 'Ve
rsion.lib' ] | 652 'libraries': [ 'user32.lib', 'Shell32.lib', 'advapi32.lib', 'msi.lib', 'Ve
rsion.lib' ] |
58 }, | 653 }, |
59 'msvs_settings': | 654 'msvs_settings': |
60 { | 655 { |
61 'VCLinkerTool': {} | 656 'VCLinkerTool': {} |
62 } | 657 } |
63 }, | 658 }, |
| 659 |
| 660 ############# |
| 661 # Windows Installer library |
| 662 ############# |
| 663 { |
| 664 'target_name': 'installer-library', |
| 665 'type': 'static_library', |
| 666 'sources': |
| 667 [ |
| 668 'src/installer-lib/custom-i18n.h', |
| 669 'src/installer-lib/custom-i18n.wxi', |
| 670 'src/installer-lib/database.cpp', |
| 671 'src/installer-lib/database.h', |
| 672 'src/installer-lib/DLL.cpp', |
| 673 'src/installer-lib/DLL.h', |
| 674 'src/installer-lib/handle.h', |
| 675 'src/installer-lib/installer-lib.h', |
| 676 'src/installer-lib/interaction.cpp', |
| 677 'src/installer-lib/interaction.h', |
| 678 'src/installer-lib/process.cpp', |
| 679 'src/installer-lib/process.h', |
| 680 'src/installer-lib/property.cpp', |
| 681 'src/installer-lib/property.h', |
| 682 'src/installer-lib/record.cpp', |
| 683 'src/installer-lib/record.h', |
| 684 'src/installer-lib/session.cpp', |
| 685 'src/installer-lib/session.h', |
| 686 ], |
| 687 'include_dirs': |
| 688 [ |
| 689 'src/installer-lib', |
| 690 ], |
| 691 'direct_dependent_settings': |
| 692 { |
| 693 'include_dirs': |
| 694 [ |
| 695 'src/installer-lib', |
| 696 ], |
| 697 }, |
| 698 'link_settings': |
| 699 { |
| 700 'libraries': [ 'user32.lib', 'Shell32.lib', 'advapi32.lib', 'msi.lib', 'Ve
rsion.lib' ] |
| 701 }, |
| 702 'msvs_settings': |
| 703 { |
| 704 'VCLinkerTool': {} |
| 705 } |
| 706 }, |
| 707 |
| 708 ############# |
| 709 # Custom actions for library test MSI |
| 710 ############# |
| 711 { |
| 712 'target_name': 'installer-library-test-customactions', |
| 713 'type': 'shared_library', |
| 714 'dependencies': |
| 715 [ |
| 716 'installer-library', |
| 717 ], |
| 718 'sources': |
| 719 [ |
| 720 'src/installer-lib/test/test-installer-lib-ca.cpp', |
| 721 'src/installer-lib/test/test-installer-lib-ca.def', |
| 722 'src/installer-lib/test/test-installer-lib-ca.rc', |
| 723 'src/installer-lib/test/test-installer-lib-sandbox.cpp', |
| 724 'src/installer-lib/test/custom-action-fail.cpp', |
| 725 'src/custom-action/close_application.cpp', |
| 726 ], |
| 727 }, |
| 728 |
| 729 ############# |
| 730 # WiX compile for library test MSI |
| 731 ############# |
| 732 { |
| 733 'target_name': 'installer-library-test-wix', |
| 734 'type': 'none', |
| 735 'sources': |
| 736 [ |
| 737 'src/installer-lib/test/test-installer-lib.wxs', |
| 738 'src/installer-lib/custom-i18n.wxi', |
| 739 ], |
| 740 'actions': |
| 741 [ { |
| 742 'action_name': 'WiX compile', |
| 743 'message': 'Compiling WiX source', |
| 744 'inputs': |
| 745 [ |
| 746 'src/installer-lib/test/test-installer-lib.wxs' |
| 747 ], |
| 748 'outputs': |
| 749 [ |
| 750 '<(build_dir_arch)/test-installer-lib.wixobj' |
| 751 ], |
| 752 'action': |
| 753 [ 'candle -nologo -arch <(candle_arch) -dNoDefault ', '-out', '<@(_outpu
ts)', '<@(_inputs)' ] |
| 754 } ] |
| 755 }, |
| 756 |
| 757 ############# |
| 758 # WiX link for library test MSI |
| 759 ############# |
| 760 { |
| 761 'target_name': 'installer-library-test-msi', |
| 762 'type': 'none', |
| 763 'dependencies': |
| 764 [ |
| 765 'installer-library-test-customactions', |
| 766 'installer-library-test-wix', |
| 767 ], |
| 768 'sources': |
| 769 [ |
| 770 '<(build_dir_arch)/test-installer-lib.wixobj', |
| 771 ], |
| 772 'actions': |
| 773 [ { |
| 774 'action_name': 'WiX link', |
| 775 'message': 'Linking WiX objects', |
| 776 'linked_inputs': |
| 777 [ |
| 778 '<(build_dir_arch)/test-installer-lib.wixobj', |
| 779 ], |
| 780 'localization_input': |
| 781 [ |
| 782 'src/custom-action/close_ie_default.wxl',
# Keep the .WXL file out of 'sources', since otherwise the custom rule will kick
in |
| 783 ], |
| 784 'inputs': |
| 785 [ |
| 786 '<@(_linked_inputs)', |
| 787 |
| 788 # Keep the .WXL file out of here, since otherwise the custom rul
e will kick in |
| 789 # This isn't the best solution, since it means manual recompilat
ion it this file changes, |
| 790 # but it's easier to do this than to deal with how to change t
he default rule for '.wxl' that all the MSI targets use. |
| 791 #'<@(_localization_input)', |
| 792 |
| 793 'src/custom-action/close_ie.wxi', |
| 794 '<(build_dir_arch)/Debug/installer-library-test-customactions.dl
l' |
| 795 ], |
| 796 'outputs': |
| 797 [ |
| 798 '<(build_dir_arch)/test-installer-lib.msi' |
| 799 ], |
| 800 'action': |
| 801 # ICE71: The Media table has no entries |
| 802 # Suppress ICE71 because the test MSI does not install any files
. |
| 803 [ |
| 804 'light -notidy -nologo -ext WixUIExtension -sice:ICE71', |
| 805 '<@(_linked_inputs)', |
| 806 '-out', '<(build_dir_arch)/test-installer-lib.msi', |
| 807 '-loc', '<@(_localization_input)' |
| 808 ] |
| 809 } ] |
| 810 }, |
| 811 |
| 812 ############# |
| 813 # Custom Action unit tests |
| 814 ############# |
| 815 { |
| 816 'target_name': 'installer-ca-tests', |
| 817 'type': 'executable', |
| 818 'dependencies': |
| 819 [ |
| 820 'installer-library', |
| 821 'installer-library-test-msi', # Some unit tests open t
he test MSI database |
| 822 'googletest.gyp:googletest_main', |
| 823 ], |
| 824 'sources': |
| 825 [ |
| 826 'src/installer-lib/test/database_test.cpp', |
| 827 'src/installer-lib/test/exception_test.cpp', |
| 828 'src/installer-lib/test/process_test.cpp', |
| 829 'src/installer-lib/test/property_test.cpp', |
| 830 'src/installer-lib/test/record_test.cpp', |
| 831 ], |
| 832 'link_settings': |
| 833 { |
| 834 'libraries': [], |
| 835 }, |
| 836 'msvs_settings': |
| 837 { |
| 838 'VCLinkerTool': |
| 839 { |
| 840 'SubSystem': '1', # Console |
| 841 }, |
| 842 }, |
| 843 }, |
| 844 |
64 ] | 845 ] |
65 } | 846 } |
| 847 |
| 848 |
| 849 |
OLD | NEW |