Skip to content

Build windows installer

Philippe Bordron edited this page Jan 6, 2022 · 11 revisions

Original author: Floréal Cabanettes (@florealcab)

Prepare files

Download the win32 folder of the repository.

Add in data/dgenies/templates folder of the win32 folder all files contained in the src/dgenies/templates folder of the dgenies repository.

Add in data/dgenies/static folder of the win32 folder all files and folders contained in the src/dgenies/static folder of the dgenies repository.

Add in data/dgenies/md folder of the win32 folder all files and folders contained in the src/dgenies/md folder of the dgenies repository.

Copy the src/bin/dgenies script from the dgenies repository to the win32 folder and rename it dgeniesexe.py.

Install required packages

Start by installing dgenies:

pip install dgenies

Then, install pyinstaller, which will create the executable for windows:

pip install pyinstaller

You will also need Inno Setup to build setup file. We use the 5.9 version.

Run pyinstaller

Into the win32 folder, run the following command.

Command:

pyinstaller --icon=data/logo.ico --clean dgeniesrun.py

This will create a dist folder with inside a dgeniesrun folder. Other folders will be created, but you can delete them.

Run innosetup

Launch build of the build_setup.iss file with InnoSetup. It will create the EXE setup file inside the new Output folder.