# IWS5.Server Setup Project This directory contains the Inno Setup script for building a setup package for [IWS5.Server](https://github.com/Greenfield-Investments/iWS5/tree/develop/IWS5.Server). **Important note:** IWS5.Server is for FEMA branches of the Process Director system *only*, and has been separated from the original [PDServer](https://github.com/Greenfield-Investments/PDServer) project. The IWS5.Server setup package cannot be used with PDServer. The setup package script for the LPNU branch of PDServer is located at: https://github.com/Greenfield-Investments/setup-packages/tree/main/PDServer ## Configuration Variables During installation using the compiled setup package for IWS5.Server, the user is prompted for values for the following configuration variables: 1. Database connection string: server name, initial catalog, username, and password. 2. Process Agent host name. The database connection string and Process Agent host name are used to update the `appsettings.json` file after installation has completed. ## Dependencies The following dependencies are required to run IWS5.Server: 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.Server setup package, the `PublishPath` pre-processor variable in the Inno Setup script ([IWS5.Server_Setup.iss](IWS5.Server_Setup.iss)) should be set to the publish directory created after publishing the application from Visual Studio. 2. When building the IWS5.Server 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. By default, the IWS5.Server setup package will require a successful database connection to proceed with installation. This behavior can be bypassed if the setup package is run from the command line with the flag: `/BypassDatabaseConnection=true` 4. If a successful database connection is made during IWS5.Server installation, the installer will attempt to write a record to the `ATServer` database table with the Process Agent host name chosen by the user. 5. The setup package for IWS5.Server is compatible with x64-based systems only, to reduce the dependencies that must be redistributed.