-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Describe installation under Linux and Windows (#518)
Signed-off-by: Maximilian Rosin <[email protected]>
- Loading branch information
Showing
6 changed files
with
188 additions
and
21 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
= Installing OSI for C++ on Linux | ||
|
||
**Prerequisites** | ||
|
||
* You have _cmake_ installed. | ||
* You have installed _protobuf_. | ||
* You must have super user privileges. | ||
**Steps** | ||
|
||
. Open a terminal. | ||
. Clone the Open Simulation repository. | ||
+ | ||
[source] | ||
---- | ||
git clone https://github.com/OpenSimulationInterface/open-simulation-interface.git | ||
---- | ||
+ | ||
. Change into the repository directory. | ||
+ | ||
[source] | ||
---- | ||
cd open-simulation-interface | ||
---- | ||
+ | ||
. Create a new directory for the build. | ||
+ | ||
[source] | ||
---- | ||
mkdir build | ||
---- | ||
+ | ||
. Change into the new directory. | ||
+ | ||
[source] | ||
---- | ||
cd build | ||
---- | ||
+ | ||
. Run cmake. | ||
To build a 32-bit target under 64-bit linux, add `-DCMAKE_CXX_FLAGS="-m32"` to the cmake command. | ||
In this case, protobuf must be in 32-bit mode too. | ||
+ | ||
[source] | ||
---- | ||
cmake .. | ||
---- | ||
+ | ||
. Run make. | ||
+ | ||
[source] | ||
---- | ||
make | ||
---- | ||
+ | ||
. Install Open Simulation Interface. | ||
+ | ||
[source] | ||
---- | ||
sudo make install | ||
---- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
= Installing OSI for Python on Linux | ||
|
||
**Prerequisites** | ||
|
||
* You have installed _pip3_. | ||
* You have installed _python-setuptools_. | ||
* You have installed _protobuf_. | ||
* For local installation, you have installed _virtualenv_. | ||
**Steps** | ||
|
||
. Open a terminal. | ||
. Clone the Open Simulation repository. | ||
+ | ||
[source] | ||
---- | ||
git clone https://github.com/OpenSimulationInterface/open-simulation-interface.git | ||
---- | ||
+ | ||
. Change into the repository directory. | ||
+ | ||
[source] | ||
---- | ||
cd open-simulation-interface | ||
---- | ||
+ | ||
. Create a new virtual environment. | ||
+ | ||
[source] | ||
---- | ||
virtualenv -p python3 venv | ||
---- | ||
+ | ||
. Activate the virtual environment. | ||
+ | ||
[source] | ||
---- | ||
source venv/bin/activate | ||
---- | ||
+ | ||
. Install Open Simulation Interface. | ||
Local installation:: `pip3 install .` | ||
Global installation:: `sudo pip3 install .` |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
= Installing OSI on Windows | ||
|
||
**Prerequisites** | ||
|
||
* You have installed _cmake_ as administrator. | ||
* You have installed _protobuf_ as administrator. | ||
**Steps** | ||
|
||
. Open a terminal as administrator. | ||
. Clone the Open Simulation repository. | ||
+ | ||
[source] | ||
---- | ||
git clone https://github.com/OpenSimulationInterface/open-simulation-interface.git | ||
---- | ||
+ | ||
. Change into the repository directory. | ||
+ | ||
[source] | ||
---- | ||
cd open-simulation-interface | ||
---- | ||
+ | ||
. Create a new directory for the build. | ||
+ | ||
[source] | ||
---- | ||
mkdir build | ||
---- | ||
+ | ||
. Change into the new directory. | ||
+ | ||
[source] | ||
---- | ||
cd build | ||
---- | ||
+ | ||
. Run cmake. | ||
To build a 64-bit target, add `Win64` to the generator name. | ||
In this case, protobuf and protoc.exe must be in 64-bit mode too. | ||
+ | ||
[source] | ||
---- | ||
cmake .. [-G <generator>] [-DCMAKE_INSTALL_PREFIX=<osi-install-directory>] | ||
---- | ||
+ | ||
. Build and install OSI. | ||
+ | ||
[source] | ||
---- | ||
cmake --build . [--config Release] | ||
cmake --build . --target install | ||
---- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
= Installing OSI for Python on Windows | ||
|
||
**Prerequisites** | ||
|
||
* You have installed _Python_ with administrator rights. | ||
* Make sure _Python_ is added to `PATH`. | ||
**Steps** | ||
|
||
. Open a terminal. | ||
. Clone the Open Simulation repository. | ||
+ | ||
[source] | ||
---- | ||
git clone https://github.com/OpenSimulationInterface/open-simulation-interface.git | ||
---- | ||
+ | ||
. Change into the repository directory. | ||
+ | ||
[source] | ||
---- | ||
cd open-simulation-interface | ||
---- | ||
+ | ||
. Run the setup script. | ||
+ | ||
[source] | ||
---- | ||
python setup.py install | ||
---- |