Left: | ||
Right: |
OLD | NEW |
---|---|
1 # | 1 # |
2 # Expects command line definition for variable 'target_arch' | 2 # Expects command line definition for variable 'target_arch' |
3 # Must be either 'ia32' or 'x64' | 3 # Must be either 'ia32' or 'x64' |
4 # | 4 # |
5 # This .gyp file sits in directory 'installer'. | 5 # This .gyp file sits in directory 'installer'. |
6 # When gyp translates files locations, base them here. | 6 # When gyp translates files locations, base them here. |
7 # | 7 # |
8 # The solution file from this .gyp source lands in 'installer/build/<(target_arc h)'. | 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. | 9 # When gyp does not translate file locations, base them here. |
10 # | 10 # |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
49 # Note that locality sources (.wxl) are not present here because they're han dled at link time. | 49 # Note that locality sources (.wxl) are not present here because they're han dled at link time. |
50 # | 50 # |
51 'installer_source_top_file': 'src/msi/adblockplusie.wxs', | 51 'installer_source_top_file': 'src/msi/adblockplusie.wxs', |
52 'installer_source_files': | 52 'installer_source_files': |
53 [ | 53 [ |
54 '<(installer_source_top_file)', | 54 '<(installer_source_top_file)', |
55 'src/msi/bho_registry_value.wxi', | 55 'src/msi/bho_registry_value.wxi', |
56 'src/msi/dll_class.wxi', | 56 'src/msi/dll_class.wxi', |
57 ], | 57 ], |
58 'installer_object_file': '<(build_dir_arch)/adblockplusie.wixobj', | 58 'installer_object_file': '<(build_dir_arch)/adblockplusie.wixobj', |
59 'installer_object_file_no_transforms': '<(build_dir_arch)/adblockplusie_notr ansforms.wixobj', | |
59 | 60 |
60 # | 61 # |
61 # WiX installer sources for the compiler, common to all architectures | 62 # WiX installer sources for the compiler, common to all architectures |
62 # | 63 # |
63 'common_source_files': [ 'src/msi/custom_WixUI_InstallDir.wxs' ], | 64 'common_source_files': [ 'src/msi/custom_WixUI_InstallDir.wxs' ], |
64 'common_object_file': '<(build_dir_common)/common.wixobj', | 65 'common_object_file': '<(build_dir_common)/common.wixobj', |
65 | 66 |
66 # | 67 # |
67 # All the assets from the plug-in that are copied into the MSI file. | 68 # All the assets from the plug-in that are copied into the MSI file. |
68 # | 69 # |
(...skipping 14 matching lines...) Expand all Loading... | |
83 # Note that the action in the rule uses later-phase substitution with ">", which occurs after the rule is merged with the target. | 84 # 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 # 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 # Therefore, count this as a workaround for a gyp defect. |
86 # | 87 # |
87 'locale_id%': '0', | 88 'locale_id%': '0', |
88 | 89 |
89 # | 90 # |
90 # We do want a default 'msi_build_phase', because in all but the first MSI build we want the flag "additional" | 91 # We do want a default 'msi_build_phase', because in all but the first MSI build we want the flag "additional" |
91 # | 92 # |
92 'msi_build_phase%': 'additional', | 93 'msi_build_phase%': 'additional', |
94 'installer_object': '<(installer_object_file)', | |
95 'notransforms_name': '' | |
93 }, | 96 }, |
94 'rules': | 97 'rules': |
95 [ { | 98 [ { |
96 # | 99 # |
97 # Rule to build a single-language MSI as part of a chain to create a m ultiple-language MSI | 100 # 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. | 101 # The rule runs a .cmd file to execute the commands; this chose arise s from gyp limitations and defects. |
99 # | 102 # |
100 # gyp can only handle a single rule per extension. | 103 # 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. | 104 # 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. | 105 # 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. | 106 # 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 # | 107 # |
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. | 108 # 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. | 109 # 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 # | 110 # |
108 'rule_name': 'MSI Build', | 111 'rule_name': 'MSI Build', |
109 'extension': 'wxl', | 112 'extension': 'wxl', |
110 'message': 'Generating embedded transform for "<(RULE_INPUT_ROOT)"', | 113 'message': 'Generating embedded transform for "<(RULE_INPUT_ROOT)"', |
111 'inputs': [ 'emb.vbs', '<(base_msi)', '<@(payloads)' ], | 114 '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' ], | 115 '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': | 116 'action': |
114 [ | 117 [ |
115 '..\..\msibuild.cmd >(msi_build_phase) >(locale_id) >(RULE_INPUT_ROO T)', '<(RULE_INPUT_PATH)', | 118 '..\..\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', | 119 » » '<(build_dir_arch)/adblockplusie-<(RULE_INPUT_ROOT)>(notransform s_name)-<(target_arch).msi', |
117 » » '<(build_dir_arch)/adblockplusie-<(RULE_INPUT_ROOT)-<(target_arc h).mst', | 120 » » '<(build_dir_arch)/adblockplusie-<(RULE_INPUT_ROOT)>(notransform s_name)-<(target_arch).mst', |
118 '<(build_dir_arch)/adblockplusie-BASE-<(target_arch).msi', | 121 '<(build_dir_arch)/adblockplusie-BASE-<(target_arch).msi', |
119 '<(build_dir_arch)/adblockplusie-INTERIM-<(target_arch).msi', | 122 '<(build_dir_arch)/adblockplusie-INTERIM-<(target_arch).msi', |
120 » » '<(installer_object_file)', '<(common_object_file)', | 123 » » '>(installer_object)', '<(common_object_file)', |
Eric
2014/12/12 15:39:32
I noticed we've got tabs here. They could be remov
| |
121 ] | 124 ] |
122 } ], | 125 } ], |
123 }, | 126 }, |
124 | 127 |
125 'targets': | 128 'targets': |
126 [ | 129 [ |
127 ############# | 130 ############# |
128 # Compile common WiX source. | 131 # Compile common WiX source. |
129 # All the WiX-linked sources that depend neither on architecture nor confi guration. | 132 # All the WiX-linked sources that depend neither on architecture nor confi guration. |
130 # Principally for user interface. | 133 # Principally for user interface. |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
168 'outputs': | 171 'outputs': |
169 [ | 172 [ |
170 # List must contain only a single element so that "-out" argument works correctly. | 173 # List must contain only a single element so that "-out" argument works correctly. |
171 '<(installer_object_file)' | 174 '<(installer_object_file)' |
172 ], | 175 ], |
173 'action': | 176 'action': |
174 [ 'candle -nologo -arch <(candle_arch) -dNoDefault -dVersion=<(version) -dConfiguration=Release', '-out', '<@(_outputs)', '<(installer_source_top_file)' ] | 177 [ 'candle -nologo -arch <(candle_arch) -dNoDefault -dVersion=<(version) -dConfiguration=Release', '-out', '<@(_outputs)', '<(installer_source_top_file)' ] |
175 } ] | 178 } ] |
176 }, | 179 }, |
177 | 180 |
181 ############# | |
182 # Compile installer WiX source with no transforms. | |
183 # Platform-specific. | |
184 ############# | |
185 { | |
186 'target_name': 'No transforms Installer, architecture-specific WiX', | |
187 'type': 'none', | |
188 'actions': | |
189 [ { | |
190 'action_name': 'Compile WiX installer', | |
191 'message': 'Compiling installer WiX sources', | |
192 'inputs': | |
193 [ | |
194 '<@(installer_source_files)' | |
195 ], | |
196 'outputs': | |
197 [ | |
198 # List must contain only a single element so that "-out" argument works correctly. | |
199 '<(installer_object_file_no_transforms)' | |
200 ], | |
201 'action': | |
202 [ 'candle -nologo -arch <(candle_arch) -dNoDefault -dVersion=<(version) -dConfiguration=Release -dNoTransforms', '-out', '<@(_outputs)', '<(installer_so urce_top_file)' ] | |
203 } ] | |
204 }, | |
205 | |
206 | |
207 | |
178 ################################## | 208 ################################## |
179 # MSI targets | 209 # MSI targets |
180 # | 210 # |
181 # Building a multiple-language MSI requires embedding a transform for each lan guage into a single MSI database. | 211 # 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. | 212 # 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. | 213 # gyp does not support per-source-file parameters, so we're stuck with one pro ject per step. |
184 # The naming convention for projects: | 214 # 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. | 215 # - 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. | 216 # - 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. | 217 # - The LCID of the language in four digit hexadecimal form, zero-padded if ne cessary. |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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. | 261 # 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. | 262 # The WiX user interface code (generally) uses wide characters, but it calls s ome default error notifications that may not behave correctly. |
233 # | 263 # |
234 # Another warning, the .wxl files are all XML files, whose declared encoding i s "utf-8". | 264 # 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. | 265 # This encoding may need to be changed for certain files to ensure that charac ter input is correct. |
236 # | 266 # |
237 # Reference: MSDN "Code Page Identifiers" http://msdn.microsoft.com/en-us/libr ary/dd317756%28VS.85%29.aspx | 267 # Reference: MSDN "Code Page Identifiers" http://msdn.microsoft.com/en-us/libr ary/dd317756%28VS.85%29.aspx |
238 # | 268 # |
239 ################################## | 269 ################################## |
240 ############# | 270 ############# |
271 # Link WiX objects and payloads, creating the full MSI. | |
272 # Platform-specific. No transforms. | |
273 # Generates the MSI with just english language and no embedded transforms. | |
274 ############# | |
275 { | |
276 'target_name': 'MSI @ en 9 (English) [NO_TRANSFORMS]', | |
277 'type': 'none', | |
278 'dependencies' : | |
279 [ | |
280 'No transforms Installer, architecture-specific WiX', | |
281 'Installer, common WiX', | |
282 'installer-ca' | |
283 ], | |
284 'variables': { | |
285 'msi_build_phase': 'notransforms', | |
286 'locale_id': '9', | |
287 'installer_object': '<(installer_object_file_no_transforms)', | |
288 'notransforms_name': '-notransforms' | |
289 }, | |
290 'sources': [ 'src/msi/locale/en.wxl' ] | |
291 }, | |
292 | |
293 ################################## | |
294 ############# | |
241 # Link WiX objects and payloads, creating base MSI. | 295 # Link WiX objects and payloads, creating base MSI. |
242 # Platform-specific. | 296 # Platform-specific. |
243 # Generates the reference MSI upon which all transforms are based. | 297 # Generates the reference MSI upon which all transforms are based. |
244 ############# | 298 ############# |
245 { | 299 { |
246 'target_name': 'MSI @ en 9 (English) [BASE]', | 300 'target_name': 'MSI @ en 9 (English) [BASE]', |
247 'type': 'none', | 301 'type': 'none', |
248 'dependencies' : | 302 'dependencies' : |
249 [ | 303 [ |
250 'Installer, architecture-specific WiX', | 304 'Installer, architecture-specific WiX', |
251 'Installer, common WiX', | 305 'Installer, common WiX', |
252 'installer-ca' | 306 'installer-ca' |
253 ], | 307 ], |
254 'variables': { | 308 'variables': { |
255 » # Only define 'msi_build_phase' once as 'initial', here in the BASE ta rget. All others use the default value. | 309 # Only define 'msi_build_phase' once as 'initial', here in the BASE target. All others use the default value. |
310 # (Except the build which doesn't embed any transforms. That one uses notran sforms) | |
Eric
2014/12/12 15:39:32
I'd indent these comments to match the declaration
| |
256 'msi_build_phase': 'initial', | 311 'msi_build_phase': 'initial', |
257 'locale_id': '9', | 312 'locale_id': '9', |
258 }, | 313 }, |
259 'sources': [ 'src/msi/locale/en.wxl' ], | 314 'sources': [ 'src/msi/locale/en.wxl' ], |
260 }, | 315 }, |
261 | 316 |
262 ############# | 317 ############# |
263 # MSI ar 1 (Arabic - Saudi Arabia) | 318 # MSI ar 1 (Arabic - Saudi Arabia) |
264 ############# | 319 ############# |
265 { | 320 { |
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
840 'SubSystem': '1', # Console | 895 'SubSystem': '1', # Console |
841 }, | 896 }, |
842 }, | 897 }, |
843 }, | 898 }, |
844 | 899 |
845 ] | 900 ] |
846 } | 901 } |
847 | 902 |
848 | 903 |
849 | 904 |
OLD | NEW |