Compile and installation method updates
created setup, build and install scripts to make it easier and convenient to compile and install the application from source. no plans distribute pre-compiled binaries because it's just so much easier to guarantee the application will actually work in the target machine when compiled by the target machine.
This commit is contained in:
parent
2687b938a0
commit
64fe9fcad0
8
.gitignore
vendored
8
.gitignore
vendored
|
@ -55,5 +55,9 @@ compile_commands.json
|
||||||
# VSCode
|
# VSCode
|
||||||
/.vscode
|
/.vscode
|
||||||
|
|
||||||
# Build folder
|
# Build folders
|
||||||
/build
|
/.build-mow
|
||||||
|
/.build-opencv
|
||||||
|
|
||||||
|
# Opencv src folder
|
||||||
|
/src/opencv
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
cmake_minimum_required(VERSION 2.8)
|
cmake_minimum_required(VERSION 2.8.12)
|
||||||
project( MotionWatch )
|
project( MotionWatch )
|
||||||
find_package( OpenCV REQUIRED )
|
find_package( OpenCV REQUIRED )
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -pthread")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -pthread")
|
||||||
|
|
21
README.md
21
README.md
|
@ -90,17 +90,22 @@ vid_container = mp4
|
||||||
# installation.
|
# installation.
|
||||||
```
|
```
|
||||||
|
|
||||||
### Build Setup ###
|
### Setup/Build/Install ###
|
||||||
|
|
||||||
This application is currently only compatible with a Linux based operating
|
This application is currently only compatible with a Linux based operating
|
||||||
systems that are capable of building and installing the opencv API from source.
|
systems that are capable of building and installing the opencv API from source.
|
||||||
|
|
||||||
[opencv](https://docs.opencv.org/4.x/df/d65/tutorial_table_of_content_introduction.html).
|
The following 3 scripts make this convenient by downloading, compiling and then
|
||||||
|
installing the opencv API for you directly from opencv's git repository. This
|
||||||
|
also makes sure FFMPEG and all of it's dependencies are installed because this
|
||||||
|
application needs it to work properly.
|
||||||
|
|
||||||
|
note 1: be sure to run setup.sh and install.sh as root (or use sudo).
|
||||||
|
note 2: if building from scratch the following scripts will need to
|
||||||
|
be run in this order - setup.sh -> build.sh -> install.sh.
|
||||||
|
|
||||||
```
|
```
|
||||||
cd /path/to/Motion/Watch/source
|
sh ./setup.sh <--- only need to run this once if compiling for the first
|
||||||
mkdir ./build
|
sh ./build.sh time or if upgrading from the ground up.
|
||||||
cd ./build
|
sh ./install.sh
|
||||||
cmake ..
|
|
||||||
make
|
|
||||||
sudo cp ./mow /usr/bin/mow
|
|
||||||
```
|
```
|
||||||
|
|
7
build.sh
Normal file
7
build.sh
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
mkdir -p ./.build-mow
|
||||||
|
cd ./.build-mow
|
||||||
|
cmake ..
|
||||||
|
make -j4
|
||||||
|
|
3
install.sh
Normal file
3
install.sh
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
cp ./.build-mow/mow /usr/bin/mow
|
13
setup.sh
Normal file
13
setup.sh
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
apt update
|
||||||
|
apt install -y cmake g++ wget unzip git ffmpeg libavcodec-dev libavformat-dev libavutil-dev libswscale-dev
|
||||||
|
cd ./src
|
||||||
|
git clone https://github.com/opencv/opencv.git
|
||||||
|
cd ..
|
||||||
|
mkdir -p ./.build-opencv
|
||||||
|
cd ./.build-opencv
|
||||||
|
cmake ../src/opencv
|
||||||
|
make -j4
|
||||||
|
make install
|
||||||
|
|
Loading…
Reference in New Issue
Block a user