netdata.wxs.in 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  1. <!-- SPDX-License-Identifier: GPL-3.0-or-later -->
  2. <Wix
  3. xmlns="http://wixtoolset.org/schemas/v4/wxs"
  4. xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"
  5. xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui">
  6. <Package Name="Netdata Agent"
  7. Manufacturer="Netdata Inc."
  8. Version="@CMAKE_PROJECT_VERSION@"
  9. UpgradeCode="0d949b90-a54d-4aae-9616-e15fbc410530">
  10. <Media Id="1" Cabinet="netdata" EmbedCab="yes" />
  11. <MajorUpgrade Schedule="afterInstallInitialize" DowngradeErrorMessage="A newer version of [ProductName] is already installed." AllowSameVersionUpgrades="yes" />
  12. <Icon Id="NetdataIcon.ico" SourceFile="NetdataWhite.ico"/>
  13. <Property Id="ARPPRODUCTICON" Value="NetdataIcon.ico" />
  14. <Property Id="TOKEN" Secure="yes" />
  15. <Property Id="ROOMS" Secure="yes" />
  16. <Property Id="INSECURE" Secure="yes" />
  17. <Property Id="PROXY" Secure="yes" />
  18. <Property Id="URL" Value="https://app.netdata.cloud" />
  19. <Property Id="GPLLICENSE" Value="0" />
  20. <Property Id="CLOUDUILICENSE" Value="0" />
  21. <Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
  22. <Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Access Netdata dashboard" />
  23. <Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOX" Value="1" />
  24. <Property Id="WixShellExecTarget" Value="http://localhost:19999" />
  25. <CustomAction Id="LaunchApplication" DllEntry="WixShellExec" Impersonate="yes" BinaryRef="Wix4UtilCA_X86" />
  26. <Feature Id="Main">
  27. <ComponentGroupRef Id="NetdataComponents" />
  28. <ComponentRef Id="NetdataVarCache" />
  29. <ComponentRef Id="NetdataDevShm" />
  30. <ComponentRef Id="NetdataDevMqueue" />
  31. <ComponentRef Id="NetdataTmp" />
  32. <ComponentRef Id="NetdataHome" />
  33. <ComponentRef Id="NetdataRoot" />
  34. <ComponentRef Id="NetdataVarLib" />
  35. <ComponentGroupRef Id="WevtComponents" />
  36. <ComponentRef Id="NetdataService" />
  37. </Feature>
  38. <StandardDirectory Id="ProgramFiles64Folder">
  39. <Directory Id="INSTALLFOLDER" Name="Netdata">
  40. <Directory Id="USRDIR" Name="usr">
  41. <Directory Id="USRBINDIR" Name="bin" />
  42. </Directory>
  43. <Directory Id="VARDIR" Name="var">
  44. <Directory Id="VARCACHEDIR" Name="cache" />
  45. <Directory Id="VARLIBDIR" Name="lib" />
  46. </Directory>
  47. <Directory Id="ETCDIR" Name="etc">
  48. <Directory Id="ETCDIRNETDATA" Name="netdata" />
  49. </Directory>
  50. <Directory Id="DEVDIR" Name="dev">
  51. <Directory Id="DEVSHMDIR" Name="shm" />
  52. <Directory Id="DEVMQUEUEDIR" Name="mqueue" />
  53. </Directory>
  54. <Directory Id="TMPDIR" Name="tmp">
  55. </Directory>
  56. <Directory Id="HOMEDIR" Name="home">
  57. </Directory>
  58. <Directory Id="ROOTDIR" Name="root">
  59. </Directory>
  60. </Directory>
  61. </StandardDirectory>
  62. <UI Id="FeatureTree_ViewLicense_X64">
  63. </UI>
  64. <UIRef Id="FeatureTree_ViewLicense" />
  65. <WixVariable Id="WixUIBannerBmp" Value="Top.bmp" />
  66. <WixVariable Id="WixUIDialogBmp" Value="BackGround.bmp" />
  67. <UIRef Id="WixUI_ErrorProgressText" />
  68. <ui:WixUI Id="FeatureTree_ViewLicense" />
  69. </Package>
  70. <Fragment>
  71. <StandardDirectory Id="System64Folder">
  72. </StandardDirectory>
  73. <!-- All the files except for the ones we need to handle specially -->
  74. <ComponentGroup Id="NetdataComponents" Directory="INSTALLFOLDER">
  75. <Files Include="C:\msys64\opt\netdata\**">
  76. <Exclude Files="C:\msys64\opt\netdata\usr\bin\netdata.exe" />
  77. <Exclude Files="C:\msys64\opt\netdata\usr\bin\wevt_netdata_manifest.xml" />
  78. <Exclude Files="C:\msys64\opt\netdata\usr\bin\wevt_netdata.dll" />
  79. </Files>
  80. </ComponentGroup>
  81. <Component Id="NetdataVarCache" Directory="VARCACHEDIR" Guid="a41bc888-60d4-4d99-bb4f-da92614a8f72">
  82. <CreateFolder />
  83. </Component>
  84. <Component Id="NetdataVarLib" Directory="VARLIBDIR" Guid="c72d7ea8-c848-46c4-a983-589044f2eec9">
  85. <CreateFolder />
  86. </Component>
  87. <Component Id="NetdataDevShm" Directory="DEVSHMDIR" Guid="cbe39d53-a5c8-4375-9b25-e24df4d411be">
  88. <CreateFolder />
  89. </Component>
  90. <Component Id="NetdataDevMqueue" Directory="DEVMQUEUEDIR" Guid="f119d45f-b4d4-4918-bf05-89ee88be951a">
  91. <CreateFolder />
  92. </Component>
  93. <Component Id="NetdataTmp" Directory="TMPDIR" Guid="19247d2f-0f9d-4891-a3b0-ffc208d8d878">
  94. <CreateFolder />
  95. </Component>
  96. <Component Id="NetdataHome" Directory="HOMEDIR" Guid="13056229-7734-45ac-a982-572fa99f8e72">
  97. <CreateFolder />
  98. </Component>
  99. <Component Id="NetdataRoot" Directory="ROOTDIR" Guid="5f0b7def-c4e6-417a-a5ae-b6f9c4aff14e">
  100. <CreateFolder />
  101. </Component>
  102. <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"/>
  103. <InstallExecuteSequence>
  104. <Custom Action="ClaimAgent" After="InstallFiles" />
  105. </InstallExecuteSequence>
  106. <!-- Install wevt manifest/dll files -->
  107. <ComponentGroup Id="WevtComponents" Directory="System64Folder">
  108. <File Id="WevtDll" Name="wevt_netdata.dll" Source="C:\msys64\opt\netdata\usr\bin\wevt_netdata.dll">
  109. </File>
  110. <File Id="WevtManifest" Name="wevt_netdata_manifest.xml" Source="C:\msys64\opt\netdata\usr\bin\wevt_netdata_manifest.xml">
  111. </File>
  112. </ComponentGroup>
  113. <CustomAction Id="DllPermission" 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"/>
  114. <InstallExecuteSequence>
  115. <Custom Action="DllPermission" After="InstallFiles" />
  116. </InstallExecuteSequence>
  117. <CustomAction Id="InstallManifest" 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"/>
  118. <InstallExecuteSequence>
  119. <Custom Action="InstallManifest" After="InstallFiles" />
  120. </InstallExecuteSequence>
  121. <Component Id="NetdataService" Directory="USRBINDIR">
  122. <File Id="netdata.exe" Source="C:\msys64\opt\netdata\usr\bin\netdata.exe" KeyPath="yes" />
  123. <ServiceInstall Id="InstallService"
  124. Name="Netdata"
  125. DisplayName="Netdata Agent"
  126. Description="Distributed, real-time, performance and health monitoring for systems and applications."
  127. Type="ownProcess"
  128. Start="auto"
  129. ErrorControl="normal" />
  130. <ServiceControl Id="ControlService"
  131. Start="install"
  132. Stop="both"
  133. Remove="uninstall"
  134. Name="Netdata"
  135. Wait="yes" />
  136. <RegistryValue Root="HKLM"
  137. Key="System\CurrentControlSet\Services\Netdata"
  138. Name="DelayedAutoStart"
  139. Value="1"
  140. Type="integer" />
  141. </Component>
  142. </Fragment>
  143. <Fragment>
  144. <UI Id="file FeatureTree_ViewLicense">
  145. <TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
  146. <TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" />
  147. <TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" />
  148. <Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
  149. <DialogRef Id="ErrorDlg" />
  150. <DialogRef Id="FatalError" />
  151. <DialogRef Id="FilesInUse" />
  152. <DialogRef Id="MsiRMFilesInUse" />
  153. <DialogRef Id="PrepareDlg" />
  154. <DialogRef Id="ProgressDlg" />
  155. <DialogRef Id="ResumeDlg" />
  156. <DialogRef Id="UserExit" />
  157. <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999" />
  158. <Publish Dialog="ExitDialog" Control="Finish" Event="DoAction" Value="LaunchApplication" Condition="WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed" />
  159. <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="ViewLicenseDlg1" Condition="NOT Installed" />
  160. <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Condition="Installed AND PATCH" />
  161. <Publish Dialog="ViewLicenseDlg1" Control="Back" Event="NewDialog" Value="WelcomeDlg" />
  162. <Publish Dialog="ViewLicenseDlg1" Control="Next" Event="NewDialog" Value="ViewLicenseDlg2" />
  163. <Publish Dialog="ViewLicenseDlg2" Control="Back" Event="NewDialog" Value="ViewLicenseDlg1" />
  164. <Publish Dialog="ViewLicenseDlg2" Control="Next" Event="NewDialog" Value="NDConfigDialog" />
  165. <!-- We are hidden for while the directory to install netdata and forcing a default, because it is still necessary adjusts to test claim.conf in different directories -->
  166. <!-- Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="ViewLicenseDlg2" />
  167. <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="NDConfigDialog" Order="20" />
  168. <Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="10" />
  169. <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="10" />
  170. <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="20" / -->
  171. <Publish Dialog="NDConfigDialog" Control="Back" Event="NewDialog" Value="ViewLicenseDlg2" />
  172. <Publish Dialog="NDConfigDialog" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" />
  173. <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="NDConfigDialog" Order="1" Condition="NOT Installed OR WixUI_InstallMode = &quot;Change&quot;" />
  174. <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2" Condition="Installed AND NOT PATCH" />
  175. <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="3" Condition="Installed AND PATCH" />
  176. <Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg" />
  177. <Publish Dialog="MaintenanceTypeDlg" Control="ChangeButton" Event="NewDialog" Value="VerifyReadyDlg" />
  178. <Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg" />
  179. <Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg" />
  180. <Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg" />
  181. </UI>
  182. <UIRef Id="WixUI_Common" />
  183. </Fragment>
  184. <Fragment>
  185. <UI>
  186. <Dialog Id="ViewLicenseDlg1" Width="370" Height="270" Title="!(loc.LicenseAgreementDlg_Title)">
  187. <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.LicenseAgreementDlgBannerBitmap)" />
  188. <Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
  189. <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
  190. <Control Id="Description" Type="Text" X="25" Y="23" Width="340" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.LicenseAgreementDlgDescription)" />
  191. <Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="The Cloud UI License covers the Netdata User Interface." />
  192. <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" />
  193. <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="I &amp;Accept">
  194. <Publish Event="SpawnWaitDialog" Value="WaitForCostingDlg" Condition="!(wix.WixUICostingPopupOptOut) OR CostingComplete = 1" />
  195. </Control>
  196. <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)">
  197. <Publish Event="SpawnDialog" Value="CancelDlg" />
  198. </Control>
  199. <Control Id="LicenseText" Type="ScrollableText" X="20" Y="60" Width="330" Height="158" Sunken="yes" TabSkip="no">
  200. <Text SourceFile="ncul1.rtf" />
  201. </Control>
  202. </Dialog>
  203. </UI>
  204. </Fragment>
  205. <Fragment>
  206. <UI>
  207. <Dialog Id="ViewLicenseDlg2" Width="370" Height="270" Title="!(loc.LicenseAgreementDlg_Title)">
  208. <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.LicenseAgreementDlgBannerBitmap)" />
  209. <Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
  210. <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
  211. <Control Id="Description" Type="Text" X="25" Y="23" Width="340" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.LicenseAgreementDlgDescription)" />
  212. <Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="The GPL-3.0 License covers the Agent source code." />
  213. <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" />
  214. <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="I &amp;Accept">
  215. <Publish Event="SpawnWaitDialog" Value="WaitForCostingDlg" Condition="!(wix.WixUICostingPopupOptOut) OR CostingComplete = 1" />
  216. </Control>
  217. <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)">
  218. <Publish Event="SpawnDialog" Value="CancelDlg" />
  219. </Control>
  220. <Control Id="LicenseText" Type="ScrollableText" X="20" Y="60" Width="330" Height="158" Sunken="yes" TabSkip="no">
  221. <Text SourceFile="gpl-3.0.rtf" />
  222. </Control>
  223. </Dialog>
  224. </UI>
  225. </Fragment>
  226. <Fragment>
  227. <Property Id="OS_HAS_FILE">
  228. <!-- Our variables are not defined during startup so we have to use this -->
  229. <DirectorySearch Id="NetCoreDirectoryFoundx64" Path="C:\Program Files\Netdata\etc\netdata\">
  230. <FileSearch Name="claim.conf" />
  231. </DirectorySearch>
  232. </Property>
  233. <UI>
  234. <Dialog Id="NDConfigDialog" Width="370" Height="270" Title="Netdata Cloud">
  235. <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.LicenseAgreementDlgBannerBitmap)" />
  236. <Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
  237. <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
  238. <Control Id="Description" Type="Text" X="25" Y="23" Width="340" Height="15" Transparent="yes" NoPrefix="yes" Text="Enter your Space's Claim Token and the Room IDs where you want to add the Agent." />
  239. <Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="Connect to the Cloud" />
  240. <Control Id="WarningLabel" Type="Text" X="10" Y="60" Width="350" Height="15" Text="Agent already claimed! Click Next." HideCondition="NOT OS_HAS_FILE" />
  241. <Control Id="TokenLabel" Type="Text" X="10" Y="100" Width="55" Height="15" Text="Claim Token:" HideCondition="OS_HAS_FILE" />
  242. <Control Id="Token" Type="Edit" X="65" Y="100" Width="290" Height="18" Property="TOKEN" Text="{135}" HideCondition="OS_HAS_FILE" />
  243. <Control Id="RoomsLabel" Type="Text" X="10" Y="115" Width="55" Height="15" Text="Rooms ID(s):" HideCondition="OS_HAS_FILE" />
  244. <Control Id="Rooms" Type="Edit" X="65" Y="115" Width="290" Height="18" Property="ROOMS" HideCondition="OS_HAS_FILE" />
  245. <Control Id="ProxyLabel" Type="Text" X="10" Y="130" Width="55" Height="15" Text="Proxy URL:" HideCondition="OS_HAS_FILE" />
  246. <Control Id="Proxy" Type="Edit" X="65" Y="130" Width="290" Height="18" Property="PROXY" HideCondition="OS_HAS_FILE" />
  247. <Control Id="URLLabel" Type="Text" X="10" Y="145" Width="55" Height="15" Text="Cloud URL:" HideCondition="OS_HAS_FILE" />
  248. <Control Id="URL" Type="Edit" X="65" Y="145" Width="290" Height="18" Property="URL" HideCondition="OS_HAS_FILE" />
  249. <Control Id="InsecureCheckbox" Type="CheckBox" X="10" Y="160" Width="290" Height="15" Property="INSECURE" CheckBoxValue="0" Text="Insecure" HideCondition="OS_HAS_FILE" />
  250. <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" />
  251. <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)" />
  252. <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)">
  253. <Publish Event="SpawnDialog" Value="CancelDlg" />
  254. </Control>
  255. </Dialog>
  256. </UI>
  257. </Fragment>
  258. </Wix>