Skip to content

Commit

Permalink
Fixes for installation scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
costashatz committed Aug 28, 2024
1 parent 46d83cc commit 110305e
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 16 deletions.
9 changes: 5 additions & 4 deletions docs/quick_install/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1239,7 +1239,7 @@ <h3 id="ubuntu-2004">Ubuntu &gt;=20.04<a class="headerlink" href="#ubuntu-2004"
<div class="highlight"><pre><span></span><code><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nb">export</span><span class="w"> </span><span class="nv">PATH</span><span class="o">=</span>/opt/magnum/bin:<span class="nv">$PATH</span>
<a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a><span class="nb">export</span><span class="w"> </span><span class="nv">CMAKE_PREFIX_PATH</span><span class="o">=</span>/opt/robot_dart:/opt/magnum
<a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a><span class="nb">export</span><span class="w"> </span><span class="nv">LD_LIBRARY_PATH</span><span class="o">=</span>/opt/magnum/lib:/opt/robot_dart/lib:<span class="nv">$LD_LIBRARY_PATH</span>
<a id="__codelineno-0-4" name="__codelineno-0-4" href="#__codelineno-0-4"></a><span class="nb">export</span><span class="w"> </span><span class="nv">PYTHONPATH</span><span class="o">=</span>/opt/robot_dart/lib/python3.10/site-packages:<span class="nv">$PYTHONPATH</span>
<a id="__codelineno-0-4" name="__codelineno-0-4" href="#__codelineno-0-4"></a><span class="nb">export</span><span class="w"> </span><span class="nv">PYTHONPATH</span><span class="o">=</span>/opt/robot_dart/lib/python3.10/site-packages:/opt/magnum/lib/python3/site-packages:<span class="nv">$PYTHONPATH</span>
</code></pre></div>
<!-- ```bash
export PATH=/opt/magnum/bin:$PATH
Expand All @@ -1256,9 +1256,10 @@ <h3 id="osx">OSX<a class="headerlink" href="#osx" title="Permanent link">&para;<
</ul>
<p>This will install everything needed! Once the script is successfully executed, one should add the following to their <code>~/.bashrc</code> or <code>~/.zshrc</code> file (you may need to swap the python version to yours<sup id="fnref2:1"><a class="footnote-ref" href="#fn:1">1</a></sup>):</p>
<div class="highlight"><pre><span></span><code><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a><span class="nb">export</span><span class="w"> </span><span class="nv">PATH</span><span class="o">=</span>/opt/magnum/bin:<span class="nv">$PATH</span>
<a id="__codelineno-1-2" name="__codelineno-1-2" href="#__codelineno-1-2"></a><span class="nb">export</span><span class="w"> </span><span class="nv">CMAKE_PREFIX_PATH</span><span class="o">=</span>/opt/robot_dart:/opt/magnum
<a id="__codelineno-1-3" name="__codelineno-1-3" href="#__codelineno-1-3"></a><span class="nb">export</span><span class="w"> </span><span class="nv">LD_LIBRARY_PATH</span><span class="o">=</span>/opt/magnum/lib:/opt/robot_dart/lib:<span class="nv">$LD_LIBRARY_PATH</span>
<a id="__codelineno-1-4" name="__codelineno-1-4" href="#__codelineno-1-4"></a><span class="nb">export</span><span class="w"> </span><span class="nv">PYTHONPATH</span><span class="o">=</span>/opt/robot_dart/lib/python3.10/site-packages:<span class="nv">$PYTHONPATH</span>
<a id="__codelineno-1-2" name="__codelineno-1-2" href="#__codelineno-1-2"></a><span class="nb">export</span><span class="w"> </span><span class="nv">CMAKE_PREFIX_PATH</span><span class="o">=</span>/opt/robot_dart:/opt/dart:/opt/magnum
<a id="__codelineno-1-3" name="__codelineno-1-3" href="#__codelineno-1-3"></a><span class="nb">export</span><span class="w"> </span><span class="nv">LD_LIBRARY_PATH</span><span class="o">=</span>/opt/magnum/lib:/opt/dart/lib:/opt/robot_dart/lib:<span class="nv">$LD_LIBRARY_PATH</span>
<a id="__codelineno-1-4" name="__codelineno-1-4" href="#__codelineno-1-4"></a><span class="nb">export</span><span class="w"> </span><span class="nv">DYLD_LIBRARY_PATH</span><span class="o">=</span>/opt/magnum/lib:/opt/dart/lib:/opt/robot_dart/lib:<span class="nv">$DYLD_LIBRARY_PATH</span>
<a id="__codelineno-1-5" name="__codelineno-1-5" href="#__codelineno-1-5"></a><span class="nb">export</span><span class="w"> </span><span class="nv">PYTHONPATH</span><span class="o">=</span>/opt/dart:/opt/dart/lib/python3/dist-packages:/opt/robot_dart/lib/python3.12/site-packages:/opt/magnum/lib/python3/site-packages:<span class="nv">$PYTHONPATH</span>
</code></pre></div>
<div class="footnote">
<hr />
Expand Down
2 changes: 1 addition & 1 deletion docs/search/search_index.json

Large diffs are not rendered by default.

Binary file modified docs/sitemap.xml.gz
Binary file not shown.
8 changes: 5 additions & 3 deletions scripts/install_osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ sudo make install dartpy

export LD_LIBRARY_PATH=/opt/dart/lib:$LD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=/opt/dart/lib:$DYLD_LIBRARY_PATH
export PYTHONPATH=/opt/dart:$PYTHONPATH
export PYTHONPATH=/opt/dart:/opt/dart/lib/python3/dist-packages:$PYTHONPATH

if [ $CLEAN -ne 0 ]; then
rm -rf corrade
Expand Down Expand Up @@ -113,15 +113,17 @@ mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/magnum -DMAGNUM_WITH_PYTHON=ON ..
make -j
cd src/python
sudo python3 setup.py install
sudo python3 setup.py install --root=/opt/magnum/lib --install-purelib=python3/site-packages --install-platlib=python3/site-packages --install-scripts=python3/scripts --install-headers=python3/include --install-data=python3/data

cd ../../../../..
if [ $CLEAN -ne 0 ]; then
rm -rf temp_robot_dart
fi

export PYTHONPATH=/opt/magnum/lib/python3/site-packages:$PYTHONPATH

# RobotDART
python3 waf configure --prefix /opt/robot_dart --python --corrade_install_dir /opt/magnum --magnum_install_dir /opt/magnum --magnum_plugins_install_dir /opt/magnum --magnum_integration_install_dir /opt/magnum
python3 waf configure --prefix /opt/robot_dart --python --dart /opt/dart --magnum /opt/magnum
python3 waf -j8
python3 waf examples -j8
sudo python3 waf install
10 changes: 7 additions & 3 deletions scripts/install_ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ CLEAN=0

CLEAN=${1:-$CLEAN}

sudo apt install -y lsb-release

ub_version=$(cut -f2 <<< "$(lsb_release -r)")
ub_v_list=$(echo $ub_version | tr ";" "\n")
uv_v_major=$(echo $ub_v_list | awk '{print $1}')
uv_v_minor=$(echo $ub_v_list | awk '{print $2}')

sudo apt install -y software-properties-common
sudo apt install -y build-essential cmake pkg-config git
sudo apt install -y python3-numpy python-is-python3
sudo apt install -y python3-numpy python-is-python3 python3-setuptools

if [ $uv_v_major -lt 22 ]; then
sudo apt-add-repository -y ppa:dartsim/ppa
Expand Down Expand Up @@ -105,15 +107,17 @@ mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/magnum -DMAGNUM_WITH_PYTHON=ON ..
make -j
cd src/python
sudo python3 setup.py install
sudo python3 setup.py install --root=/opt/magnum/lib --install-purelib=python3/site-packages --install-platlib=python3/site-packages --install-scripts=python3/scripts --install-headers=python3/include --install-data=python3/data

cd ../../../../..
if [ $CLEAN -ne 0 ]; then
rm -rf temp_robot_dart
fi

export PYTHONPATH=/opt/magnum/lib/python3/site-packages:$PYTHONPATH

# RobotDART
./waf configure --prefix /opt/robot_dart --python --corrade_install_dir /opt/magnum --magnum_install_dir /opt/magnum --magnum_plugins_install_dir /opt/magnum --magnum_integration_install_dir /opt/magnum
./waf configure --prefix /opt/robot_dart --python --magnum /opt/magnum
./waf -j8
./waf examples -j8
sudo ./waf install
10 changes: 5 additions & 5 deletions src/docs/docs/quick_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ This will install everything needed! Once the script is successfully executed, o
export PATH=/opt/magnum/bin:$PATH
export CMAKE_PREFIX_PATH=/opt/robot_dart:/opt/magnum
export LD_LIBRARY_PATH=/opt/magnum/lib:/opt/robot_dart/lib:$LD_LIBRARY_PATH
export PYTHONPATH=/opt/robot_dart/lib/python3.10/site-packages:$PYTHONPATH
export PYTHONPATH=/opt/robot_dart/lib/python3.10/site-packages:/opt/magnum/lib/python3/site-packages:$PYTHONPATH
```

<!-- ```bash
Expand All @@ -52,10 +52,10 @@ This will install everything needed! Once the script is successfully executed, o

```bash
export PATH=/opt/magnum/bin:$PATH
export CMAKE_PREFIX_PATH=/opt/robot_dart:/opt/magnum
export LD_LIBRARY_PATH=/opt/magnum/lib:/opt/robot_dart/lib:$LD_LIBRARY_PATH
export PYTHONPATH=/opt/robot_dart/lib/python3.10/site-packages:$PYTHONPATH
export CMAKE_PREFIX_PATH=/opt/robot_dart:/opt/dart:/opt/magnum
export LD_LIBRARY_PATH=/opt/magnum/lib:/opt/dart/lib:/opt/robot_dart/lib:$LD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=/opt/magnum/lib:/opt/dart/lib:/opt/robot_dart/lib:$DYLD_LIBRARY_PATH
export PYTHONPATH=/opt/dart:/opt/dart/lib/python3/dist-packages:/opt/robot_dart/lib/python3.12/site-packages:/opt/magnum/lib/python3/site-packages:$PYTHONPATH
```


[^1]: You can run `python --version` to see your version. We only keep the major.minor (ignoring the patch version)

0 comments on commit 110305e

Please sign in to comment.