+ more documentation

This commit is contained in:
Johannes Theiner 2020-01-13 14:40:23 +01:00
parent 583f285d2c
commit c99d02d9c9
3 changed files with 49 additions and 40 deletions

View File

@ -1,14 +1,13 @@
# vKVM Scripts # vKVM Scripts
install & build all subprojects with one script install, build & run all subprojects with one script
## Prerequisites ## Prerequisites
- *nix operating system - *nix operating system
- package manager (either apt, pacman or homebrew) - package manager (either apt, pacman or homebrew)
- git - git
- a c++14 compatible compiler - (optional) ssh key added to your gitlab profile
- ssh key added to your gitlab profile
---- ----
@ -19,26 +18,46 @@ install & build all subprojects with one script
run this once in a empty directory. run this once in a empty directory.
as a user:
```sh ```sh
git clone ssh://git@gitlab.repo.digitech.hs-emden-leer.de:2222/link/projekte/ws19/vkvm-new/installation.git git clone https://gitlab.repo.digitech.hs-emden-leer.de/link/projekte/ws19/vkvm-new/installation.git
cd installation cd installation
install.sh install.sh
``` ```
or as a project developer (ssh key needed):
```sh
git clone ssh://git@gitlab.repo.digitech.hs-emden-leer.de:2222/link/projekte/ws19/vkvm-new/installation.git
cd installation
install.sh -dev
```
**update all subprojects** **update all subprojects**
```sh ```sh
update.sh update.sh
``` ```
**build all projects**
```sh
build.sh
```
**checkout development versions** **checkout development versions**
```sh ```sh
checkout-dev.sh checkout-dev.sh
``` ```
**build all projects** ## Troubleshooting
```sh please make shure that all of the following packages have been installed by your package manager:
build.sh - clang
``` - clang_tidy
- make
- cmake
- catch2
- fltk
- tmux

View File

@ -5,40 +5,45 @@ echo 'building all components'
cd .. cd ..
#building library first #building library first
mkdir library/build
cd library/build cd library/build
cmake .. -DCMAKE_BUILD_TYPE=Release cmake .. -DCMAKE_BUILD_TYPE=Release
make library make library
cd ../.. cd ../..
mkdir demo/build
cd demo/build cd demo/build
cmake .. -DCMAKE_BUILD_TYPE=Release cmake .. -DCMAKE_BUILD_TYPE=Release
make Demo make Demo
cd ../.. cd ../..
mkdir gui/build
cd gui/build cd gui/build
cmake .. -DCMAKE_BUILD_TYPE=Release cmake .. -DCMAKE_BUILD_TYPE=Release
make GUI make GUI
cd ../.. cd ../..
mkdir shared-memory/build
cd shared-memory/build cd shared-memory/build
cmake .. -DCMAKE_BUILD_TYPE=Release cmake .. -DCMAKE_BUILD_TYPE=Release
make SharedMemory make SharedMemory
cd ../.. cd ../..
mkdir simple-draw/build
cd simple-draw/build cd simple-draw/build
cmake .. -DCMAKE_BUILD_TYPE=Release cmake .. -DCMAKE_BUILD_TYPE=Release
make SimpleDraw make SimpleDraw
cd ../.. cd ../..
mkdir terminal/build
cd terminal/build cd terminal/build
cmake .. -DCMAKE_BUILD_TYPE=Release cmake .. -DCMAKE_BUILD_TYPE=Release
make Terminal make Terminal
cd ../.. cd ../..
mkdir text-renderer/build
cd text-renderer/build cd text-renderer/build
cmake .. -DCMAKE_BUILD_TYPE=Release cmake .. -DCMAKE_BUILD_TYPE=Release
make TextRenderer make TextRenderer
cd ../.. cd ../..

View File

@ -1,13 +1,13 @@
#!/usr/bin/env bash #!/usr/bin/env bash
development=false DEVELOPMENT=false
install_packages() { install_packages() {
if [[ -f /usr/bin/pacman ]]; then if [[ -f /usr/bin/pacman ]]; then
sudo pacman -S clang make cmake fltk catch2 sudo pacman -S clang make cmake fltk catch2 tmux
elif [[ -f /usr/bin/apt ]]; then elif [[ -f /etc/debian_version ]]; then
sudo apt install clang make cmake clang-tidy libfltk1.3 libfltk1.3-dev sudo apt install clang make cmake clang-tidy libfltk1.3 libfltk1.3-dev tmux
git clone https://github.com/catchorg/Catch2.git git clone https://github.com/catchorg/Catch2.git
cd Catch2 cd Catch2
@ -16,9 +16,9 @@ install_packages() {
cd .. cd ..
elif [[ -f /usr/local/Homebrew ]]; then elif [[ -f /usr/local/Homebrew ]]; then
sudo brew install clang make cmake fltk catch2 sudo brew install clang make cmake fltk catch2 tmux
#some systems have --with-toolchain some dont, so we need to do this #some systems have --with-toolchain some don't, so we need to do this
if ! sudo brew install llvm --with-toolchain; then if ! sudo brew install llvm --with-toolchain; then
sudo brew install llvm sudo brew install llvm
fi fi
@ -27,18 +27,12 @@ install_packages() {
fi fi
} }
while [ -n "$1" ]; do while getopts u:d:p:f: option
do
case "$1" in case "${option}"
in
-dev) development = true ;; dev) DEVELOPMENT=true;;
esac
*) echo "Option $1 not recognized" ;;
esac
shift
done done
install_packages install_packages
@ -68,18 +62,9 @@ else
fi fi
mkdir library/build
mkdir shared-memory/build
mkdir text-renderer/build
mkdir gui/build
mkdir terminal/build
mkdir simple-draw/build
mkdir demo/build
cd installation cd installation
echo "installation completed" echo "installation completed"
./build.sh
./build-release.sh