xref: /aosp_15_r20/external/lzma/DOC/7zip.wxs (revision f6dc9357d832569d4d1f5d24eacdb3935a1ae8e6)
1<?xml version="1.0"?>
2
3<?define VerMajor = "24" ?>
4<?define VerMinor = "09" ?>
5<?define VerBuild = "00" ?>
6<?define MmVer = "$(var.VerMajor).$(var.VerMinor)" ?>
7<?define MmHex = "$(var.VerMajor)$(var.VerMinor)" ?>
8<?define MmmmVer = "$(var.MmVer).$(var.VerBuild).0" ?>
9<?define UpgradeMinVer = "4.38" ?>
10
11<?define ProductName = "7-Zip" ?>
12
13<?ifndef MyCPU?>
14  <?define MyCPU = "Intel" ?>
15<?endif?>
16
17<?if $(var.MyCPU) = "x64" ?>
18  <?define CpuId = "2" ?>
19  <?define PFilesFolder = "ProgramFiles64Folder" ?>
20  <?define Platforms = "x64" ?>
21  <?define CpuPostfix = " (x64 edition)" ?>
22  <?define Is64 = "yes" ?>
23  <?define NumBits = "64" ?>
24<?elseif $(var.MyCPU) = "ia64" ?>
25  <?define CpuId = "3" ?>
26  <?define PFilesFolder = "ProgramFiles64Folder" ?>
27  <?define Platforms = "Intel64" ?>
28  <?define CpuPostfix = " (ia64 edition)" ?>
29  <?define Is64 = "yes" ?>
30  <?define NumBits = "64" ?>
31<?else ?>
32  <?define CpuId = "1" ?>
33  <?define PFilesFolder = "ProgramFilesFolder" ?>
34  <?define Platforms = "Intel" ?>
35  <?define CpuPostfix = "" ?>
36  <?define Is64 = "no" ?>
37  <?define NumBits = "32" ?>
38<?endif ?>
39
40
41<?define ShellExtId = "{23170F69-40C1-278A-1000-000100020000}" ?>
42
43<?define BaseId = "23170F69-40C1-270$(var.CpuId)" ?>
44<?define BaseIdVer = "$(var.BaseId)-$(var.MmHex)-$(var.VerBuild)00" ?>
45<?define ProductId   = "$(var.BaseIdVer)01000000" ?>
46<?define PackageId   = "$(var.BaseIdVer)02000000" ?>
47<?define CompId      = "$(var.BaseIdVer)030000" ?>
48<?define UpgradeCode = "$(var.BaseId)-0000-000004000000" ?>
49
50<?define CompFm       = "$(var.CompId)01" ?>
51<?define CompShellExt = "$(var.CompId)02" ?>
52<?define CompCmdLine  = "$(var.CompId)03" ?>
53<?define CompCmdLineA = "$(var.CompId)04" ?>
54<?define CompGui      = "$(var.CompId)05" ?>
55<?define CompGuiSfx   = "$(var.CompId)06" ?>
56<?define CompConSfx   = "$(var.CompId)07" ?>
57<?define CompHelp     = "$(var.CompId)08" ?>
58<?define CompDocs     = "$(var.CompId)09" ?>
59<?define CompFormats  = "$(var.CompId)10" ?>
60<?define CompCodecs   = "$(var.CompId)11" ?>
61<?define CompLang     = "$(var.CompId)12" ?>
62<?define CompShellExt2 = "$(var.CompId)13" ?>
63<?define CompInstallRegCU         = "$(var.CompId)80" ?>
64<?define CompInstallRegLM         = "$(var.CompId)81" ?>
65<?define CompInstallRegWild       = "$(var.CompId)82" ?>
66<?define CompInstallRegDirectory  = "$(var.CompId)83" ?>
67<?define CompInstallRegDirDD      = "$(var.CompId)84" ?>
68<?define CompInstallRegDriveDD    = "$(var.CompId)85" ?>
69<?define CompInstallRegApproved   = "$(var.CompId)86" ?>
70<?define CompInstallRegAppPath    = "$(var.CompId)87" ?>
71<?define CompInstallRegFolder     = "$(var.CompId)88" ?>
72
73
74<?define Manufacturer = "Igor Pavlov" ?>
75<?define HomePage = "http://www.7-zip.org/" ?>
76<?define AboutURL = "$(var.HomePage)" ?>
77<?define UpdatesURL = "$(var.HomePage)download.html" ?>
78<?define SupportURL = "$(var.HomePage)support.html" ?>
79
80<Wix xmlns="http://schemas.microsoft.com/wix/2003/01/wi">
81  <Product
82      Id="$(var.ProductId)"
83      UpgradeCode="$(var.UpgradeCode)"
84      Name="$(var.ProductName) $(var.MmVer)$(var.CpuPostfix)"
85      Language="1033"
86      Version="$(var.MmmmVer)"
87      Manufacturer="$(var.Manufacturer)">
88
89    <Package
90        Id="$(var.PackageId)"
91        Description="$(var.ProductName)$(var.CpuPostfix) Package"
92        Comments="$(var.ProductName)$(var.CpuPostfix) Package"
93        Manufacturer="$(var.Manufacturer)"
94        InstallerVersion="200"
95        Compressed="yes"
96        Platforms="$(var.Platforms)"
97        />
98
99    <!-- Major upgrade -->
100    <Upgrade Id="$(var.UpgradeCode)">
101      <UpgradeVersion Minimum="$(var.UpgradeMinVer)" IncludeMinimum="yes"
102           Maximum="$(var.MmmmVer)" IncludeMaximum="no" Property="OLDERVERSIONBEINGUPGRADED" />
103    </Upgrade>
104
105    <Media Id="1" Cabinet="product.cab" EmbedCab="yes" CompressionLevel="high" />
106
107    <Property Id="MSIRMSHUTDOWN" Value="2"/>
108
109    <Property Id="INSTALLDIR">
110      <RegistrySearch Id="My7zipPathLM"  Type="raw" Root="HKLM" Key="Software\7-Zip" Name="Path" />
111      <RegistrySearch Id="My7zipPathLM2" Type="raw" Root="HKLM" Key="Software\7-Zip" Name="Path$(var.NumBits)" />
112      <RegistrySearch Id="My7zipPath"    Type="raw" Root="HKCU" Key="Software\7-Zip" Name="Path" />
113      <RegistrySearch Id="My7zipPath2"   Type="raw" Root="HKCU" Key="Software\7-Zip" Name="Path$(var.NumBits)" />
114    </Property>
115
116    <Property Id="ALLUSERS">2</Property>
117
118    <Property Id="LicenseAccepted">1</Property>
119
120    <Property Id="ARPURLINFOABOUT" Value="$(var.AboutURL)" />
121    <Property Id="ARPHELPLINK" Value="$(var.SupportURL)" />
122    <Property Id="ARPURLUPDATEINFO" Value="$(var.UpdatesURL)" />
123
124
125    <Directory Id="TARGETDIR" Name="SourceDir">
126      <Directory Id="$(var.PFilesFolder)" Name="Files">
127        <Directory Id="INSTALLDIR" Name="7-Zip">
128
129          <Component Id="InstallRegCU" Guid="$(var.CompInstallRegCU)" DiskId="1" Win64="$(var.Is64)">
130            <Registry Id="MyInstallRegCU"  Root="HKCU" Key="Software\7-Zip" Name="Path" Action="write" Type="string" Value="[INSTALLDIR]" />
131            <Registry Id="MyInstallRegCU2" Root="HKCU" Key="Software\7-Zip" Name="Path$(var.NumBits)" Action="write" Type="string" Value="[INSTALLDIR]" />
132          </Component>
133          <Component Id="InstallRegLM" Guid="$(var.CompInstallRegLM)" DiskId="1" Win64="$(var.Is64)">
134            <Condition>Privileged</Condition>
135            <Registry Id="MyInstallRegLM"  Root="HKLM" Key="Software\7-Zip" Name="Path" Action="write" Type="string" Value="[INSTALLDIR]" />
136            <Registry Id="MyInstallRegLM2" Root="HKLM" Key="Software\7-Zip" Name="Path$(var.NumBits)" Action="write" Type="string" Value="[INSTALLDIR]" />
137          </Component>
138
139
140          <Component Id="InstallRegWild" Guid="$(var.CompInstallRegWild)" DiskId="1" Win64="$(var.Is64)">
141            <Registry Id="MyInstallRegWild" Action="write" Type="string"
142               Root="HKCR" Key="*\shellex\ContextMenuHandlers\7-Zip"
143               Value="$(var.ShellExtId)" />
144          </Component>
145
146          <Component Id="InstallRegDirectory" Guid="$(var.CompInstallRegDirectory)" DiskId="1" Win64="$(var.Is64)">
147            <Registry Id="MyInstallRegDirectory" Action="write" Type="string"
148               Root="HKCR" Key="Directory\shellex\ContextMenuHandlers\7-Zip"
149               Value="$(var.ShellExtId)" />
150          </Component>
151
152          <Component Id="InstallRegFolder" Guid="$(var.CompInstallRegFolder)" DiskId="1" Win64="$(var.Is64)">
153            <Registry Id="MyInstallRegFolder" Action="write" Type="string"
154               Root="HKCR" Key="Folder\shellex\ContextMenuHandlers\7-Zip"
155               Value="$(var.ShellExtId)" />
156          </Component>
157
158          <Component Id="InstallRegDirDD" Guid="$(var.CompInstallRegDirDD)" DiskId="1" Win64="$(var.Is64)">
159            <Registry Id="MyInstallRegDirDD" Action="write" Type="string"
160               Root="HKCR" Key="Directory\shellex\DragDropHandlers\7-Zip"
161               Value="$(var.ShellExtId)" />
162          </Component>
163
164          <Component Id="InstallRegDriveDD" Guid="$(var.CompInstallRegDriveDD)" DiskId="1" Win64="$(var.Is64)">
165            <Registry Id="MyInstallRegDriveDD" Action="write" Type="string"
166               Root="HKCR" Key="Drive\shellex\DragDropHandlers\7-Zip"
167               Value="$(var.ShellExtId)" />
168          </Component>
169
170          <Component Id="InstallRegApproved" Guid="$(var.CompInstallRegApproved)" DiskId="1" Win64="$(var.Is64)">
171            <Condition>Privileged</Condition>
172            <Registry Id="MyInstallRegApproved" Action="write" Type="string"
173               Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved"
174               Name="$(var.ShellExtId)" Value="7-Zip Shell Extension" />
175          </Component>
176
177
178          <Component Id="InstallRegAppPath" Guid="$(var.CompInstallRegAppPath)" DiskId="1" Win64="$(var.Is64)">
179            <Condition>Privileged</Condition>
180            <Registry Id="MyInstallRegAppPath" Action="write" Type="string"
181               Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\App Paths\7zFM.exe"
182               Value="[INSTALLDIR]7zFM.exe" />
183            <Registry Id="MyInstallRegAppPath2" Action="write" Type="string"
184               Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\App Paths\7zFM.exe" Name="Path"
185               Value="[INSTALLDIR]" />
186          </Component>
187
188          <Component Id="Fm" Guid="$(var.CompFm)" DiskId="1" Win64="$(var.Is64)">
189            <File Id="_7zFM.exe" Name="7zFM.exe">
190              <Shortcut Id="startmenuFmShortcut" Directory="PMenu" Name="7zipFM" LongName="7-Zip File Manager" />
191            </File>
192          </Component>
193
194          <?if $(var.MyCPU) = "x64" ?>
195
196          <Component Id="ShellExt32" Guid="$(var.CompShellExt2)" DiskId="1" Win64="no">
197            <File Id="_7zip32.dll" Name="7-zip32.dll" />
198            <Registry Id="shellReg0_32" Action="write" Type="string" Root="HKCR"
199               Key="CLSID\$(var.ShellExtId)\InprocServer32"
200               Value="[INSTALLDIR]7-zip32.dll" />
201            <Registry Id="shellReg1_32" Action="write" Type="string" Root="HKCR"
202               Key="CLSID\$(var.ShellExtId)\InprocServer32"
203               Name="ThreadingModel"
204               Value="Apartment" />
205          </Component>
206
207          <?endif ?>
208
209          <Component Id="ShellExt" Guid="$(var.CompShellExt)" DiskId="1" Win64="$(var.Is64)">
210            <File Id="_7zip.dll" Name="7-zip.dll" />
211            <Registry Id="shellReg0" Action="write" Type="string" Root="HKCR"
212               Key="CLSID\$(var.ShellExtId)\InprocServer32"
213               Value="[INSTALLDIR]7-zip.dll" />
214            <Registry Id="shellReg1" Action="write" Type="string" Root="HKCR"
215               Key="CLSID\$(var.ShellExtId)\InprocServer32"
216               Name="ThreadingModel"
217               Value="Apartment" />
218          </Component>
219
220          <Component Id="Gui" Guid="$(var.CompGui)" DiskId="1" Win64="$(var.Is64)">
221            <File Id="_7zG.exe" Name="7zG.exe" />
222          </Component>
223
224          <Component Id="Formats" Guid="$(var.CompFormats)" DiskId="1" Win64="$(var.Is64)">
225              <File Id="_7z.dll" Name="7z.dll" />
226          </Component>
227
228          <Component Id="CmdLine" Guid="$(var.CompCmdLine)" DiskId="1" Win64="$(var.Is64)">
229            <File Id="_7z.exe" Name="7z.exe" />
230          </Component>
231
232          <Component Id="GuiSfx" Guid="$(var.CompGuiSfx)" DiskId="1" Win64="$(var.Is64)">
233            <File Id="_7z.sfx" Name="7z.sfx" />
234          </Component>
235
236          <Component Id="ConSfx" Guid="$(var.CompConSfx)" DiskId="1" Win64="$(var.Is64)">
237            <File Id="_7zCon.sfx" Name="7zCon.sfx" />
238          </Component>
239
240          <Component Id="Docs" Guid="$(var.CompDocs)" DiskId="1" Win64="$(var.Is64)">
241            <File Id="descript.ion" Name="descript.ion" />
242            <File Id="History.txt" Name="History.txt" />
243            <File Id="License.txt" Name="License.txt" />
244            <File Id="readme.txt" Name="readme.txt" />
245          </Component>
246
247
248          <Component Id="Help" Guid="$(var.CompHelp)">
249            <File Id="_7zip.chm" Name="7-zip.chm" DiskId="1" >
250              <Shortcut Id="startmenuHelpShortcut" Directory="PMenu" Name="7zipHelp" LongName="7-Zip Help" />
251            </File>
252          </Component>
253
254          <Directory Id="MyLang" Name="Lang">
255            <Component Id="Lang" Guid="$(var.CompLang)" DiskId="1" Win64="$(var.Is64)">
256              <File Id="en.ttt" Name="en.ttt" />
257              <File Id="af.txt" Name="af.txt" />
258              <File Id="an.txt" Name="an.txt" />
259              <File Id="ar.txt" Name="ar.txt" />
260              <File Id="ast.txt" Name="ast.txt" />
261              <File Id="az.txt" Name="az.txt" />
262              <File Id="ba.txt" Name="ba.txt" />
263              <File Id="be.txt" Name="be.txt" />
264              <File Id="bg.txt" Name="bg.txt" />
265              <File Id="bn.txt" Name="bn.txt" />
266              <File Id="br.txt" Name="br.txt" />
267              <File Id="ca.txt" Name="ca.txt" />
268              <File Id="co.txt" Name="co.txt" />
269              <File Id="cs.txt" Name="cs.txt" />
270              <File Id="cy.txt" Name="cy.txt" />
271              <File Id="da.txt" Name="da.txt" />
272              <File Id="de.txt" Name="de.txt" />
273              <File Id="el.txt" Name="el.txt" />
274              <File Id="eo.txt" Name="eo.txt" />
275              <File Id="es.txt" Name="es.txt" />
276              <File Id="et.txt" Name="et.txt" />
277              <File Id="eu.txt" Name="eu.txt" />
278              <File Id="ext.txt" Name="ext.txt" />
279              <File Id="fa.txt" Name="fa.txt" />
280              <File Id="fi.txt" Name="fi.txt" />
281              <File Id="fr.txt" Name="fr.txt" />
282              <File Id="fur.txt" Name="fur.txt" />
283              <File Id="fy.txt" Name="fy.txt" />
284              <File Id="ga.txt" Name="ga.txt" />
285              <File Id="gl.txt" Name="gl.txt" />
286              <File Id="gu.txt" Name="gu.txt" />
287              <File Id="he.txt" Name="he.txt" />
288              <File Id="hi.txt" Name="hi.txt" />
289              <File Id="hr.txt" Name="hr.txt" />
290              <File Id="hu.txt" Name="hu.txt" />
291              <File Id="hy.txt" Name="hy.txt" />
292              <File Id="id.txt" Name="id.txt" />
293              <File Id="io.txt" Name="io.txt" />
294              <File Id="is.txt" Name="is.txt" />
295              <File Id="it.txt" Name="it.txt" />
296              <File Id="ja.txt" Name="ja.txt" />
297              <File Id="ka.txt" Name="ka.txt" />
298              <File Id="kaa.txt" Name="kaa.txt" />
299              <File Id="kab.txt" Name="kab.txt" />
300              <File Id="kk.txt" Name="kk.txt" />
301              <File Id="ko.txt" Name="ko.txt" />
302              <File Id="ku.txt" Name="ku.txt" />
303              <File Id="ku_ckb.txt" Name="ku-ckb.txt" />
304              <File Id="ky.txt" Name="ky.txt" />
305              <File Id="lij.txt" Name="lij.txt" />
306              <File Id="lt.txt" Name="lt.txt" />
307              <File Id="lv.txt" Name="lv.txt" />
308              <File Id="mk.txt" Name="mk.txt" />
309              <File Id="mn.txt" Name="mn.txt" />
310              <File Id="mng.txt" Name="mng.txt" />
311              <File Id="mng2.txt" Name="mng2.txt" />
312              <File Id="mr.txt" Name="mr.txt" />
313              <File Id="ms.txt" Name="ms.txt" />
314              <File Id="ne.txt" Name="ne.txt" />
315              <File Id="nl.txt" Name="nl.txt" />
316              <File Id="nb.txt" Name="nb.txt" />
317              <File Id="nn.txt" Name="nn.txt" />
318              <File Id="pa_in.txt" Name="pa-in.txt" />
319              <File Id="pl.txt" Name="pl.txt" />
320              <File Id="ps.txt" Name="ps.txt" />
321              <File Id="pt.txt" Name="pt.txt" />
322              <File Id="pt_br.txt" Name="pt-br.txt" />
323              <File Id="ro.txt" Name="ro.txt" />
324              <File Id="ru.txt" Name="ru.txt" />
325              <File Id="sa.txt" Name="sa.txt" />
326              <File Id="si.txt" Name="si.txt" />
327              <File Id="sk.txt" Name="sk.txt" />
328              <File Id="sl.txt" Name="sl.txt" />
329              <File Id="sq.txt" Name="sq.txt" />
330              <File Id="sr_spl.txt" Name="sr-spl.txt" />
331              <File Id="sr_spc.txt" Name="sr-spc.txt" />
332              <File Id="sv.txt" Name="sv.txt" />
333              <File Id="sw.txt" Name="sw.txt" />
334              <File Id="ta.txt" Name="ta.txt" />
335              <File Id="tg.txt" Name="tg.txt" />
336              <File Id="th.txt" Name="th.txt" />
337              <File Id="tk.txt" Name="tk.txt" />
338              <File Id="tr.txt" Name="tr.txt" />
339              <File Id="tt.txt" Name="tt.txt" />
340              <File Id="ug.txt" Name="ug.txt" />
341              <File Id="uk.txt" Name="uk.txt" />
342              <File Id="uz.txt" Name="uz.txt" />
343              <File Id="uz_cyrl.txt" Name="uz-cyrl.txt" />
344              <File Id="va.txt" Name="va.txt" />
345              <File Id="vi.txt" Name="vi.txt" />
346              <File Id="yo.txt" Name="yo.txt" />
347              <File Id="zh_cn.txt" Name="zh-cn.txt" />
348              <File Id="zh_tw.txt" Name="zh-tw.txt" />
349            </Component>
350          </Directory>
351
352
353        </Directory>
354      </Directory>
355
356      <Directory Id="ProgramMenuFolder" Name="PMenu" LongName="Programs">
357        <Directory Id="PMenu" Name="7zip" LongName="7-Zip" />
358      </Directory>
359    </Directory>
360
361    <Feature Id="Complete" Title="7-Zip" Description="The complete package."
362         Display="expand" Level="1" ConfigurableDirectory="INSTALLDIR"
363         Absent="disallow" AllowAdvertise="no" >
364      <Feature Id="Program" Title="Program files" Description="Program files." Level="1"
365         Absent="disallow" AllowAdvertise="no">
366        <ComponentRef Id="Fm" />
367        <ComponentRef Id="ShellExt" />
368        <?if $(var.MyCPU) = "x64" ?>
369        <ComponentRef Id="ShellExt32" />
370        <?endif ?>
371        <ComponentRef Id="CmdLine" />
372        <ComponentRef Id="Gui" />
373        <ComponentRef Id="GuiSfx" />
374        <ComponentRef Id="ConSfx" />
375        <ComponentRef Id="Formats" />
376        <ComponentRef Id="Docs" />
377        <ComponentRef Id="Help" />
378        <ComponentRef Id="InstallRegCU" />
379        <ComponentRef Id="InstallRegLM" />
380        <ComponentRef Id="InstallRegWild" />
381        <ComponentRef Id="InstallRegDirectory" />
382        <ComponentRef Id="InstallRegDirDD" />
383        <ComponentRef Id="InstallRegDriveDD" />
384        <ComponentRef Id="InstallRegApproved" />
385        <ComponentRef Id="InstallRegAppPath" />
386        <ComponentRef Id="InstallRegFolder" />
387
388      </Feature>
389      <Feature Id="LanguageFiles" Title="Localization files" Description="Localization files for 71 languages."
390          Level="1" AllowAdvertise="no">
391        <ComponentRef Id="Lang" />
392      </Feature>
393    </Feature>
394
395    <UIRef Id="WixUI" />
396
397    <!-- Install Sequences -->
398    <InstallExecuteSequence>
399      <RemoveExistingProducts After="InstallValidate" />
400    </InstallExecuteSequence>
401
402  </Product>
403</Wix>
404