MTGProxyPrinter

Creating stand-alone builds
Login

Creating stand-alone builds

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.

Windows 7 build

This version ships with a self-compiled build of the latest bugfix release of the Python 3.8 series. Stock, official Python 3.8.10 may not work until upgrading the included, old SQLite3 DLL to a newer version. The newer 3.8 Python versions are not published in compiled form by the Python foundation, so I compiled them myself. The installer for Python 3.8.19 that is used to build application versions 0.28.3 or later is available from here. It also contains the SQLite3 DLL in version 3.41.0, as obtained from https://sqlite.org/.

Windows 10+ build

This version is compiled from the port_PySide6 branch, and ships with the latest stable Qt6 UI library version and Python version at the time of the release. Building the installer requires a Windows 10 machine.

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.