netdata.wxs.in 17 KB

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