-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
qubes-tools-combined.wxs
709 lines (647 loc) · 31.3 KB
/
qubes-tools-combined.wxs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
<?xml version='1.0' encoding='UTF-8'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi' xmlns:iis='http://schemas.microsoft.com/wix/IIsExtension' xmlns:difx="http://schemas.microsoft.com/wix/DifxAppExtension">
<?ifdef env.MSIBUILD ?>
<?define MODULE_SUFFIX = $(env.MSIOS)$(env.MSIARCH)$(env.MSIBUILD)?>
<?else?>
<?define MODULE_SUFFIX = $(env.MSIOS)$(env.MSIARCH)?>
<?endif?>
<?if $(env.DDK_ARCH) = x64 ?>
<?define PFILESDIR = ProgramFiles64Folder ?>
<?define SYSDIR = System64Folder ?>
<?else?>
<?define PFILESDIR = ProgramFilesFolder ?>
<?define SYSDIR = SystemFolder ?>
<?endif ?>
<?if $(env.WIN_BUILD_TYPE) = chk ?>
<?define DEBUG = Debug ?>
<?else?>
<?define DEBUG = '' ?>
<?endif ?>
<?define SOURCEDIR = $(env.QUBES_BIN) ?>
<Product
Id='*'
Name='Qubes Windows Tools'
UpgradeCode='{FB972F47-0D68-43EF-9820-92FDEB51DCD5}'
Language='1033'
Codepage='1252'
Version='$(env.VERSION)'
Manufacturer='Invisible Things Lab'
>
<Package
Id='*'
Description='Qubes Windows Tools'
Manufacturer='Invisible Things Lab'
InstallerVersion='405'
Languages='1033'
Compressed='yes'
SummaryCodepage='1252'
/>
<Media Id='1' Cabinet='content.cab' EmbedCab='yes'/>
<MajorUpgrade
AllowSameVersionUpgrades='no'
DowngradeErrorMessage='A later version of [ProductName] is already installed. Setup will now exit.'
/>
<!-- Skip the license dialog: it's displayed by the bundle, so no need to have it here as well. -->
<UI>
<UIRef Id='WixUI_Mondo'/>
<Publish Dialog="WelcomeDlg"
Control="Next"
Event="NewDialog"
Value="CustomizeDlg"
Order="2">1</Publish>
<Publish Dialog="CustomizeDlg"
Control="Back"
Event="NewDialog"
Value="WelcomeDlg"
Order="2">1</Publish>
</UI>
<Property Id='SYSTEMSTARTOPTIONS'>
<RegistrySearch Id='SystemStartOptions'
Root='HKLM'
Key='SYSTEM\CurrentControlSet\Control'
Name='SystemStartOptions'
Type='raw'
/>
</Property>
<Directory Id='TARGETDIR' Name='SourceDir' DiskId='1'>
<Directory Id='$(var.PFILESDIR)'>
<Directory Id='ITLProgramFilesDir' Name='Invisible Things Lab'>
<Directory Id='INSTALLDIR' Name='Qubes Tools'>
<Directory Id='LogDir' Name='log'>
<Component Id='CreateLogDir' Guid='{61BC344A-BD13-4886-8DF8-007C40B2F31C}'>
<CreateFolder/>
</Component>
</Directory>
<Component Id='QubesRegistry'>
<RegistryKey Root='HKLM' Key='Software\Invisible Things Lab\Qubes Tools'>
<RegistryValue Type='string' Name='InstallDir' Value='[INSTALLDIR]'/>
<RegistryValue Type='string' Name='LogDir' Value='[INSTALLDIR]\log'/>
<RegistryValue Type='integer' Name='LogLevel' Value='2'/>
</RegistryKey>
<RegistryKey Root='HKLM' Key='SYSTEM\CurrentControlSet\Control\Session Manager\Debug Print Filter'>
<!-- Default debug print filter masks for drivers. Mostly useful to not spam a debugger when testing. 0x3f is all predefined levels. -->
<RegistryValue Type='integer' Name='IHVDRIVER' Value='3'/>
<RegistryValue Type='integer' Name='IHVVIDEO' Value='3'/>
</RegistryKey>
<Environment Id='QubesToolsEnv' Action='set' Name='QUBES_TOOLS' Part='all' Permanent='no' System='yes' Value='[INSTALLDIR]' />
</Component>
<Directory Id='DriversDir' Name='Drivers'>
<Directory Id='XenbusDir' Name='xenbus'>
<Component Id='XenbusDriver' Guid='{FAC4C476-2F1C-4970-B5E1-8FD95A9BBCB9}'>
<File Id='XenbusInf' Source='$(var.SOURCEDIR)\xenbus.inf' KeyPath='yes' />
<File Id='XenbusCat' Source='$(var.SOURCEDIR)\xenbus.cat' />
<File Id='XenbusSys' Source='$(var.SOURCEDIR)\xenbus.sys' />
<File Id='XenSys' Source='$(var.SOURCEDIR)\xen.sys' />
<File Id='XenfiltSys' Source='$(var.SOURCEDIR)\xenfilt.sys' />
<File Id='XenbusCoinst' Source='$(var.SOURCEDIR)\xenbus_coinst.dll' />
<File Id='XenbusMonitorDll' Source='$(var.SOURCEDIR)\xenbus_monitor.dll' />
<File Id='XenbusMonitorExe' Source='$(var.SOURCEDIR)\xenbus_monitor.exe' />
<difx:Driver />
</Component>
</Directory>
<Directory Id='XenifaceDir' Name='xeniface'>
<Component Id='XenifaceDriver' Guid='{D464EDB0-CF0D-4FE5-A160-210BF246C3A4}'>
<File Id='XenifaceInf' Source='$(var.SOURCEDIR)\xeniface.inf' KeyPath='yes' />
<File Id='XenifaceCat' Source='$(var.SOURCEDIR)\xeniface.cat' />
<File Id='XenifaceSys' Source='$(var.SOURCEDIR)\xeniface.sys' />
<File Id='XenagentDll' Source='$(var.SOURCEDIR)\xenagent.dll' />
<File Id='XenagentExe' Source='$(var.SOURCEDIR)\xenagent.exe' />
<File Id='XenifaceCoinst' Source='$(var.SOURCEDIR)\xeniface_coinst.dll' />
<difx:Driver />
</Component>
</Directory>
<Directory Id='XennetDir' Name='xennet'>
<Component Id='XennetDriver' Guid='{AEFEC088-0B30-4EFC-8416-5E3675AC03D0}'>
<File Id='XennetInf' Source='$(var.SOURCEDIR)\xennet.inf' KeyPath='yes' />
<File Id='XennetCat' Source='$(var.SOURCEDIR)\xennet.cat' />
<File Id='XennetSys' Source='$(var.SOURCEDIR)\xennet.sys' />
<File Id='XennetCoinst' Source='$(var.SOURCEDIR)\xennet_coinst.dll' />
<difx:Driver />
</Component>
</Directory>
<Directory Id='XenvbdDir' Name='xenvbd'>
<Component Id='XenvbdDriver' Guid='{87BAEE21-4695-4B75-A484-0A6136B70516}'>
<File Id='XenvbdInf' Source='$(var.SOURCEDIR)\xenvbd.inf' KeyPath='yes' />
<File Id='XenvbdCat' Source='$(var.SOURCEDIR)\xenvbd.cat' />
<File Id='XenvbdSys' Source='$(var.SOURCEDIR)\xenvbd.sys' />
<File Id='XendiskSys' Source='$(var.SOURCEDIR)\xendisk.sys' />
<File Id='XencrshSys' Source='$(var.SOURCEDIR)\xencrsh.sys' />
<File Id='XenvbdCoinst' Source='$(var.SOURCEDIR)\xenvbd_coinst.dll' />
<difx:Driver />
</Component>
</Directory>
<Directory Id='XenvifDir' Name='xenvif'>
<Component Id='XenvifDriver' Guid='{90BC2F5A-7414-4FF6-96E4-5789DDB1AECF}'>
<File Id='XenvifInf' Source='$(var.SOURCEDIR)\xenvif.inf' KeyPath='yes' />
<File Id='XenvifCat' Source='$(var.SOURCEDIR)\xenvif.cat' />
<File Id='XenvifSys' Source='$(var.SOURCEDIR)\xenvif.sys' />
<File Id='XenvifCoinst' Source='$(var.SOURCEDIR)\xenvif_coinst.dll' />
<difx:Driver />
</Component>
</Directory>
<Directory Id='QvideoDir' Name='qvideo'>
<Component Id='qvideo' Guid='{EC90C049-0025-4815-9106-6ABC438470A4}'>
<File Id='qvgdi.dll' Source='$(var.SOURCEDIR)\qvgdi.dll'/>
<File Id='qvmini.sys' Source='$(var.SOURCEDIR)\qvmini.sys'/>
<File Id='qvideo.inf' Source='$(var.SOURCEDIR)\qvideo.inf'/>
<difx:Driver Sequence='10' Legacy='yes' PlugAndPlayPrompt='no' ForceInstall='yes'/>
</Component>
</Directory>
</Directory>
<Directory Id='BinDir' Name='bin'>
<Component Id='QrexecAgent' Guid='{0e26617f-e5d9-4943-a08e-cf29013e9d72}'>
<File Id='qrexec_agent.exe' Source='$(var.SOURCEDIR)\qrexec-agent.exe' KeyPath='yes'/>
<ServiceInstall
Id='QrexecService'
Type='ownProcess'
Vital='yes'
Name='QrexecAgent'
DisplayName='Qubes RPC Agent'
Description='Qubes remote execute agent'
Start='auto'
Account='LocalSystem'
ErrorControl='ignore'
Interactive='no'
>
<ServiceDependency Id='QdbDaemon' />
</ServiceInstall>
<ServiceControl
Id='QrexecServiceControl'
Stop='both'
Remove='uninstall'
Name='QrexecAgent'
Wait='yes'
/>
</Component>
<Component Id='QrexecClientVm' Guid='{1e74cee2-523b-4870-8e24-49d4945c4a5c}'>
<File Id='ask_vm_and_run.exe' Source='$(var.SOURCEDIR)\ask-vm-and-run.exe' KeyPath='yes'>
</File>
</Component>
<Component Id='QrexecWrapper' Guid='{EC103A81-6828-4ABA-9706-644DBBD4D615}'>
<File Id='qrexec_wrapper.exe' Source='$(var.SOURCEDIR)\qrexec-wrapper.exe' KeyPath='yes'/>
</Component>
<Component Id='AskVmAndRun' Guid='{b5700d68-2ceb-4764-9e4b-11ae33b2d05b}'>
<File Id='qrexec_client_vm.exe' Source='$(var.SOURCEDIR)\qrexec-client-vm.exe' KeyPath='yes'>
<Shortcut
Id='qopen_dvm_sendto_shortcut'
Name='Edit in DispVM'
Directory='SendToFolder'
Arguments='@dispvm|qubes.OpenInVM|[QubesRPCServicesDir]\open-in-vm.exe'
Show='minimized'
/>
<Shortcut
Id='CopyToVm'
Name='Copy to other VM'
Directory='SendToFolder'
Arguments='@default|qubes.Filecopy|[QubesRPCServicesDir]\file-sender.exe'
/>
<Shortcut
Id='EditInVm'
Name='Edit in VM'
Directory='SendToFolder'
Arguments='@default|qubes.OpenInVM|[QubesRPCServicesDir]\open-in-vm.exe'
/>
</File>
</Component>
<Component Id='NetworkSetup' Guid='{7201739e-35fb-11e3-9760-00163e5e6c10}'>
<File Id='network_setup.exe' Source='$(var.SOURCEDIR)\network-setup.exe' KeyPath='yes'/>
<ServiceInstall
Id='NetworkSetupService'
Type='ownProcess'
Vital='yes'
Name='QubesNetworkSetup'
DisplayName='Qubes Network Setup'
Description='Setup network according to Qubes VM settings'
Start='auto'
Account='LocalSystem'
ErrorControl='ignore'
Interactive='no'
Arguments='-service'
>
<ServiceDependency Id='iphlpsvc' />
<ServiceDependency Id='QdbDaemon' />
</ServiceInstall>
<ServiceControl
Id='NetworkSetupServiceControl'
Stop='both'
Remove='uninstall'
Name='QubesNetworkSetup'
Wait='yes'
/>
</Component>
<Component Id='ServicePolicy' Guid='{F9818E4E-76C4-40DE-A8F3-945336C954B1}'>
<File Id='service_policy.exe' Source='$(var.SOURCEDIR)\service-policy.exe' KeyPath='yes' />
<File Id='service_policy.cfg' Source='$(var.SOURCEDIR)\service-policy.cfg' />
</Component>
<Component Id='AdvertiseTools' Guid='{DEDA44D9-6A58-4DE7-902A-643FB594B93C}'>
<File Id='advertise_tools.exe' Source='$(var.SOURCEDIR)\advertise-tools.exe' KeyPath='yes'/>
</Component>
<Component Id='QubesDbDaemon' Guid='{1CE95F90-FBD1-4D1D-B955-C31D42F84D3C}'>
<File Id='QdbDaemon' Source='$(var.SOURCEDIR)\qubesdb-daemon.exe' KeyPath='yes'/>
<ServiceInstall
Id='QdbService'
Type='ownProcess'
Vital='yes'
Name='QdbDaemon'
DisplayName='QubesDB daemon'
Description='Qubes configuration database agent'
Start='auto'
Account='LocalSystem'
ErrorControl='ignore'
Interactive='no'
Arguments='0'
/>
<ServiceControl
Id='QdbServiceControl'
Stop='both'
Remove='uninstall'
Name='QdbDaemon'
Wait='yes'
/>
</Component>
<Component Id='GuiAgent' Guid='{69131C28-618B-4662-9AFC-70767E50F05D}'>
<File Id='qga.exe' Source='$(var.SOURCEDIR)\qga.exe' KeyPath="yes"/>
<File Id="PkiHelper" Source='$(var.SOURCEDIR)\pkihelper.exe'/>
<RegistryValue Root="HKLM" Key="Software\Invisible Things Lab\Qubes Tools" Name="Autostart" Type="string" Value='"[BinDir]qga.exe"'/>
<RegistryValue Root="HKLM" Key="Software\Invisible Things Lab\Qubes Tools" Name="UseDirtyBits" Type="integer" Value='0'/>
<RegistryValue Root="HKLM" Key="Software\Invisible Things Lab\Qubes Tools\qga" Name="MaxFps" Type="integer" Value='0'/>
<RegistryValue Root="HKLM" Key="Software\Invisible Things Lab\Qubes Tools\qga" Name="DisableCursor" Type="integer" Value='1'/>
<RegistryValue Root="HKLM" Key="Software\Invisible Things Lab\Qubes Tools\qga" Name="SeamlessMode" Type="integer" Value='0'/>
</Component>
<Component Id='QgaWatchdog' Guid='{5A490AD9-203D-4634-9ABA-4FB02416D0BC}'>
<File Id='QgaWatchdog.exe' Source='$(var.SOURCEDIR)\QgaWatchdog.exe' KeyPath="yes"/>
<ServiceInstall
Id="ServiceInstaller"
Type="ownProcess"
Vital="yes"
Name="QgaWatchdog"
DisplayName="Qubes Gui Agent Watchdog"
Description="Qubes Gui Agent Watchdog"
Start="auto"
Account="LocalSystem"
ErrorControl="ignore"
Interactive="no"
>
<ServiceDependency Id="QdbDaemon" />
</ServiceInstall>
<ServiceControl Id="QgaWatchdogService" Remove="uninstall" Name="QgaWatchdog" Wait="no" />
</Component>
<Component Id='PrepareVolume' Guid='{220A22F3-0B73-4A4C-B825-53132A88D1DF}'>
<File Id='prepare_volume.exe' Source='$(var.SOURCEDIR)\prepare-volume.exe' KeyPath='yes' />
</Component>
<Component Id='PowerSettings'>
<File Id='power_settings.bat' Source='power_settings.bat' KeyPath='yes'/>
</Component>
</Directory>
<Directory Id='QubesRPCDir' Name='qubes-rpc'>
<Component Id='QrexecServicesConfig' Guid='{9efff253-25a8-40ed-861a-0d576f0ca439}'>
<File Id='qubes.Filecopy' Source='$(var.SOURCEDIR)\qubes-rpc\qubes.Filecopy' KeyPath='yes'/>
<File Id='qubes.ClipboardCopy' Source='$(var.SOURCEDIR)\qubes-rpc\qubes.ClipboardCopy'/>
<File Id='qubes.ClipboardPaste' Source='$(var.SOURCEDIR)\qubes-rpc\qubes.ClipboardPaste'/>
<File Id='qubes.VMShell' Source='$(var.SOURCEDIR)\qubes-rpc\qubes.VMShell'/>
<File Id='qubes.OpenInVM' Name='qubes.OpenInVM' Source='$(var.SOURCEDIR)\qubes-rpc\qubes.OpenInVM'/>
<File Id='qubes.WaitForSession' Source='$(var.SOURCEDIR)\qubes-rpc\qubes.WaitForSession'/>
<File Id='qubes.SetGuiMode' Source='$(var.SOURCEDIR)\qubes-rpc\qubes.SetGuiMode'/>
<File Id='qubes.GetAppMenus' Source='$(var.SOURCEDIR)\qubes-rpc\qubes.GetAppMenus'/>
<File Id='qubes.StartApp' Source='$(var.SOURCEDIR)\qubes-rpc\qubes.StartApp'/>
<File Id='qubes.GetImageRGBA' Source='$(var.SOURCEDIR)\qubes-rpc\qubes.GetImageRGBA'/>
<File Id='qubes.SetDateTime' Source='$(var.SOURCEDIR)\qubes-rpc\qubes.SetDateTime'/>
<File Id='qubes.OpenURL' Source='$(var.SOURCEDIR)\qubes-rpc\qubes.OpenURL'/>
</Component>
</Directory>
<Directory Id='QubesRPCServicesDir' Name='qubes-rpc-services'>
<Component Id='QrexecServices' Guid='{2543621b-2d67-4726-9a3b-7a1c471a1e19}'>
<File Id='file_sender.exe' Source='$(var.SOURCEDIR)\file-sender.exe' KeyPath='yes'/>
<File Id='file_receiver.exe' Source='$(var.SOURCEDIR)\file-receiver.exe'/>
<File Id='clipboard_copy.exe' Source='$(var.SOURCEDIR)\clipboard-copy.exe'/>
<File Id='clipboard_paste.exe' Source='$(var.SOURCEDIR)\clipboard-paste.exe'/>
<File Id='vm_file_editor.exe' Source='$(var.SOURCEDIR)\vm-file-editor.exe'/>
<File Id='open_in_vm.exe' Source='$(var.SOURCEDIR)\open-in-vm.exe'/>
<File Id='wait_for_logon.exe' Source='$(var.SOURCEDIR)\wait-for-logon.exe'/>
<File Id='set_gui_mode.exe' Source='$(var.SOURCEDIR)\set-gui-mode.exe'/>
<File Id='get_appmenus.ps1' Source='$(var.SOURCEDIR)\get-appmenus.ps1'/>
<File Id='start_app.ps1' Source='$(var.SOURCEDIR)\start-app.ps1'/>
<File Id='get_image_rgba.exe' Source='$(var.SOURCEDIR)\get-image-rgba.exe'/>
<File Id='window_icon_updater.exe' Source='$(var.SOURCEDIR)\window-icon-updater.exe'/>
<File Id='set_time.ps1' Source='$(var.SOURCEDIR)\set-time.ps1'/>
<File Id='open_url.exe' Source='$(var.SOURCEDIR)\open-url.exe'/>
</Component>
</Directory>
<Component Id='DisableUac'>
<RegistryKey Root='HKLM' Key='Software\Microsoft\Windows\CurrentVersion\Policies\System'>
<RegistryValue Type='integer' Name='EnableLUA' Value='0'/>
</RegistryKey>
</Component>
<?ifdef env.CERT_PUBLIC_FILENAME?>
<Component Id='Cert' Guid='BBCBDD9E-3170-4FAD-9608-E591E4C2BBBE'>
<File Id='xen_pvdrivers_cert' Name='xen_pvdrivers_cert' DiskId='1' Source='$(env.CERT_PUBLIC_FILENAME)' />
<iis:Certificate Id='xen_pvdrivers_cert_root' Name='xen_pvdrivers_cert' Request='no' BinaryKey='xen_pvdrivers_cert' StoreLocation='localMachine' StoreName='root' Overwrite='no' />
<iis:Certificate Id='xen_pvdrivers_cert_trustedPublisher' Name='xen_pvdrivers_cert' Request='no' BinaryKey='xen_pvdrivers_cert' StoreLocation='localMachine' StoreName='trustedPublisher' Overwrite='no' />
</Component>
<?endif ?>
</Directory>
</Directory>
</Directory>
<Directory Id='$(var.SYSDIR)'>
<Component Id='XenUserDlls' Guid='{1BA9B085-AFC2-4248-9DF2-5E85692DC707}'>
<File Id='xencontrol' Source='$(var.SOURCEDIR)\xencontrol.dll' KeyPath='yes' />
<File Id='libxenvchan' Source='$(var.SOURCEDIR)\libxenvchan.dll' />
</Component>
<Component Id='WindowsUtilsDll' Guid='{B701294F-7A5E-48C8-B1D4-74968E4479D7}'>
<File Id='windows_utils.dll' Source='$(var.SOURCEDIR)\windows-utils.dll' KeyPath='yes' />
</Component>
<Component Id='VchanDll' Guid='{A7483192-22F6-47AC-AD77-E5CE3091B879}'>
<File Id='libvchan.dll' Source='$(var.SOURCEDIR)\libvchan.dll' KeyPath='yes' />
</Component>
<Component Id='QubesDbClient' Guid='{E9742F11-6E77-44FC-8A53-168BE2D9273A}'>
<File Id='QdbClient' Source='$(var.SOURCEDIR)\qubesdb-client.dll' KeyPath='yes'/>
<File Id='QdbCmd' Source='$(var.SOURCEDIR)\qubesdb-cmd.exe'/>
</Component>
<Component Id='RelocateDir' Guid='{C4325378-B946-4C6C-A685-F3E39A10AF20}'>
<File Id='relocate_dir.exe' Source='$(var.SOURCEDIR)\relocate-dir.exe' KeyPath='yes' />
</Component>
</Directory>
<Directory Id='SendToFolder'/>
</Directory>
<?ifdef env.CERT_PUBLIC_FILENAME?>
<Binary Id='xen_pvdrivers_cert' SourceFile='$(env.CERT_PUBLIC_FILENAME)' />
<?endif ?>
<Binary Id='Uninstaller' SourceFile='bin\$(env.DDK_ARCH)\uninstaller.exe' />
<Binary Id='advertise_tools.exe' SourceFile='$(var.SOURCEDIR)\advertise-tools.exe' />
<CustomAction
Id="RunServicePolicy"
Return="ignore"
Impersonate="no"
Execute="deferred"
FileKey="service_policy.exe"
ExeCommand='"[BinDir]\service-policy.cfg"'
/>
<CustomAction
Id='UninstallCleanup'
Return='check'
Impersonate='no'
Execute='deferred'
BinaryKey='Uninstaller'
ExeCommand=''
/>
<Property Id="CMD">
<DirectorySearch Id="SysDir" Path="[SystemFolder]" Depth="1">
<FileSearch Id="CmdExe" Name="cmd.exe" />
</DirectorySearch>
</Property>
<CustomAction
Id='SetPowerSettings'
Return='ignore'
Impersonate='no'
Execute='deferred'
Property='CMD'
ExeCommand='/c "[BinDir]\power_settings.bat"'
/>
<!-- This is here instead of in the qrexec module because on upgrade we need to run this
before the qrexec module is processed by MSI (restart after old version uninstall happens first). -->
<!-- 0 is the argument for advertising that tools are not installed. -->
<CustomAction
Id='UnadvertiseTools'
BinaryKey='advertise_tools.exe'
Return='ignore'
Execute='immediate'
Impersonate='yes'
ExeCommand='0'
/>
<SetProperty Id="SignQvideoDriver" Value='"[BinDir]pkihelper.exe" -v -p "[DriversDir]qvideo"' Sequence="execute" Before="SignQvideoDriver"/>
<CustomAction Id="SignQvideoDriver" Impersonate="no" BinaryKey="WixCA" DllEntry="WixQuietExec" Execute="deferred" Return="ignore"/>
<Binary Id="CreateDeviceHelper" SourceFile="$(var.SOURCEDIR)\create-device.exe"/>
<Binary Id="DisableDevHelper" SourceFile="$(var.SOURCEDIR)\disable-device.exe"/>
<CustomAction
Id="RegisterVideoDevice"
Return="check"
Impersonate="no"
Execute="deferred"
BinaryKey="CreateDeviceHelper"
ExeCommand='"[QvideoDir]qvideo.inf" ITL_QubesVideo'
/>
<!-- Disable all PCI Display devices. Our device is ROOT device -->
<CustomAction
Id="DisableSVGA"
Return="ignore"
Impersonate="no"
Execute="deferred"
BinaryKey="DisableDevHelper"
ExeCommand='-d Display'
/>
<CustomAction
Id="RollbackDisableSVGA"
Return="ignore"
Impersonate="no"
Execute="rollback"
BinaryKey="DisableDevHelper"
ExeCommand='-e Display'
/>
<CustomAction
Id="EnableSVGA"
Return="ignore"
Impersonate="no"
Execute="deferred"
BinaryKey="DisableDevHelper"
ExeCommand='-e Display'
/>
<CustomAction
Id='RunPrepareVolume'
Return='ignore'
Impersonate='no'
Execute='deferred'
FileKey='prepare_volume.exe'
ExeCommand='51728'
/>
<!--
Custom actions are run whether a component is selected for install or not, by default.
We need to add checks to each action in case this module is not being installed.
$component is future state, ?component is current state
2 is 'not installed', 3 is 'installed'
http://msdn.microsoft.com/en-us/library/aa368012(v=vs.85).aspx
-->
<InstallExecuteSequence>
<?ifdef env.CERT_PUBLIC_FILENAME?>
<Custom Action="InstallCertificates" Before='MsiProcessDrivers' />
<?endif ?>
<!-- Disable unneeded services. -->
<Custom Action='RunServicePolicy' After='InstallFiles'>$ServicePolicy=3 AND NOT Installed AND NOT REMOVE</Custom>
<!-- Require reboot after install/uninstall. -->
<ScheduleReboot Before="InstallFinalize" />
<!-- Notify dom0 that tools are uninstalled on uninstall/upgrade
(upgrade requires an intermediate reboot and the tools are not functioning yet then). -->
<Custom Action='UnadvertiseTools' Before='RemoveExistingProducts'>REMOVE="ALL" OR WIX_UPGRADE_DETECTED</Custom>
<!-- Perform custom uninstall cleanup, needed for pvdrivers because MSI can't revert system changes done by driver coinstallers (like inserting device stack filters). -->
<Custom Action="UninstallCleanup" After="InstallInitialize">REMOVE="ALL" OR WIX_UPGRADE_DETECTED</Custom>
<!-- Force reboot immediately after uninstalling previous version on upgrade,
it's normally suppressed until after the new version is installed.
Do not reboot if we're already running after reboot. -->
<ForceReboot After="UninstallCleanup">WIX_UPGRADE_DETECTED AND NOT AFTERREBOOT</ForceReboot>
<!-- Run power settings update if the feature is being installed. -->
<Custom Action='SetPowerSettings' Before='InstallFinalize'><![CDATA[&PowerSettings=3]]></Custom>
<Custom Action="SignQvideoDriver" Before="MsiProcessDrivers" />
<Custom Action="RegisterVideoDevice" After="InstallFiles">
?qvideo=2 AND $qvideo=3
</Custom>
<Custom Action="RollbackDisableSVGA" Before="DisableSVGA">
$qvideo=3
</Custom>
<Custom Action="DisableSVGA" Before="InstallFinalize">
?qvideo=2 AND $qvideo=3
</Custom>
<!-- enable it back on uninstall -->
<Custom Action="EnableSVGA" Before="InstallFinalize">
REMOVE="ALL" AND ?qvideo=3 AND $qvideo=2
</Custom>
<Custom Action='RunPrepareVolume' Before='InstallFinalize'>$PrepareVolume=3 AND NOT Installed AND NOT REMOVE</Custom>
</InstallExecuteSequence>
<Feature
Id='Complete'
AllowAdvertise='no'
Absent='disallow'
Display='expand'
Title='Qubes Windows Tools'
Description='Qubes Windows Tools'
ConfigurableDirectory='INSTALLDIR'
>
<Feature
Id='Common'
AllowAdvertise='no'
Absent='disallow'
Title='Shared components'
Description='Shared libraries for Qubes Windows Tools.'
>
<ComponentRef Id='QubesRegistry'/>
<ComponentRef Id='CreateLogDir'/>
<!-- windows-utils -->
<ComponentRef Id='WindowsUtilsDll'/>
<!-- core-vchan-xen -->
<ComponentRef Id='VchanDll'/>
</Feature>
<Feature
Id='XenPvDrivers'
AllowAdvertise='no'
Absent='allow'
Title='Xen PV Drivers'
Description='Paravirtualization drivers for Xen.'
>
<Feature
Id='XenBase'
AllowAdvertise='no'
Absent='disallow'
Title='Base Xen PV Drivers'
Description='Xen paravirtual bus and interface drivers.'
>
<!-- vmm-xen-windows-pvdrivers -->
<ComponentRef Id='XenbusDriver'/>
<ComponentRef Id='XenifaceDriver'/>
<ComponentRef Id='XenUserDlls'/>
</Feature>
<!-- 1 is default, 3 is typical, 1000 is full. -->
<Feature
Id='XenDisk'
AllowAdvertise='no'
Absent='allow'
Title='Xen PV Disk Drivers'
Description='Xen paravirtual disk drivers.'
Level='1001'
>
<!-- vmm-xen-windows-pvdrivers -->
<ComponentRef Id='XenvbdDriver'/>
</Feature>
<Feature
Id='XenNetwork'
AllowAdvertise='no'
Absent='allow'
Title='Xen PV Network Drivers'
Description='Xen paravirtual network class and device drivers.'
>
<!-- vmm-xen-windows-pvdrivers -->
<ComponentRef Id='XenvifDriver'/>
<ComponentRef Id='XennetDriver'/>
</Feature>
</Feature>
<Feature
Id='CoreAgent'
AllowAdvertise='no'
Absent='allow'
Title='Qubes Core Agent'
Description='Core services of Qubes Windows Tools. Contains Qubes RPC Agent and basic services like file copy, clipboard handling, etc.'
>
<!-- core-qubesdb -->
<ComponentRef Id='QubesDbDaemon'/>
<ComponentRef Id='QubesDbClient'/>
<!-- core-agent-windows -->
<ComponentRef Id='QrexecAgent'/>
<ComponentRef Id='QrexecClientVm'/>
<ComponentRef Id='QrexecWrapper'/>
<ComponentRef Id='AskVmAndRun'/>
<ComponentRef Id='NetworkSetup'/>
<ComponentRef Id='ServicePolicy'/>
<ComponentRef Id='AdvertiseTools'/>
<ComponentRef Id='QrexecServicesConfig'/>
<ComponentRef Id='QrexecServices'/>
</Feature>
<Feature
Id='MoveProfiles'
AllowAdvertise='no'
Absent='allow'
Title='Move user profiles'
Description='Moves user profiles directory (c:\Users) to the HVM&s private disk (private.img).'>
<!-- core-agent-windows move-profiles -->
<ComponentRef Id='PrepareVolume'/>
<ComponentRef Id='RelocateDir'/>
</Feature>
<Feature
Id='GuiAgentWindows'
AllowAdvertise='no'
Absent='allow'
Title='Qubes GUI Agent'
Description='Windows Agent for seamless GUI integration. This feature requires Windows 7 and testsigning enabled.'
>
<Condition Level="0">
<!-- Windows 8+ not supported yet -->
<![CDATA[(VersionNT >= 602) OR NOT (SYSTEMSTARTOPTIONS >< "TESTSIGNING")]]>
</Condition>
<?ifdef env.CERT_PUBLIC_FILENAME?>
<ComponentRef Id='Cert'/>
<?endif ?>
<!-- gui-agent-windows -->
<ComponentRef Id='GuiAgent'/>
<ComponentRef Id='QgaWatchdog'/>
<ComponentRef Id='qvideo'/>
</Feature>
<Feature
Id='GuiAgentWindowsUnavailable'
AllowAdvertise='no'
Absent='allow'
Title='(unavailable) Qubes GUI Agent'
Description='Windows Agent for seamless GUI integration. This feature requires Windows 7 and testsigning enabled.'
Level='0'
>
<Condition Level="1001">
<!-- Windows 8+ not supported yet -->
<![CDATA[(VersionNT >= 602) OR NOT (SYSTEMSTARTOPTIONS >< "TESTSIGNING")]]>
</Condition>
</Feature>
<Feature
Id='DisableUac'
AllowAdvertise='no'
Absent='allow'
Title='Disable UAC'
Description='Disable User Account Control.'
>
<ComponentRef Id='DisableUac'/>
</Feature>
<Feature
Id='PowerSettings'
AllowAdvertise='no'
Absent='allow'
Title='Update Windows power settings'
Description='Sets the active Windows power scheme to High Performance and disables automatic sleep/hibernation.'
>
<ComponentRef Id='PowerSettings'/>
</Feature>
</Feature>
</Product>
</Wix>