netdata.wxs.in 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
  3. xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util">
  4. <!-- xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui" -->
  5. <Package Name="Netdata Agent"
  6. Manufacturer="Netdata Inc."
  7. Version="@CMAKE_PROJECT_VERSION@"
  8. UpgradeCode="0d949b90-a54d-4aae-9616-e15fbc410530">
  9. <UIRef Id="WixUI_ErrorProgressText" />
  10. <MediaTemplate EmbedCab="yes"/>
  11. <WixVariable Id="WixUILicenseRtf" Value="cloud.rtf" />
  12. <MajorUpgrade Schedule="afterInstallInitialize" DowngradeErrorMessage="A newer version of [ProductName] is already installed." AllowSameVersionUpgrades="yes" />
  13. <Icon Id="NetdataIcon.ico" SourceFile="NetdataWhite.ico"/>
  14. <Property Id="ARPPRODUCTICON" Value="NetdataIcon.ico" />
  15. <Property Id="TOKEN" Value=" " />
  16. <Property Id="ROOMS" Value=" " />
  17. <Property Id="INSECURE" Value="0" />
  18. <Property Id="PROXY" Value=" " />
  19. <Property Id="URL" Value="https://app.netdata.cloud" />
  20. <Feature Id="Main">
  21. <ComponentGroupRef Id="NetdataComponents" />
  22. <ComponentRef Id="NetdataVarCache" />
  23. <ComponentRef Id="NetdataVarLib" />
  24. <ComponentGroupRef Id="WevtComponents" />
  25. <ComponentRef Id="NetdataService" />
  26. </Feature>
  27. </Package>
  28. <Fragment>
  29. <Property Id="MsiLogging" Value="voicewarmupx!"/>
  30. <StandardDirectory Id="ProgramFiles64Folder">
  31. <Directory Id="INSTALLFOLDER" Name="Netdata">
  32. <Directory Id="USRDIR" Name="usr">
  33. <Directory Id="USRBINDIR" Name="bin" />
  34. </Directory>
  35. <Directory Id="VARDIR" Name="var">
  36. <Directory Id="VARCACHEDIR" Name="cache" />
  37. <Directory Id="VARLIBDIR" Name="lib" />
  38. </Directory>
  39. </Directory>
  40. </StandardDirectory>
  41. <StandardDirectory Id="System64Folder">
  42. </StandardDirectory>
  43. <!-- All the files except for the ones we need to handle specially -->
  44. <ComponentGroup Id="NetdataComponents" Directory="INSTALLFOLDER">
  45. <Files Include="C:\msys64\opt\netdata\**">
  46. <Exclude Files="C:\msys64\opt\netdata\usr\bin\netdata.exe" />
  47. <Exclude Files="C:\msys64\opt\netdata\usr\bin\wevt_netdata_manifest.xml" />
  48. <Exclude Files="C:\msys64\opt\netdata\usr\bin\wevt_netdata.dll" />
  49. </Files>
  50. </ComponentGroup>
  51. <Component Id="NetdataVarCache" Directory="VARCACHEDIR" Guid="a41bc888-60d4-4d99-bb4f-da92614a8f72">
  52. <CreateFolder />
  53. </Component>
  54. <Component Id="NetdataVarLib" Directory="VARLIBDIR" Guid="c72d7ea8-c848-46c4-a983-589044f2eec9">
  55. <CreateFolder />
  56. </Component>
  57. <!-- Install wevt manifest/dll files -->
  58. <ComponentGroup Id="WevtComponents" Directory="System64Folder">
  59. <File Id="WevtDll" Name="wevt_netdata.dll" Source="C:\msys64\opt\netdata\usr\bin\wevt_netdata.dll">
  60. </File>
  61. <File Id="WevtManifest" Name="wevt_netdata_manifest.xml" Source="C:\msys64\opt\netdata\usr\bin\wevt_netdata_manifest.xml">
  62. </File>
  63. </ComponentGroup>
  64. <CustomAction Id="ClaimAgent" Directory="USRBINDIR" ExeCommand='[USRBINDIR]NetdataClaim.exe /T &quot;[TOKEN]&quot; /R &quot;[ROOMS]&quot; /U &quot;[URL]&quot; /I [INSECURE] /P &quot;[PROXY]&quot; /F &quot;[INSTALLFOLDER]etc\netdata\claim.conf&quot;' Execute="deferred" Return="ignore" Impersonate="no"/>
  65. <InstallExecuteSequence>
  66. <Custom Action="ClaimAgent" Before="InstallFinalize" />
  67. </InstallExecuteSequence>
  68. <CustomAction Id="WevtNetdataDLL" Directory="System64Folder" ExeCommand='[System64Folder]icacls.exe &quot;[System64Folder]wevt_netdata.dll&quot; /GRANT &quot;NT SERVICE\EventLog&quot;:R' Execute="deferred" Return="ignore" Impersonate="no"/>
  69. <InstallExecuteSequence>
  70. <Custom Action="WevtNetdataDLL" Before="InstallFinalize" />
  71. </InstallExecuteSequence>
  72. <CustomAction Id="WevtUtil" Directory="System64Folder" ExeCommand='[System64Folder]wevtutil.exe im &quot;[System64Folder]wevt_netdata_manifest.xml&quot; &quot;/mf:[System64Folder]wevt_netdata.dll&quot; &quot;/rf:[System64Folder]wevt_netdata.dll&quot;' Execute="deferred" Return="ignore" Impersonate="no"/>
  73. <InstallExecuteSequence>
  74. <Custom Action="WevtUtil" Before="InstallFinalize" />
  75. </InstallExecuteSequence>
  76. <Component Id="NetdataService" Directory="USRBINDIR">
  77. <File Id="netdata.exe" Source="C:\msys64\opt\netdata\usr\bin\netdata.exe" KeyPath="yes" />
  78. <ServiceInstall Id="InstallService"
  79. Name="Netdata"
  80. DisplayName="Netdata Agent"
  81. Description="Netdata is distributed, real-time, performance and health monitoring for systems and applications."
  82. Type="ownProcess"
  83. Start="auto"
  84. ErrorControl="normal" />
  85. <ServiceControl Id="ControlService"
  86. Start="install"
  87. Stop="both"
  88. Remove="uninstall"
  89. Name="Netdata"
  90. Wait="yes" />
  91. </Component>
  92. </Fragment>
  93. </Wix>