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

Side by Side Diff: installer/src/installer-lib/test/test-installer-lib.wxs

Issue 5675960980471808: Updated installer with custom action (Closed)
Patch Set: Created March 8, 2014, 5:06 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <?xml version="1.0" encoding="UTF-8"?>
2 <?define installer_dir="..\.." ?>
3 <?define CA_Configuration="Debug" ?>
4
5 <?if $(sys.BUILDARCH)="x86"?>
6 <?define Program_Files="ProgramFilesFolder"?>
7 <?define Product_Name="!(loc.ProductName32)"?>
8 <?elseif $(sys.BUILDARCH)="x64"?>
9 <?define Program_Files="ProgramFiles64Folder"?>
10 <?define Product_Name="!(loc.ProductName64)"?>
11 <?else?>
12 <?error Unsupported value of sys.BUILDARCH=$(sys.BUILDARCH)?>
13 <?endif?>
14
15 <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
16 <!--
17 The attributes 'Language' and 'Codepage' are specifications for the database only.
18 Codepage 65001 is UTF-8.
19 -->
20 <Product
21 Name="ABP Installer Library Test MSI"
22 Manufacturer="Eyeo GmbH"
23 Version="1.0"
24 Language="9" Codepage="1252"
25 Id="*"
26 UpgradeCode="8D94C7AB-91B3-4A5B-A013-FB01DCC20C58">
27 <Package
28 SummaryCodepage="1252"
29 Keywords="Installer, Adblock Plus"
30 Description="Adblock Plus for IE"
31 Comments="Thank you for using Adblock Plus."
32 Manufacturer="Eyeo GmbH"
33 InstallerVersion="200"
34 Languages="0"
35 Compressed="yes"
36 InstallScope="perMachine" InstallPrivileges="elevated"
37 />
38 <MediaTemplate EmbedCab="yes"/>
39
40 <!--
41 User interface
42 -->
43 <UIRef Id="WixUI_ErrorProgressText"/>
44 <Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER"/>
45
46 <!--
47 Define and schedule a "Custom Action Type 1" to ensure that IE is closed b efore installation.
48 Because WiX is closely tied to the MSI database format, there are multiple tags required to do this.
49 The "CustomAction" tag defines the tag itself, but doesn't sequence it;
50 it defines an entry in the "CustomAction" table.
51 The "Binary" tag describe an asset that's incorporated into the MSI but th at is not an installed component.
52 The "Custom" tag defines when the action executes by defining an entry in one of the sequence tables.
53
54 Attribute "Return" sets the "Custom Action Return Processing Options" to z ero,
55 which indicates to block the installer until the action completes
56 and to treat a non-zero return value from the action as an error.
57 -->
58 <CustomAction
59 Id="Sandbox"
60 BinaryKey="installer_library_test_ca"
61 DllEntry="sandbox"
62 Return="check"
63 />
64 <CustomAction
65 Id="Close_IE"
66 BinaryKey="installer_library_test_ca"
67 DllEntry="abp_close_ie"
68 Return="check"
69 />
70 <!-- Always check the return of the "always fail" action; otherwise there's no point in running it. -->
71 <CustomAction
72 Id="Fail"
73 BinaryKey="installer_library_test_ca"
74 DllEntry="fail"
75 Return="check"
76 />
77 <!--
78 Note that we're using a 32-bit custom action library for both 32- and 64-b it installers.
79 -->
80 <Binary Id="installer_library_test_ca" SourceFile="$(var.installer_dir)\buil d\ia32\$(var.CA_Configuration)\installer-library-test-customactions.dll"/>
81 <!--
82 The sequence of testing actions go here.
83 Alter this sequence at will to test, exercise, observe, or debug custom ac tion code.
84 The "Fail" action can be put at the end to ensure that the installer termi nates before actually trying to install anything.
85 Action might also be put into the InstallExecuteSequence, if needed.
86 -->
87 <InstallUISequence>
88 <!--
89 "LaunchConditions" occurs at the beginning of the InstallUISequence, bef ore any of the expensive operations.
90 -->
91 <Custom Action="Sandbox" After="LaunchConditions">1</Custom>
92 <Custom Action="Close_IE" After="Sandbox" />
93 <Custom Action="Fail" After="Close_IE" />
94 </InstallUISequence>
95
96 <!--
97 We have only a single feature, since there aren't any optional parts.
98 The display is hidden for the same reason; there's nothing to choose from.
99 -->
100 <Feature Id="ProductFeature"
101 Title="Empty_Feature" Description="This is a test MSI for custom actions. We don't need no stinking features."
102 Display="hidden">
103 </Feature>
104
105 <!--
106 The top-level directory structure.
107 -->
108 <Directory Id="TARGETDIR" Name="SourceDir">
109 <Directory Id="$(var.Program_Files)">
110 <!--
111 INSTALLFOLDER is within ProgramFilesFolder, which is a protected direc tory.
112 As a result, this installer requires elevated permissions to operate.
113 -->
114 <Directory Id="INSTALLFOLDER" Name="ABP Test Installer Library"/>
115 </Directory>
116 </Directory>
117
118 <!--
119 Unit tests verify the number of rows and columns of the table, as well as the presence of certain data.
120 -->
121 <?include ../custom-i18n.wxi ?>
122 <?include ../../custom-action/close_ie.wxi ?>
123 </Product>
124 </Wix>
OLDNEW

Powered by Google App Engine
This is Rietveld