# IWS5.Importer.Worker Setup Project
This directory contains the Inno Setup script for building a setup package for [IWS5.Importer.Worker](https://github.com/Greenfield-Investments/iWS5/tree/develop/IWS5.Importer.Worker).

**Important note:** IWS5.Importer.Worker is for FEMA branches of the Process Director system *only*, and has been separated from the original [WorkItemImporter](https://github.com/Greenfield-Investments/WorkItemImporter) project. The IWS5.Importer.Worker setup package is not meant to be used with WorkItemImporter. The setup package script for the LPNU branch of WorkItemImporter is located at: https://github.com/Greenfield-Investments/setup-packages/tree/main/WorkItemImporter

## Configuration Variables
During installation using the compiled setup package for IWS5.Importer.Worker, the user is prompted for values for the following configuration variables:

1. Database connection string: server name, initial catalog, username, and password.

The database connection string is used to update the `appsettings.json` file after installation has completed.

## Dependencies
The following dependencies are required to run IWS5.Importer.Worker:

1. The [ASP.NET Core 8.0 Runtime](https://builds.dotnet.microsoft.com/dotnet/aspnetcore/Runtime/8.0.21/aspnetcore-runtime-8.0.21-win-x64.exe) must be installed. This file should be located at `redist/aspnetcore-runtime-8.0.21-win-x64.exe`.
2. The [.NET 8.0 Runtime](https://builds.dotnet.microsoft.com/dotnet/Runtime/8.0.21/dotnet-runtime-8.0.21-win-x64.exe) must be installed. This file should be located at `redist/dotnet-runtime-8.0.21-win-x64.exe`.

## Additional Notes
1. When building the IWS5.Importer.Worker setup package, the `PublishPath` pre-processor variable in the Inno Setup script ([IWS5.Importer.Worker_Setup.iss](IWS5.Importer.Worker_Setup.iss)) should be set to the publish directory created after publishing the application from Visual Studio.
2. When building the IWS5.Importer.Worker 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. The setup package for IWS5.Importer.Worker is compatible with x64-based systems only, to reduce the dependencies that must be redistributed.