Skip to content

Commit 555b668

Browse files
authored
Add build instructions [skip ci]
1 parent 7ff1527 commit 555b668

File tree

1 file changed

+44
-2
lines changed

1 file changed

+44
-2
lines changed

README.md

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ A Modelica library to import [Functional Mock-up Units](https://fmi-standard.org
1212

1313
## Installation
1414

15-
Install the `modelica-fmi` command with [uv](https://docs.astral.sh/uv/getting-started/installation/):
15+
To import FMUs install the `modelica-fmi` and `modelica-fmi-gui` commands with [uv](https://docs.astral.sh/uv/getting-started/installation/):
1616

1717
```bash
1818
uv tool install --reinstall https://github.com/modelica/Modelica-FMI/releases/download/v0.0.6/modelica_fmi-0.0.6-py3-none-any.whl
@@ -24,7 +24,7 @@ Or, with `pip`:
2424
pip install https://github.com/modelica/Modelica-FMI/releases/download/v0.0.6/modelica_fmi-0.0.6-py3-none-any.whl
2525
```
2626

27-
Then download the [Modelica-FMI](https://github.com/modelica/Modelica-FMI/releases/download/v0.0.6/Modelica-FMI-0.0.6.zip) package and load it in your Modelica tool.
27+
To simulate imported FMUs download the [Modelica-FMI](https://github.com/modelica/Modelica-FMI/releases/download/v0.0.6/Modelica-FMI-0.0.6.zip) package and load it in your Modelica tool.
2828

2929
## Usage
3030

@@ -46,6 +46,48 @@ In Dymola you can open the import dialog by opening the `FMI` package and select
4646

4747
After the import you have to reload the package.
4848

49+
## Building the binaries from source
50+
51+
To build the binaries in `FMI/Resources/Library` from source install CMake
52+
53+
```
54+
uv tool install cmake
55+
```
56+
57+
clone the repository, and run
58+
59+
```
60+
cmake -S runtime -B runtime/build
61+
```
62+
63+
```
64+
cmake --build runtime/build --config release --target install
65+
```
66+
67+
## Building distributable import commands
68+
69+
To build distributable version of the `modelica-fmi` and `modelica-fmi-gui` commands
70+
71+
- create a new virtual environment
72+
```
73+
uv venv
74+
```
75+
76+
- install PyInstaller and modelica_fmi
77+
```
78+
uv pip install pyinstaller https://github.com/modelica/Modelica-FMI/releases/download/v0.0.6/modelica_fmi-0.0.6-py3-none-any.whl
79+
```
80+
81+
- build modelica-fmi-gui
82+
```
83+
uv run pyinstaller --windowed --name modelica-fmi-gui --collect-data modelica_fmi .venv/Lib/site-packages/modelica_fmi/gui/__main__.py
84+
```
85+
86+
- ...or modelica-fmi
87+
```
88+
uv run pyinstaller --name modelica-fmi --collect-data modelica_fmi .venv/Lib/site-packages/modelica_fmi/__main__.py
89+
```
90+
4991
## License
5092

5193
Copyright © 2025 Modelica Association.

0 commit comments

Comments
 (0)