Building Prism Validator on Windows
This guide explains how to build the Prism Validator Windows application from source.
Prerequisites
Python 3.8 or higher installed on your system
Download from: https://www.python.org/downloads/
Make sure to check “Add Python to PATH” during installation
Git (if cloning the repository)
Download from: https://git-scm.com/download/win
Quick Start
Option 1: Using PowerShell (Recommended)
Open PowerShell in the project directory and run:
.\build_windows.ps1
Option 2: Using Command Prompt
Open Command Prompt in the project directory and run:
build_windows.bat
Option 3: Manual Build
If the automated scripts don’t work, follow these steps:
Create virtual environment:
python -m venv .venv
Activate virtual environment:
.venv\Scripts\activate.bat
Install dependencies:
python -m pip install --upgrade pip pip install -r requirements.txt pip install -r requirements-build.txt
Create survey_library folder (optional but recommended):
mkdir survey_libraryBuild the application:
python scripts\build\build_app.py
Output
After a successful build, you’ll find the application in:
dist\PrismValidator\PrismValidator.exe
You can:
Run it directly:
dist\PrismValidator\PrismValidator.exeDouble-click
PrismValidator.exein Windows ExplorerCopy the entire
dist\PrismValidator\folder to another location
Troubleshooting
“Python not found”
Make sure Python is installed and added to your PATH
Try using
pyinstead ofpython:py -3 -m venv .venv
“Failed to create virtual environment”
Make sure you have write permissions in the project directory
Try running PowerShell or Command Prompt as Administrator
“PyInstaller build fails”
Make sure all dependencies are installed:
pip install -r requirements-build.txtCheck if antivirus software is blocking PyInstaller
Try running with
--debugflag:python scripts\\build\\build_app.py --debug
Missing icon
The build script will automatically use the PNG logo from
static/img/MRI_Lab_Logo.pngIf the file is missing, the build will continue without an icon
survey_library warnings
The
survey_libraryfolder is optionalIf you see a warning, the build will continue normally
The folder is only needed if you use the survey management features
Building for Distribution
The built application in dist\PrismValidator\ includes:
PrismValidator.exe- Main executable_internal\- Required libraries and data filesAll templates, static files, and schemas
To distribute:
Compress the entire
dist\PrismValidator\folder to a ZIP fileShare the ZIP file with end users
Users can extract and run
PrismValidator.exewithout installing Python
Platform-Specific Notes
The Windows build uses a folder-based distribution (
--onedir)All dependencies are packaged in the
_internalfolderThe application runs without a console window (
--windowed)Icon support requires a PNG or ICO file (automatically handled)
Next Steps
After building:
Test the application:
cd dist\PrismValidator && .\PrismValidator.exeThe web interface will start on
http://localhost:5001Check the logs if the application doesn’t start