Skip to content

Commit 1d30b6c

Browse files
committed
added scripts
1 parent 5258af4 commit 1d30b6c

File tree

5 files changed

+79
-40
lines changed

5 files changed

+79
-40
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,5 @@
3333

3434
.DS_Store
3535
build/
36-
doc/
36+
doc/
37+
/env

experiments/build_openframes.sh

Lines changed: 0 additions & 39 deletions
This file was deleted.

scripts/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Simple scripts to build OpenFrames.
2+
3+
### How to use
4+
5+
First, run `setup_env.sh` to clone OpenFrames and build the environment. This requires that `pixi` be installed.
6+
7+
Then run:
8+
9+
```
10+
pixi shell --manifest-path ./build/osgenv/pixi.toml
11+
12+
./build_openframes.sh
13+
```
14+
15+
### See also
16+
17+
* [pixi](https://pixi.sh/latest/) -- fast, modern, and reproducible package management tool for developers of all backgrounds.

scripts/build_openframes.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
3+
#
4+
# an experimental script to build OpenFrames
5+
#
6+
# first run setup_env.sh to set up the environment
7+
#
8+
# then:
9+
# pixi shell --manifest-path ./build/osgenv/pixi.toml
10+
# ./build_openframes.sh
11+
12+
set -e # exit on error
13+
14+
cd ./build
15+
16+
# configure:
17+
cmake -G Ninja \
18+
-D CMAKE_BUILD_TYPE=Release \
19+
-D OSG_DIR=./osgenv \
20+
-D OF_BUILD_DEMOS=ON \
21+
-D OF_PYTHON_MODULE=ON \
22+
-D SWIG_EXECUTABLE=./osgenv/.pixi/envs/default/bin/swig \
23+
../OpenFrames
24+
25+
# build:
26+
ninja
27+
ninja install

scripts/setup_env.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/bash
2+
3+
#
4+
# setup pixi env to build OpenFrames
5+
#
6+
7+
set -e # exit on error
8+
9+
# version numbers of dev tools:
10+
export PYTHON_VERSION=3.10
11+
export OSG_VERSION=3.6.5
12+
export CMAKE_VERSION=3.25
13+
export SWIG_VERSION=4.0
14+
export NUMPY_VERSION=1.24
15+
export PYSIDE_VERSION=6.9.1
16+
export NINJA_VERSION=1.11
17+
export OPENFRAMESREPO=https://github.com/ravidavi/OpenFrames.git
18+
19+
rm -rf ./OpenFrames
20+
rm -rf ./build
21+
22+
# get openframes:
23+
git clone $OPENFRAMESREPO
24+
25+
# set up directories:
26+
mkdir ./build
27+
cd ./build
28+
29+
# create the conda environment and activate it:
30+
mkdir ./osgenv
31+
cd ./osgenv
32+
pixi init .
33+
pixi add python=$PYTHON_VERSION openscenegraph=$OSG_VERSION cmake=$CMAKE_VERSION swig=$SWIG_VERSION numpy=$NUMPY_VERSION pyside6=$PYSIDE_VERSION ninja=$NINJA_VERSION

0 commit comments

Comments
 (0)