|
| 1 | +<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> |
| 2 | + <Product |
| 3 | + Name="OpenTelemetry Collector ({{ .Version }}) - {{ .Binary }} distribution" |
| 4 | + Id="B250A214-D463-4E9B-8902-1DE5C19EA951" |
| 5 | + UpgradeCode="B7C263DD-95A5-436A-A025-DCA5200C2BE3" |
| 6 | + Version="{{ .Version }}" |
| 7 | + Manufacturer="OpenTelemetry" |
| 8 | + Language="1033"> |
| 9 | + |
| 10 | + <Package |
| 11 | + InstallerVersion="200" |
| 12 | + Compressed="yes" |
| 13 | + Comments="Windows Installer Package" |
| 14 | + InstallScope="perMachine"/> |
| 15 | + <Media Id="1" Cabinet="product.cab" EmbedCab="yes"/> |
| 16 | + <Icon Id="ProductIcon" SourceFile="opentelemetry.ico"/> |
| 17 | + <Property Id="ARPPRODUCTICON" Value="ProductIcon"/> |
| 18 | + <Property Id="ARPHELPLINK" Value="https://opentelemetry.io/"/> |
| 19 | + <Property Id="ARPURLINFOABOUT" Value="https://opentelemetry.io/"/> |
| 20 | + <Property Id="ARPNOREPAIR" Value="1"/> |
| 21 | + <Property Id="ARPNOMODIFY" Value="1"/> |
| 22 | + |
| 23 | + <MajorUpgrade |
| 24 | + DowngradeErrorMessage="A later version of OpenTelemetry Collector already installed. Setup will now exit."/> |
| 25 | + |
| 26 | + <Feature Id="Feature" Level="1"> |
| 27 | + <ComponentRef Id="ApplicationComponent"/> |
| 28 | + </Feature> |
| 29 | + |
| 30 | + <Property Id="COLLECTOR_SVC_ARGS"/> |
| 31 | + <CustomAction |
| 32 | + Id="SetCollectorSvcArgs" |
| 33 | + Property="COLLECTOR_SVC_ARGS" |
| 34 | + Value="--config "[INSTALLDIR]config.yaml""/> |
| 35 | + |
| 36 | + <InstallExecuteSequence> |
| 37 | + <Custom Action="SetCollectorSvcArgs" Before="InstallFiles">NOT COLLECTOR_SVC_ARGS</Custom> |
| 38 | + </InstallExecuteSequence> |
| 39 | + |
| 40 | + <Directory Id="TARGETDIR" Name="SourceDir"> |
| 41 | + <Directory Id="ProgramFiles64Folder"> |
| 42 | + <Directory Id="INSTALLDIR" Name="OpenTelemetry Collector"> |
| 43 | + <Component Id="ApplicationComponent" Guid="1207C3C4-1830-4DC8-8A7B-2BD7DBE45BC3"> |
| 44 | + <!-- Files to include --> |
| 45 | + <File |
| 46 | + Id="{{ .Binary }}.exe" |
| 47 | + Name="{{ .Binary }}.exe" |
| 48 | + Source="{{ .Binary }}.exe" |
| 49 | + KeyPath="yes"/> |
| 50 | + <File |
| 51 | + Id="config.yaml" |
| 52 | + Name="config.yaml" |
| 53 | + Source="config.yaml"/> |
| 54 | + |
| 55 | + <ServiceInstall |
| 56 | + Id="Sevice" |
| 57 | + Name="{{ .Binary }}" |
| 58 | + DisplayName="OpenTelemetry Collector" |
| 59 | + Description="Collects, processes, and exports telemetry from various configurable sources." |
| 60 | + Type="ownProcess" |
| 61 | + Vital="yes" |
| 62 | + Start="auto" |
| 63 | + Account="LocalSystem" |
| 64 | + ErrorControl="normal" |
| 65 | + Arguments="[COLLECTOR_SVC_ARGS]" |
| 66 | + Interactive="no"/> |
| 67 | + <ServiceControl |
| 68 | + Id="StartStopRemoveService" |
| 69 | + Name="{{ .Binary }}" |
| 70 | + Start="install" |
| 71 | + Stop="both" |
| 72 | + Remove="uninstall" |
| 73 | + Wait="yes"/> |
| 74 | + |
| 75 | + <RegistryKey |
| 76 | + Root="HKLM" |
| 77 | + Key="SYSTEM\CurrentControlSet\Services\EventLog\Application\{{ .Binary }}"> |
| 78 | + <RegistryValue |
| 79 | + Type="expandable" |
| 80 | + Name="EventMessageFile" |
| 81 | + Value="%SystemRoot%\System32\EventCreate.exe"/> |
| 82 | + </RegistryKey> |
| 83 | + </Component> |
| 84 | + </Directory> |
| 85 | + </Directory> |
| 86 | + </Directory> |
| 87 | + </Product> |
| 88 | +</Wix> |
0 commit comments