-
Notifications
You must be signed in to change notification settings - Fork 7
/
index.html
32 lines (29 loc) · 1.88 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<html><body>
<h1> Bodylight.js FMU Compiler</h1>
<p>this helper web app is to compile FMU to JS (with WebAssembly).</p>
<p>1.a (optionally) select compiler flags (default -O3 --closure 0)</p>
<form action="setflags.py" method="post" target="dummyframe">
<p>Please select optimization rate -Ox:</p>
<input type="radio" id="o0" name="optimization" value="-O0" />
<label for="o0">-O0 - no optimization (-O0 no optimization, stable and fast compilation)</label><br>
<input type="radio" id="o2" name="optimization" value="-O2" />
<label for="o2">-O2 - optimization level 2 reduces size,memory and improves speed</label><br>
<input type="radio" id="o3" name="optimization" value="-O3" checked="checked" />
<label for="o3">-O3 (default) - optimization level 3 reduces size,memory and improves speed, recommended for release build</label><br>
<br>
<p>Please select code closure level --closure x:</p>
<input type="radio" id="c0" name="closure" value="--closure 0" checked="checked" />
<label for="c0">--closure 0 (default), no closure</label><br>
<input type="radio" id="c1" name="closure" value="--closure 1" />
<label for="c1">--closure 1, reduces size of JS and WASM (5-10%) but limits optimization capabilities (flags -O2,-O3)</label><br>
<p>1.b if flags selected, press button: <input type="submit" value="Set compilation flags" />
</form>
<iframe name="dummyframe" id="dummyframe" height="30"></iframe>
<p>2. Upload FMU file with C sources from Dymola (or OpenModelica):</p>
<form enctype="multipart/form-data" action="save_file.py" method="post">
<p>File: <input type="file" name="file"></p>
<p><input type="submit" value="Compile FMU -> JS" accept="*.fmu"></p>
</form>
<p> After upload - you'll see progress - in case of success you can download ZIP from <a href="output"> /output</a> folder.</p>
<p> Use this ZIP to create web simulator.</p>
</body></html>