Skip to content

Commit

Permalink
build: Support AGENTMONITOR_NEWTICKET_URL option for Windows MSI Inst…
Browse files Browse the repository at this point in the history
…aller
  • Loading branch information
g-bougard committed May 7, 2024
1 parent 46266c8 commit fccd1fc
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ packaging:
* Remove Deploy & Collect tasks from Typical installation on windows
* On MacOSX, by default, only enable inventory task on MacOSX. You'll have now to
explicitely enable required tasks in an "etc/conf.d" ".cfg" file.
* Windows MSI installer now supports AGENTMONITOR_NEWTICKET_URL as option to configure
GLPI-AgentMonitor new ticket url.

1.7.3 Wed, 03 Apr 2024

Expand Down
3 changes: 3 additions & 0 deletions contrib/windows/glpi-agent-packaging.pl
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,9 @@ sub _tree2xml {
# Add registry entry dedicated to deployment vbs check
$result .= $ident ." ". qq[ <RegistryValue Name="Version" Type="string" Value="$installversion" />\n];
$result .= $ident ." ". qq[ </RegistryKey>\n];
$result .= $ident ." ". qq[ <RegistryKey Root="HKLM" Key="$regpath\\Monitor">\n];
$result .= $ident ." ". qq[ <RegistryValue Name="NewTicket-URL" Type="string" Value="[AGENTMONITOR_NEWTICKET_URL]" />\n];
$result .= $ident ." ". qq[ </RegistryKey>\n];
}
$result .= $ident ." ". qq[</Component>\n];
}
Expand Down
9 changes: 9 additions & 0 deletions contrib/windows/packaging/MSI_main-v2.wxs.tt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@
<SetProperty Id="CMDLINE_AGENTMONITOR" Before="AppSearch" Value="[AGENTMONITOR]" />
<SetProperty Id="AGENTMONITOR" After="AppSearch" Value="[CMDLINE_AGENTMONITOR]"><![CDATA[CMDLINE_AGENTMONITOR<>"" OR CMDLINE_CONFIG="reset"]]></SetProperty>

<Property Id="AGENTMONITOR_NEWTICKET_URL" Secure="yes">
<RegistrySearch Id="NewTicket-URL" Root="HKLM" Key="[%agent_regpath%]\Monitor" Name="NewTicket-URL" Type="raw" />
</Property>
<SetProperty Id="CMDLINE_AGENTMONITOR_NEWTICKET_URL" Before="AppSearch" Value="[AGENTMONITOR_NEWTICKET_URL]" />
<SetProperty Id="AGENTMONITOR_NEWTICKET_URL" After="AppSearch" Value="[CMDLINE_AGENTMONITOR_NEWTICKET_URL]"><![CDATA[CMDLINE_AGENTMONITOR_NEWTICKET_URL<>"" OR CMDLINE_CONFIG="reset"]]></SetProperty>

<Property Id="ADD_FIREWALL_EXCEPTION" Secure="yes">
<RegistrySearch Id="AddFirewallException" Root="HKLM" Key="[%agent_regpath%]\Installer" Name="AddFirewallException" Type="raw" />
</Property>
Expand Down Expand Up @@ -358,6 +364,9 @@
<SetProperty Id="TASK_HOURLY_MODIFIER" Action="TASK_HOURLY_MODIFIER_Default" After="LaunchConditions" Value="1"><![CDATA[NOT TASK_HOURLY_MODIFIER]]></SetProperty>
<SetProperty Id="TASK_DAILY_MODIFIER" Action="TASK_DAILY_MODIFIER_Default" After="LaunchConditions" Value="1"><![CDATA[NOT TASK_DAILY_MODIFIER]]></SetProperty>

<!-- Monitor configuration defaults -->
<SetProperty Id="AGENTMONITOR_NEWTICKET_URL" Action="AGENTMONITOR_NEWTICKET_URL_Default" After="LaunchConditions" Value=""><![CDATA[NOT AGENTMONITOR_NEWTICKET_URL]]></SetProperty>

<!-- Fix properties handled as a checkbox, they must be undefined to uncheck the CB -->
<SetProperty Id="QUICKINSTALL" Sequence="ui" Action="QUICKINSTALL_Unset" After="CostFinalize" Value=""><![CDATA[QUICKINSTALL<>"1"]]></SetProperty>
<SetProperty Id="NO_HTTPD" Sequence="ui" Action="NO_HTTPD_Unset" After="CostFinalize" Value=""><![CDATA[NO_HTTPD<>"0"]]></SetProperty>
Expand Down

0 comments on commit fccd1fc

Please sign in to comment.