Improve Installer (Part II) (#18983)
thiagoftsm committed
Nov 12, 2024 at 21:23 UTC
abe9578701555a1b23e46330be75439bf90a870f
1 file changed
+40
-37
packaging/windows/netdata.wxs.in
+40
-37
@@ -25,6 +25,11 @@
25
26
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
27
28
+ <Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Access Netdata dashboard" />
29
+ <Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOX" Value="1" />
30
+ <Property Id="WixShellExecTarget" Value="http://localhost:19999" />
31
+ <CustomAction Id="LaunchApplication" DllEntry="WixShellExec" Impersonate="yes" BinaryRef="Wix4UtilCA_X86" />
32
+
33
<Feature Id="Main">
34
<ComponentGroupRef Id="NetdataComponents" />
35
<ComponentRef Id="NetdataVarCache" />
@@ -33,13 +38,6 @@
38
<ComponentRef Id="NetdataService" />
39
</Feature>
40
36
- <WixVariable Id="WixUIBannerBmp" Value="Top.bmp" />
37
- <WixVariable Id="WixUIDialogBmp" Value="BackGround.bmp" />
38
- <UIRef Id="WixUI_ErrorProgressText" />
39
- <ui:WixUI Id="FeatureTree_ViewLicense" />
40
- </Package>
41
-
42
- <Fragment>
41
<StandardDirectory Id="ProgramFiles64Folder">
42
<Directory Id="INSTALLFOLDER" Name="Netdata">
43
<Directory Id="USRDIR" Name="usr">
@@ -55,12 +53,23 @@
53
</Directory>
54
</StandardDirectory>
55
58
- <Property Id="ETCNETDATACLAIMFILE">
59
- <DirectorySearch Id="NetCoreDirectoryFoundx64" Path="[ETCDIRNETDATA]" >
56
+ <!-- Property Id="OS_HAS_FILE" Secure="yes">
57
+ <DirectorySearch Id="NetCoreDirectoryFoundx64" Path="[ETCDIRNETDATA]" AssignToProperty="yes" >
58
<FileSearch Id="NetdataClaim" Name="claim.conf"/>
59
</DirectorySearch>
62
- </Property>
60
+ </Property -->
61
+
62
+ <UI Id="FeatureTree_ViewLicense_X64">
63
+ </UI>
64
+ <UIRef Id="FeatureTree_ViewLicense" />
65
+
66
+ <WixVariable Id="WixUIBannerBmp" Value="Top.bmp" />
67
+ <WixVariable Id="WixUIDialogBmp" Value="BackGround.bmp" />
68
+ <UIRef Id="WixUI_ErrorProgressText" />
69
+ <ui:WixUI Id="FeatureTree_ViewLicense" />
70
+ </Package>
71
72
+ <Fragment>
73
<StandardDirectory Id="System64Folder">
74
</StandardDirectory>
75
@@ -115,15 +124,6 @@
124
</Component>
125
</Fragment>
126
118
- <Fragment>
119
- <UI Id="FeatureTree_ViewLicense_X64">
120
- <Publish Dialog="ViewLicenseDlg1" Control="Print" Event="DoAction" Value="WixUIPrintEula_X64" />
121
- <Publish Dialog="ViewLicenseDlg2" Control="Print" Event="DoAction" Value="WixUIPrintEula_X64" />
122
- </UI>
123
-
124
- <UIRef Id="FeatureTree_ViewLicense" />
125
- </Fragment>
126
-
127
<Fragment>
128
<UI Id="file FeatureTree_ViewLicense">
129
<TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
@@ -142,6 +142,7 @@
142
<DialogRef Id="UserExit" />
143
144
<Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999" />
145
+ <Publish Dialog="ExitDialog" Control="Finish" Event="DoAction" Value="LaunchApplication" Condition="WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed" />
146
147
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="ViewLicenseDlg1" Condition="NOT Installed" />
148
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Condition="Installed AND PATCH" />
@@ -150,20 +151,20 @@
151
<Publish Dialog="ViewLicenseDlg1" Control="Next" Event="NewDialog" Value="ViewLicenseDlg2" />
152
153
<Publish Dialog="ViewLicenseDlg2" Control="Back" Event="NewDialog" Value="ViewLicenseDlg1" />
153
- <Publish Dialog="ViewLicenseDlg2" Control="Next" Event="NewDialog" Value="NDConfigDialog" Condition="NOT ETCNETDATACLAIMFILE" />
154
- <Publish Dialog="ViewLicenseDlg2" Control="Next" Event="NewDialog" Value="NDConfigDialog" Condition="ETCNETDATACLAIMFILE" />
154
+ <Publish Dialog="ViewLicenseDlg2" Control="Next" Event="NewDialog" Value="NDConfigDialog" />
155
156
- <Publish Dialog="NDConfigDialog" Control="Back" Event="NewDialog" Value="ViewLicenseDlg2" />
157
- <Publish Dialog="NDConfigDialog" Control="Next" Event="NewDialog" Value="InstallDirDlg" />
156
+ <!-- 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 -->
157
159
- <Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="NDConfigDialog" />
160
- <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="20" />
158
+ <!-- Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="ViewLicenseDlg2" />
159
+ <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="NDConfigDialog" Order="20" />
160
<Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="10" />
161
<Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="10" />
163
- <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="20" />
162
+ <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="20" / -->
163
164
+ <Publish Dialog="NDConfigDialog" Control="Back" Event="NewDialog" Value="ViewLicenseDlg2" />
165
+ <Publish Dialog="NDConfigDialog" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Condition="((TOKEN = "") AND (ROOMS = "")) OR ((NOT (TOKEN = "")) AND (NOT (ROOMS = "")))" />
166
166
- <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg" Order="1" Condition="NOT Installed OR WixUI_InstallMode = "Change"" />
167
+ <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="NDConfigDialog" Order="1" Condition="NOT Installed OR WixUI_InstallMode = "Change"" />
168
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2" Condition="Installed AND NOT PATCH" />
169
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="3" Condition="Installed AND PATCH" />
170
<Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg" />
@@ -171,6 +172,7 @@
172
<Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg" />
173
<Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg" />
174
<Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg" />
175
+
176
</UI>
177
178
<UIRef Id="WixUI_Common" />
@@ -230,21 +232,21 @@
232
<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." />
233
<Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="Connect to the Cloud" />
234
233
- <Control Id="WarningLabel" Type="Text" X="10" Y="60" Width="290" Height="15" Text="Agent already claimed? Click Next." />
235
+ <Control Id="WarningLabelOld" Type="Text" X="10" Y="60" Width="350" Height="15" Text="Agent already claimed? Click Next." />
236
235
- <Control Id="TokenLabel" Type="Text" X="10" Y="90" Width="55" Height="15" Text="Claim Token:" />
236
- <Control Id="Token" Type="Edit" X="65" Y="90" Width="290" Height="18" Property="TOKEN" />
237
+ <Control Id="TokenLabel" Type="Text" X="10" Y="100" Width="55" Height="15" Text="Claim Token:" />
238
+ <Control Id="Token" Type="Edit" X="65" Y="100" Width="290" Height="18" Property="TOKEN" Text="{135}" />
239
238
- <Control Id="RoomsLabel" Type="Text" X="10" Y="105" Width="55" Height="15" Text="Rooms ID(s):" />
239
- <Control Id="Rooms" Type="Edit" X="65" Y="105" Width="290" Height="18" Property="ROOMS" />
240
+ <Control Id="RoomsLabel" Type="Text" X="10" Y="115" Width="55" Height="15" Text="Rooms ID(s):" />
241
+ <Control Id="Rooms" Type="Edit" X="65" Y="115" Width="290" Height="18" Property="ROOMS" />
242
241
- <Control Id="ProxyLabel" Type="Text" X="10" Y="120" Width="55" Height="15" Text="Proxy URL:" />
242
- <Control Id="Proxy" Type="Edit" X="65" Y="120" Width="290" Height="18" Property="PROXY" />
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
244
- <Control Id="URLLabel" Type="Text" X="10" Y="135" Width="55" Height="15" Text="Cloud URL:" />
245
- <Control Id="URL" Type="Edit" X="65" Y="135" Width="290" Height="18" Property="URL" />
246
+ <Control Id="URLLabel" Type="Text" X="10" Y="145" Width="55" Height="15" Text="Cloud URL:" />
247
+ <Control Id="URL" Type="Edit" X="65" Y="145" Width="290" Height="18" Property="URL" />
248
247
- <Control Id="InsecureCheckbox" Type="CheckBox" X="10" Y="150" Width="290" Height="15" Property="INSECURE" CheckBoxValue="0" Text="Insecure" />
249
+ <Control Id="InsecureCheckbox" Type="CheckBox" X="10" Y="160" Width="290" Height="15" Property="INSECURE" CheckBoxValue="0" Text="Insecure" />
250
251
<Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" />
252
<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)" />
@@ -255,3 +257,4 @@
257
</UI>
258
</Fragment>
259
</Wix>
260
+