# IWS5.Api Setup Project This directory contains the Inno Setup script for building a setup package for [IWS5.Api (FEMA)](https://github.com/Greenfield-Investments/iWS5/tree/main/IWS5.Api). It also includes a PowerShell script to configure IIS features and roles and a new IIS site for the deployed application ([IIS_Config.ps1](IIS_Config.ps1)), which relies on a deployment configuration template file to determine which IIS features and roles should be installed ([DeploymentConfigTemplate.xml](DeploymentConfigTemplate.xml)). ## Configuration Variables During installation using the compiled setup package for IWS5.Api, the user is prompted for values for the following configuration variables: 1. Active Directory connection string: server, port, subdomain, and domain. 2. Database connection string: server name, initial catalog, username, and password. 3. IIS site name and host name. The Active Directory and database connection strings are used to update the `appconfig.json` file (as well as `appconfig.QA.json` and `appconfig.Production.json` files) after installation has completed, and the IIS site and host names are passed to the PowerShell script to create the new IIS site. ## Dependencies The minimal set of IIS features and roles required to run IWS5.Api are defined in [DeploymentConfigTemplate.xml](DeploymentConfigTemplate.xml). When the setup process is complete, IIS will be configured and any features/roles which are not already installed on the target machine will be installed. This process can take a while, depending on the target machine. In addition to IIS, the following dependencies are required to host IWS5.Api: 1. The [ASP.NET Core 8.0 Runtime - Windows Hosting Bundle](https://builds.dotnet.microsoft.com/dotnet/aspnetcore/Runtime/8.0.21/dotnet-hosting-8.0.21-win.exe) must be installed for IIS to host ASP.NET Core APIs. This file should be located at `redist/dotnet-hosting-8.0.20-win.exe`. 2. The [Java SE Development Kit 25.0.1](https://download.oracle.com/java/25/latest/jdk-25_windows-x64_bin.exe) must be installed for work item signage functionality. This file should be located at `redist/jdk-25_windows-x64_bin.exe`. ## Additional Notes 1. When building the IWS5.Api setup package, the `PublishPath` pre-processor variable in the Inno Setup script ([IWS5.Api_Setup.iss](IWS5.Api_Setup.iss)) should be set to the publish directory created after publishing the application from Visual Studio. 2. When building the IWS5.Api setup package, the `MyAppVersion` pre-processor variable will be set by the output of the [Generate_Version.ps1](Generate_Version.ps1) PowerShell script, which reads the Git repository info in the `PublishPath` directory, combined with the compiled EXE's version string. 3. To ensure the JDK 25 package installed after iWS5 installation has completed works as intended, the following entry is added to the system PATH environment variable: `C:\Program Files\Java\jdk-25\bin`