This folder contains scripts and other artifacts used to install the Olo Intercepts at a customer site. The build will copy these into the 
Artifacts zip that we distribute to the customer site. It contains files for two types of installations: BOH via a Manifest and manually on the FOH 
terminals. Installing with the Manifest is the preferred method of installation.

## Manifest

RAL is the application that completely manages configuration of an entire Aloha installation. When a terminal boots, it launches RAL which then 
takes whatever steps are necessary to configure the terminal to the expected state. RAL allows 3rd parties to hook into this process via Manifests.
These files tell RAL how to install and configure a 3rd party application on the terminals. 

We've created a Manifest that can be installed on a site's BOH server. After it's been enabled, RAL takes over responsibility for installing the
Olo Intercepts. We followed [this](https://drive.google.com/file/d/1TKf_NnLHrfhnsq69BgTsqgiqDGIY0mbC/view?usp=drive_link) guide to create the Manifest.
After creating the appropriate XML, you send it to NCR and they send you back an encrypted version. If we ever need to update the Manifest, please be
sure to commit both the encrypted and unencrypted version.

As of Agent version `23.12.22` the manifest and associated files are shipped with the agent.

At agent startup, if `DistributeInterceptDllsToFoh` (in the Aloha section) is set to `True`, the intercept files are copied from the POS Agent 
installation directory, to the Aloha BIN folder. Additionally, a registry entry is set for the manifest file. This tells RAL that a 3rd party
has a manifest file and it will be used. Our manifest file tells RAL to copy the intercept DLL (and associated license file) to each terminal
and to register the intercept DLL.

In the case where the manifest file cannot be used, there are manual steps to register the intercept DLL.

On each terminal:
1. Make sure the POS Agent (and Olo Agent) services are not running
   1. This does not apply to configurations where the terminal is separate from the Back of House
1. Make sure no `iber.exe` processes are running
1. From an elevated command prompt in the Aloha BIN directory:
   1. Run `Olo.AlohaIntercepts.Unregister.dll`
   1. Run `Olo.AlohaIntercepts.Register.dll`
      1. There will be a warning about code signing, which can be ignored
1. Restart the POS Agent/Olo services, if necessary
1. Restart the terminal, if in a separate terminal/BOH configuration 

More details can be found in the [Aloha Intercept Confluence doc](https://ololabs.atlassian.net/wiki/x/y4EGmQ)