netdata.wxs.in 18 KB

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