# react-iAdmin Setup Project This directory contains the Inno Setup script for building a setup package for [react-iAdmin](https://github.com/Greenfield-Investments/react-iAdmin). 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 react-iAdmin, the user is prompted for values for the following configuration variables: 1. Company name (for branding). 2. iWS5 API URL. 3. IIS site name and host name. The non-IIS configuration variables are used to update the `config.js` file 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 react-iAdmin 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 react-iAdmin: 1. The [IIS URL Rewrite 2.1 module](https://download.microsoft.com/download/1/2/8/128E2E22-C1B9-44A4-BE2A-5859ED1D4592/rewrite_amd64_en-US.msi) must be installed for IIS to host bundled single-page applications. This file should be located at `redist/rewrite_amd64_en-US.msi`. ## Additional Notes 1. When building the react-iAdmin setup package, the `PublishPath` pre-processor variable in the Inno Setup script ([RIA_Setup.iss](RIA_Setup.iss)) should be set to the `dist` directory created after building the application using [Vite](https://vite.dev/) (`npm run build`). 2. When building the react-iAdmin setup package, the `MyAppVersion` pre-processor variable will be set by the output of the [Extract_Version.ps1](Extract_Version.ps1) PowerShell script which reads the compiled application files for the version string.