Skip to content

Compiling from source

Muzhen Gaming edited this page Sep 18, 2023 · 3 revisions

PVengine is normally distributed in the form of source code: in particular, Python files.

However, many applications, most notably tournament play and usage in a GUI, require an exectuable file to be present, not a Python file.

Below are instructions on how to compile PVengine:

Method 1: cx_freeze (Faster binaries, recommended!)

This method produces fast executables that have very small startup time. In comparison, method 2's binary takes a few seconds to start up each time it's launched, making it unideal for analysis.

  1. Install cx_freeze: pip install cx_Freeze.
  2. Run the bash script src/engine/engine_build_fast.sh. If that doesn't work, you can also run:
cd src/engine
cxfreeze -c engine_main.py --target-dir=build --target-name=pvengine

Method 2: Pyinstaller

  1. Install pyinstaller: pip install pyinstaller
  2. Run the bash script src/engine/engine_build.sh. If that doesn't work, you can also run:
cd src/engine
pyinstaller engine_main.py --onefile -n pvengine

Clone this wiki locally