Skip to content

Create a distribution for Windows

Torsten Sommer edited this page Apr 16, 2021 · 2 revisions

Create a self-contained distribution for Windows

Follow the steps below to create a Conda environment with FMPy that can be distributed as a ZIP archive.

Create a Conda Environment

Download and install Miniconda.

Install FMPy

Open the Anaconda Prompt from the Start menu.

Option 1 For a basic installation (2.05 GB) with the FMPy CLI, Jupyter, and the Python library run

conda install -c conda-forge fmpy-base

Option 2 For a full installation (3.72 GB) with the FMPy GUI, Web App, and Matplotlib run

conda install -c conda-forge fmpy

Make the paths in qt.conf relative (full installation only)

[Paths] 
Prefix = Library
Binaries = Library/bin
Libraries = Library/lib
Headers = Library/include/qt
TargetSpec = win32-msvc
HostSpec = win32-msvc

Create the Distribution

Create a ZIP archive of the Miniconda3 installation directory.

Deploy the Distribution

To install the distribution on another machine simply copy and extract the ZIP archive.

To activate the Conda environment run

<install_dir>\condabin\conda.bat activate

where <install-dir> is the path where you extracted the archive.

Now you can...

: Create a Jupyter Notebook
jupyter notebook

: Compile a platform binary from source
fmpy compile Rectifier.fmu

: Start the FMPy GUI
python -m fmpy.gui

: Start the Web App
python -m fmpy.webapp C:\Users\tsr2\Documents\Dymola\Adder.fmu

TIP Create a desktop shortcut for the FMPy GUI by selecting Tools > Create Desktop Shortcut.