MTGProxyPrinter

Creating stand-alone builds
Login

This page contains information about creating a standalone build of MTGProxyPrinter, i.e. one that does not rely on the presence of a system-wide Python 3 interpreter. This procedure is used to provide the installable versions for Windows in the Downloads section.

Generating a standalone executable for Linux or Windows

MTGProxyPrinter uses cx_Freeze to create application bundles that can be run on desktop operating systems without having to install Python. For Windows, the bundle is provided as an installable MSI package.

To use cx_Freeze and create a standalone executable, follow these steps:

  1. Obtain a Python 3 installation on the operating system you intend to build for. Windows 7 users have to use Python 3.8. Otherwise use the latest stable Python 3 version for your Operating System. Make sure the Python executable is in your PATH. i.e. a Python interpreter starts when you type python3 in your terminal/command prompt (use exit() to close the interpreter if you test this).
  2. Download a Source archive from the Downloads page or an automatically generated source archive of any check-in in the Timeline. Please note that only tagged releases are verified to produce working builds. Please also note that it is not possible to build the standalone executable from a prebuilt Python Wheel file (.whl).
  3. Extract the source archive somewhere and navigate into the directory.
  4. Alongside the source code are build scripts for creating a bundle. Run the appropriate build script for your platform: build_MTGProxyPrinter_packages.sh for Linux and build_MTGProxyPrinter_packages.bat for Windows.
    A portable bundle will be created in the build directory. On Windows, the MSI installer package will be created in the dist directory. This step requires a working internet connection, as it will create a new Python virtual environment, then download and install all dependencies from PyPI into the freshly created environment, including cx_Freeze, and then builds the application. This step can take several minutes, especially on slow hard drives.

Note on old versions

Support for cx_Freeze was added in version 0.11.0. Older versions used PyInstaller for the same task, so source archives of older releases ship with scripts to bundle using PyInstaller. These legacy build scripts are included in old revisions as-is and are unsupported. In case you try this, please note that PyInstaller is known to produce false positives in various antivirus programs, so your antivirus solution may immediately quarantine the built application.