Generating a Disk Image for MacOS

If the more general python installer script does not work for some reason, the disk image can be generated by directly running the shell script. To directly run the shell script, follow the steps listed below.

Prerequisites

  • macOS 10.15 or later

  • Virtual environment with all dependencies (from requirements.txt) installed and activated

Step 1 - Install PyInstaller

The PyInstaller package is used to generate to build the application and is therefore not included in the requirements.txt file, as it is not a requirement of the application itself. Thus, manually install PyInstaller in the virtual environment:

pip install pyinstaller

Step 2 - Install create-dmg

The create-dmg script is used to create a disk image (.dmg file) for macOS. Install the script using your favorite package manager/install script, Homebrew is recommended:

brew install create-dmg

Step 3 - Generate the Disk Image w/ the Application

Navigate to the root directory of the project and activate the virtual environment. Once the virtual environment is activated, run the following command to change file permissions for the shell script (this only has to be done once):

chmod +x installer/mac-installer.sh

Next, run the shell script to generate the disk image:

installer/mac-installer.sh

The disk image will be generated in the dist directory of the project’s root directory.