Skip to content

Commit fccd1fc

Browse files
committed
build: Support AGENTMONITOR_NEWTICKET_URL option for Windows MSI Installer
1 parent 46266c8 commit fccd1fc

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

Diff for: Changes

+2
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ packaging:
100100
* Remove Deploy & Collect tasks from Typical installation on windows
101101
* On MacOSX, by default, only enable inventory task on MacOSX. You'll have now to
102102
explicitely enable required tasks in an "etc/conf.d" ".cfg" file.
103+
* Windows MSI installer now supports AGENTMONITOR_NEWTICKET_URL as option to configure
104+
GLPI-AgentMonitor new ticket url.
103105

104106
1.7.3 Wed, 03 Apr 2024
105107

Diff for: contrib/windows/glpi-agent-packaging.pl

+3
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,9 @@ sub _tree2xml {
586586
# Add registry entry dedicated to deployment vbs check
587587
$result .= $ident ." ". qq[ <RegistryValue Name="Version" Type="string" Value="$installversion" />\n];
588588
$result .= $ident ." ". qq[ </RegistryKey>\n];
589+
$result .= $ident ." ". qq[ <RegistryKey Root="HKLM" Key="$regpath\\Monitor">\n];
590+
$result .= $ident ." ". qq[ <RegistryValue Name="NewTicket-URL" Type="string" Value="[AGENTMONITOR_NEWTICKET_URL]" />\n];
591+
$result .= $ident ." ". qq[ </RegistryKey>\n];
589592
}
590593
$result .= $ident ." ". qq[</Component>\n];
591594
}

Diff for: contrib/windows/packaging/MSI_main-v2.wxs.tt

+9
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@
5757
<SetProperty Id="CMDLINE_AGENTMONITOR" Before="AppSearch" Value="[AGENTMONITOR]" />
5858
<SetProperty Id="AGENTMONITOR" After="AppSearch" Value="[CMDLINE_AGENTMONITOR]"><![CDATA[CMDLINE_AGENTMONITOR<>"" OR CMDLINE_CONFIG="reset"]]></SetProperty>
5959

60+
<Property Id="AGENTMONITOR_NEWTICKET_URL" Secure="yes">
61+
<RegistrySearch Id="NewTicket-URL" Root="HKLM" Key="[%agent_regpath%]\Monitor" Name="NewTicket-URL" Type="raw" />
62+
</Property>
63+
<SetProperty Id="CMDLINE_AGENTMONITOR_NEWTICKET_URL" Before="AppSearch" Value="[AGENTMONITOR_NEWTICKET_URL]" />
64+
<SetProperty Id="AGENTMONITOR_NEWTICKET_URL" After="AppSearch" Value="[CMDLINE_AGENTMONITOR_NEWTICKET_URL]"><![CDATA[CMDLINE_AGENTMONITOR_NEWTICKET_URL<>"" OR CMDLINE_CONFIG="reset"]]></SetProperty>
65+
6066
<Property Id="ADD_FIREWALL_EXCEPTION" Secure="yes">
6167
<RegistrySearch Id="AddFirewallException" Root="HKLM" Key="[%agent_regpath%]\Installer" Name="AddFirewallException" Type="raw" />
6268
</Property>
@@ -358,6 +364,9 @@
358364
<SetProperty Id="TASK_HOURLY_MODIFIER" Action="TASK_HOURLY_MODIFIER_Default" After="LaunchConditions" Value="1"><![CDATA[NOT TASK_HOURLY_MODIFIER]]></SetProperty>
359365
<SetProperty Id="TASK_DAILY_MODIFIER" Action="TASK_DAILY_MODIFIER_Default" After="LaunchConditions" Value="1"><![CDATA[NOT TASK_DAILY_MODIFIER]]></SetProperty>
360366

367+
<!-- Monitor configuration defaults -->
368+
<SetProperty Id="AGENTMONITOR_NEWTICKET_URL" Action="AGENTMONITOR_NEWTICKET_URL_Default" After="LaunchConditions" Value=""><![CDATA[NOT AGENTMONITOR_NEWTICKET_URL]]></SetProperty>
369+
361370
<!-- Fix properties handled as a checkbox, they must be undefined to uncheck the CB -->
362371
<SetProperty Id="QUICKINSTALL" Sequence="ui" Action="QUICKINSTALL_Unset" After="CostFinalize" Value=""><![CDATA[QUICKINSTALL<>"1"]]></SetProperty>
363372
<SetProperty Id="NO_HTTPD" Sequence="ui" Action="NO_HTTPD_Unset" After="CostFinalize" Value=""><![CDATA[NO_HTTPD<>"0"]]></SetProperty>

0 commit comments

Comments
 (0)