netdata.wxs.in 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  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. </Component>
  111. </Fragment>
  112. <Fragment>
  113. <UI Id="file FeatureTree_ViewLicense">
  114. <TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
  115. <TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" />
  116. <TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" />
  117. <Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
  118. <DialogRef Id="ErrorDlg" />
  119. <DialogRef Id="FatalError" />
  120. <DialogRef Id="FilesInUse" />
  121. <DialogRef Id="MsiRMFilesInUse" />
  122. <DialogRef Id="PrepareDlg" />
  123. <DialogRef Id="ProgressDlg" />
  124. <DialogRef Id="ResumeDlg" />
  125. <DialogRef Id="UserExit" />
  126. <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999" />
  127. <Publish Dialog="ExitDialog" Control="Finish" Event="DoAction" Value="LaunchApplication" Condition="WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed" />
  128. <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="ViewLicenseDlg1" Condition="NOT Installed" />
  129. <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Condition="Installed AND PATCH" />
  130. <Publish Dialog="ViewLicenseDlg1" Control="Back" Event="NewDialog" Value="WelcomeDlg" />
  131. <Publish Dialog="ViewLicenseDlg1" Control="Next" Event="NewDialog" Value="ViewLicenseDlg2" />
  132. <Publish Dialog="ViewLicenseDlg2" Control="Back" Event="NewDialog" Value="ViewLicenseDlg1" />
  133. <Publish Dialog="ViewLicenseDlg2" Control="Next" Event="NewDialog" Value="NDConfigDialog" />
  134. <!-- 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 -->
  135. <!-- Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="ViewLicenseDlg2" />
  136. <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="NDConfigDialog" Order="20" />
  137. <Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="10" />
  138. <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="10" />
  139. <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="20" / -->
  140. <Publish Dialog="NDConfigDialog" Control="Back" Event="NewDialog" Value="ViewLicenseDlg2" />
  141. <Publish Dialog="NDConfigDialog" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" />
  142. <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="NDConfigDialog" Order="1" Condition="NOT Installed OR WixUI_InstallMode = &quot;Change&quot;" />
  143. <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2" Condition="Installed AND NOT PATCH" />
  144. <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="3" Condition="Installed AND PATCH" />
  145. <Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg" />
  146. <Publish Dialog="MaintenanceTypeDlg" Control="ChangeButton" Event="NewDialog" Value="InstallDirDlg" />
  147. <Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg" />
  148. <Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg" />
  149. <Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg" />
  150. </UI>
  151. <UIRef Id="WixUI_Common" />
  152. </Fragment>
  153. <Fragment>
  154. <UI>
  155. <Dialog Id="ViewLicenseDlg1" Width="370" Height="270" Title="!(loc.LicenseAgreementDlg_Title)">
  156. <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.LicenseAgreementDlgBannerBitmap)" />
  157. <Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
  158. <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
  159. <Control Id="Description" Type="Text" X="25" Y="23" Width="340" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.LicenseAgreementDlgDescription)" />
  160. <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." />
  161. <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" />
  162. <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="I &amp;Accept">
  163. <Publish Event="SpawnWaitDialog" Value="WaitForCostingDlg" Condition="!(wix.WixUICostingPopupOptOut) OR CostingComplete = 1" />
  164. </Control>
  165. <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)">
  166. <Publish Event="SpawnDialog" Value="CancelDlg" />
  167. </Control>
  168. <Control Id="LicenseText" Type="ScrollableText" X="20" Y="60" Width="330" Height="158" Sunken="yes" TabSkip="no">
  169. <Text SourceFile="ncul1.rtf" />
  170. </Control>
  171. </Dialog>
  172. </UI>
  173. </Fragment>
  174. <Fragment>
  175. <UI>
  176. <Dialog Id="ViewLicenseDlg2" Width="370" Height="270" Title="!(loc.LicenseAgreementDlg_Title)">
  177. <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.LicenseAgreementDlgBannerBitmap)" />
  178. <Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
  179. <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
  180. <Control Id="Description" Type="Text" X="25" Y="23" Width="340" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.LicenseAgreementDlgDescription)" />
  181. <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." />
  182. <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" />
  183. <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="I &amp;Accept">
  184. <Publish Event="SpawnWaitDialog" Value="WaitForCostingDlg" Condition="!(wix.WixUICostingPopupOptOut) OR CostingComplete = 1" />
  185. </Control>
  186. <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)">
  187. <Publish Event="SpawnDialog" Value="CancelDlg" />
  188. </Control>
  189. <Control Id="LicenseText" Type="ScrollableText" X="20" Y="60" Width="330" Height="158" Sunken="yes" TabSkip="no">
  190. <Text SourceFile="gpl-3.0.rtf" />
  191. </Control>
  192. </Dialog>
  193. </UI>
  194. </Fragment>
  195. <Fragment>
  196. <UI>
  197. <Dialog Id="NDConfigDialog" Width="370" Height="270" Title="Netdata Cloud">
  198. <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.LicenseAgreementDlgBannerBitmap)" />
  199. <Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
  200. <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
  201. <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." />
  202. <Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="Connect to the Cloud" />
  203. <Control Id="WarningLabelOld" Type="Text" X="10" Y="60" Width="350" Height="15" Text="Agent already claimed? Click Next." />
  204. <Control Id="TokenLabel" Type="Text" X="10" Y="100" Width="55" Height="15" Text="Claim Token:" />
  205. <Control Id="Token" Type="Edit" X="65" Y="100" Width="290" Height="18" Property="TOKEN" Text="{135}" />
  206. <Control Id="RoomsLabel" Type="Text" X="10" Y="115" Width="55" Height="15" Text="Rooms ID(s):" />
  207. <Control Id="Rooms" Type="Edit" X="65" Y="115" Width="290" Height="18" Property="ROOMS" />
  208. <Control Id="ProxyLabel" Type="Text" X="10" Y="130" Width="55" Height="15" Text="Proxy URL:" />
  209. <Control Id="Proxy" Type="Edit" X="65" Y="130" Width="290" Height="18" Property="PROXY" />
  210. <Control Id="URLLabel" Type="Text" X="10" Y="145" Width="55" Height="15" Text="Cloud URL:" />
  211. <Control Id="URL" Type="Edit" X="65" Y="145" Width="290" Height="18" Property="URL" />
  212. <Control Id="InsecureCheckbox" Type="CheckBox" X="10" Y="160" Width="290" Height="15" Property="INSECURE" CheckBoxValue="0" Text="Insecure" />
  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="!(loc.WixUINext)" />
  215. <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)">
  216. <Publish Event="SpawnDialog" Value="CancelDlg" />
  217. </Control>
  218. </Dialog>
  219. </UI>
  220. </Fragment>
  221. </Wix>