Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: installer/src/msi/adblockplusie.wxs

Issue 6202981292703744: Whole installer (Closed)
Patch Set: Created June 24, 2014, 7:27 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: installer/src/msi/adblockplusie.wxs
===================================================================
rename from installer/adblockplusie.wxs
rename to installer/src/msi/adblockplusie.wxs
--- a/installer/adblockplusie.wxs
+++ b/installer/src/msi/adblockplusie.wxs
@@ -8,7 +8,9 @@
Certain WiX elements are implemented by MSI custom actions,
which means this source implicitly declares some insofar as the Windows Installer sees it.
These errors are benign and can be avoided by some fiddling with the registry on the development machine.
- See http://wix.sourceforge.net/faq.html#Error217
+ See http://blogs.msdn.com/b/heaths/archive/2007/05/31/windows-installer-errors-2738-and-2739-with-script-custom-actions.aspx
+ and http://blogs.msdn.com/b/astebner/archive/2007/06/07/3151752.aspx,
+ both taken from (must use the Wayback Machine) http://wix.sourceforge.net/faq.html#Error217
-->
<!--
These definitions enable compiling multiple versions & Product ID's from the same file.
@@ -30,6 +32,17 @@
<?endif?>
<!--
+ CA_Configuration is the Visual Studio configuration for the Custom Action library.
+ It's set to "Debug" while the installer with a CA is in development.
+ TODO.
+ First, set this variable based on the configuration in the VS solution.
+ Second, change the default to "Release" (or perhaps an error).
+-->
+<?ifndef CA_Configuration?>
+ <?define CA_Configuration="Release" ?>
+<?endif?>
+
+<!--
sys.BUILDARCH is set by the command line argument '-arch'.
The default value to "x86"
-->
@@ -37,15 +50,29 @@
<?define Minimum_Version="100"?>
<?define Program_Files="ProgramFilesFolder"?>
<?define Product_Name="!(loc.ProductName32)"?>
+ <?define build_dir="ia32"?>
<?elseif $(sys.BUILDARCH)="x64"?>
<?define Minimum_Version="200"?>
<?define Program_Files="ProgramFiles64Folder"?>
<?define Product_Name="!(loc.ProductName64)"?>
+ <?define build_dir="x64"?>
<?else?>
<?error Unsupported value of sys.BUILDARCH=$(sys.BUILDARCH)?>
<?endif?>
+<!--
+ The current directory when the compiler runs is "installer/build/<arch>".
+ Most assets are based in the root directory, three levels up.
+ The custom action library is base in the installer directory, two levels up.
+-->
+<?define plugin_dir="..\..\.." ?>
+<?define installer_dir="..\.." ?>
+
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <!--
+ The attributes 'Language' and 'Codepage' are specifications for the database only.
+ Codepage 65001 is UTF-8.
+ -->
<Product
Name="$(var.Product_Name)"
Manufacturer="Eyeo GmbH"
@@ -54,12 +81,38 @@
Id="*"
UpgradeCode="3a8e3ab4-762d-4641-806e-2dccb953d73f">
+ <!--
+ Attribute @Languages
+ The list contains all the languages supported within the MSI, all but the first as embedded transforms.
+ The first language code is the language of the base MSI.
+ -->
+ <!--
+ At the present time, we are not localizing the summary information because of limitations
+ both in Windows Installer and in the tool chain.
+ At a later time, localizing this section requires setting an ANSI codepage
+ and the four attributes Keywords, Description, Comments, and Manufacturer.
+ -->
+ <!--
+ For the present version, the following languages are omitted because the WiX UI extension has no localizations for them yet.
+ They can be added later, but the build script needs to be changed to accept arguments for the extra localization source.
+ fil-PH. Filipino - Phillipines. LCID = 1124
+ kn-IN. Kanada - India. LCID = 1099
+ mr-IN. Maratha - India. LCID = 1102
+ ms. Malaysian - generic. LCID = 62
+ nn-NO. Nynorsk - Norway. LCID = 2068
+ ur-PK. Urdu - Pakistan. LCID = 1056
+ They are being omitted by having their decimal LCID left out of the Packages/@Languages attribute below.
+ The build system presently embeds transforms for them, but without their LCID in this list, they won't be recognized.
+ These embedded transforms, however, can be explicitly applied on the command line of msiexec.
+ -->
<Package
- Keywords="!(loc.Keywords)"
- Description="!(loc.Description)"
- Comments="!(loc.Comments)"
+ SummaryCodepage="1252"
+ Keywords="Installer, Adblock Plus"
+ Description="Adblock Plus for IE"
+ Comments="Thank you for using Adblock Plus."
+ Manufacturer="Eyeo GmbH"
InstallerVersion="$(var.Minimum_Version)"
- Languages="!(loc.LANG)" SummaryCodepage="!(loc.CODEPAGE)"
+ Languages="9,1,7,12,16,19,1026,1027,1029,1030,1032,1034,1035,1037,1038,1041,1044,1045,1046,1048,1049,1050,1051,1053,1054,1055,1058,1061,2052,2070"
Compressed="yes"
InstallScope="perMachine" InstallPrivileges="elevated"
/>
@@ -69,7 +122,6 @@
implied and allows major upgrades to be performed. Downgrades aren't
allowed by default.
-
The @Schedule attribute looks a little opaque.
Suffice it to say that it's the only option for scheduling where uninstallation of the previous version
and installation of the present version is _always_ going to act atomically.
@@ -94,8 +146,7 @@
The "CustomAction" tag defines the tag itself, but doesn't sequence it;
it defines an entry in the "CustomAction" table.
The "Binary" tag describe an asset that's incorporated into the MSI but that is not an installed component.
- The "Custom" tag defines the sequencing of an action;
- it defines an entry in one of the sequence tables (there are six).
+ The "Custom" tag defines when the action executes by defining an entry in one of the sequence tables.
Attribute "Return" sets the "Custom Action Return Processing Options" to zero,
which indicates to block the installer until the action completes
@@ -104,10 +155,14 @@
<CustomAction
Id="Close_IE"
BinaryKey="installer_ca"
- DllEntry="abp_close_applications"
+ DllEntry="abp_close_ie"
Return="check"
/>
- <Binary Id="installer_ca" SourceFile="build\ia32\Debug\installer-ca.dll"/>
+ <!--
+ We require a 32-bit DLL for the 32-bit installer, and likewise for 64-bit.
+ The 64-bit Close_IE action needs to examine 64-bit processes on the system, which are invisible to 32-bit processes.
+ -->
+ <Binary Id="installer_ca" SourceFile="$(var.installer_dir)\build\$(var.build_dir)\$(var.CA_Configuration)\installer-ca.dll"/>
<InstallUISequence>
<!--
The LaunchConditions action occurs near the beginning, before any of the expensive operations.
@@ -244,7 +299,7 @@
We need an explicit value for attribute @Win64 so that the ARCH argument does not override its implicit value.
-->
<Component Id="AdblockPlus32.dll" Guid="d9a35780-d712-11e2-8b8b-0800200c9a66" Win64="no">
- <File Id="AdblockPlus32.dll" Name="AdblockPlus32.dll" Source="..\build\ia32\$(var.Configuration)\AdblockPlus.dll" KeyPath="yes" Checksum="yes">
+ <File Id="AdblockPlus32.dll" Name="AdblockPlus32.dll" Source="$(var.plugin_dir)\build\ia32\$(var.Configuration)\AdblockPlus.dll" KeyPath="yes" Checksum="yes">
<?include dll_class.wxi ?>
</File>
<?include bho_registry_value.wxi ?>
@@ -265,7 +320,7 @@
-->
<?if $(sys.BUILDARCH)="x64"?>
<Component Id="AdblockPlus64.dll" Guid="ed77a2c0-d712-11e2-8b8b-0800200c9a66" Win64="yes">
- <File Id="AdblockPlus64.dll" Name="AdblockPlus64.dll" Source="..\build\x64\$(var.Configuration)\AdblockPlus.dll" KeyPath="yes" Checksum="yes">
+ <File Id="AdblockPlus64.dll" Name="AdblockPlus64.dll" Source="$(var.plugin_dir)\build\x64\$(var.Configuration)\AdblockPlus.dll" KeyPath="yes" Checksum="yes">
<?include dll_class.wxi ?>
</File>
<?include bho_registry_value.wxi ?>
@@ -277,11 +332,11 @@
-->
<?if $(sys.BUILDARCH)="x86"?>
<Component Id="AdblockPlusEngine.exe" Guid="f45572c0-d712-11e2-8b8b-0800200c9a66" Win64="no">
- <File Id="AdblockPlusEngine.exe" Source="..\build\ia32\$(var.Configuration)\AdblockPlusEngine.exe" KeyPath="yes" Checksum="yes"/>
+ <File Id="AdblockPlusEngine.exe" Source="$(var.plugin_dir)\build\ia32\$(var.Configuration)\AdblockPlusEngine.exe" KeyPath="yes" Checksum="yes"/>
</Component>
<?elseif $(sys.BUILDARCH)="x64"?>
<Component Id="AdblockPlusEngine.exe" Guid="fa8d65d0-d712-11e2-8b8b-0800200c9a66" Win64="yes">
- <File Id="AdblockPlusEngine.exe" Source="..\build\x64\$(var.Configuration)\AdblockPlusEngine.exe" KeyPath="yes" Checksum="yes"/>
+ <File Id="AdblockPlusEngine.exe" Source="$(var.plugin_dir)\build\x64\$(var.Configuration)\AdblockPlusEngine.exe" KeyPath="yes" Checksum="yes"/>
</Component>
<?endif?>
</ComponentGroup>
@@ -322,7 +377,7 @@
</ComponentGroup>
<DirectoryRef Id="HTML_Folder">
- <Directory Id="html" FileSource="..\html">
+ <Directory Id="html" FileSource="$(var.plugin_dir)\html">
<Directory Name="static" Id="html_static">
<Directory Name="css" Id="html_static_css">
<Component Id="html_static_css_firstRun.css" Guid="facb02d0-f073-11e2-b778-0800200c9a66">
@@ -510,7 +565,7 @@
<ComponentRef Id="locales_zu.ini"/>
</ComponentGroup>
<DirectoryRef Id="Locales_Folder">
- <Directory Id="locales" FileSource="..\locales">
+ <Directory Id="locales" FileSource="$(var.plugin_dir)\locales">
<Component Id="locales_af.ini" Guid="0311a948-3e76-45e8-83c0-8455fa9083b7">
<RemoveFile Id="af.ini" Name="af.ini" On="install"/>
</Component>
@@ -765,11 +820,14 @@
<ComponentRef Id="ini_settings.ini"/>
</ComponentGroup>
<DirectoryRef Id="ABP_APPDATA_FOLDER">
- <Directory Id="ini" FileSource="..\files">
+ <Directory Id="ini" FileSource="$(var.plugin_dir)\files">
<Component Id="ini_settings.ini" Guid="dc30c3b0-d713-11e2-8b8b-0800200c9a66">
<File Name="settings.ini"/>
</Component>
</Directory>
</DirectoryRef>
+
+ <?include ../installer-lib/custom-i18n.wxi ?>
+ <?include ../custom-action/close_ie.wxi ?>
</Product>
</Wix>

Powered by Google App Engine
This is Rietveld