additional scripts
Eduard Kalinowski
6 years ago
5 | 5 |
CMAKE_POLICY(SET CMP0015 OLD)
|
6 | 6 |
|
7 | 7 |
# if you use the version 5, please change it to 5
|
8 | |
SET(USE_QT_VERSION 5)
|
9 | |
|
10 | |
MESSAGE("Qt version for compiling: " ${USE_QT_VERSION})
|
11 | |
|
12 | |
IF(NOT ${USE_QT_VERSION} MATCHES "4" AND NOT ${USE_QT_VERSION} MATCHES "5")
|
13 | |
MESSAGE(FATAL_ERROR "-- Qt version must be set to 4 or 5!")
|
14 | |
ENDIF()
|
|
8 |
# SET(USE_QT_VERSION 5)
|
|
9 |
|
|
10 |
OPTION (USE_QT5 "Using of Qt5 version for compiling" ON)
|
|
11 |
|
|
12 |
IF(${USE_QT5})
|
|
13 |
SET(USE_QT_VERSION 5)
|
|
14 |
ELSE(${USE_QT5})
|
|
15 |
SET(USE_QT_VERSION 4)
|
|
16 |
ENDIF(${USE_QT5})
|
15 | 17 |
|
16 | 18 |
|
17 | 19 |
OPTION (USE_DEBUGGER "Include in binary file debug information" OFF)
|
18 | |
SET(USE_DEBUGGER false)
|
|
20 |
# SET(USE_DEBUGGER false)
|
19 | 21 |
|
20 | 22 |
#enable or disable profiling info
|
21 | 23 |
# SET(USE_PROFILER false)
|
|
0 |
#!/bin/bash
|
|
1 |
|
|
2 |
CPPCHCK=$(type -p astyle)
|
|
3 |
|
|
4 |
if [ ! -f "$CPPCHCK" ]; then
|
|
5 |
# not found exit
|
|
6 |
echo "please install astyle and restart this script"
|
|
7 |
exit 0
|
|
8 |
fi
|
|
9 |
|
|
10 |
set -e
|
|
11 |
|
|
12 |
export ARTISTIC_STYLE_OPTIONS="\
|
|
13 |
--mode=c \
|
|
14 |
--style=k&r \
|
|
15 |
--indent=spaces=4 \
|
|
16 |
--indent-classes \
|
|
17 |
--indent-switches \
|
|
18 |
--indent-col1-comments \
|
|
19 |
--indent-preprocessor \
|
|
20 |
--break-blocks \
|
|
21 |
--pad-oper \
|
|
22 |
--add-brackets \
|
|
23 |
--convert-tabs \
|
|
24 |
--formatted \
|
|
25 |
--lineend=linux"
|
|
26 |
|
|
27 |
astyle $ARTISTIC_STYLE_OPTIONS --suffix=none --recursive "sources/*.cpp" "sources/*.h";
|
7 | 7 |
exit 0
|
8 | 8 |
fi
|
9 | 9 |
|
10 | |
COUNT=$(cat /proc/cpuinfo | grep 'model name' | sed -e 's/.*: //' | wc -l)
|
|
10 |
COUNT=$(nproc --all)
|
11 | 11 |
echo "number of detected CPUs =" $COUNT
|
12 | 12 |
|
13 | 13 |
#cppcheck -j $COUNT --force --inline-suppr --enable=warning . 2>errors.txt
|
14 | |
cppcheck -j $COUNT --force --enable=style . 2>cppreport.txt⏎
|
|
14 |
cppcheck -j $COUNT --force --enable=style . 2>cppreport.txt
|
|
0 |
#!/bin/bash
|
|
1 |
|
|
2 |
CMD=$(type -p cmake)
|
|
3 |
|
|
4 |
if [ ! -x "$CMD" ]; then
|
|
5 |
# not found exit
|
|
6 |
echo "please install cmake and restart this script"
|
|
7 |
exit 1
|
|
8 |
fi
|
|
9 |
|
|
10 |
CMD=$(type -p dh)
|
|
11 |
|
|
12 |
if [ ! -x "$CMD" ]; then
|
|
13 |
# not found exit
|
|
14 |
echo "please install debhelper and restart this script"
|
|
15 |
exit 1
|
|
16 |
fi
|
|
17 |
|
|
18 |
|
|
19 |
CPU_NUM=$(nproc --all)
|
|
20 |
echo "cpu cores: $CPU_NUM"
|
|
21 |
|
|
22 |
DIRECTORY="build-deb"
|
|
23 |
|
|
24 |
if [ ! -d "$DIRECTORY" ]; then
|
|
25 |
# Control will enter here if $DIRECTORY exists.
|
|
26 |
mkdir "$DIRECTORY"
|
|
27 |
fi
|
|
28 |
|
|
29 |
# because of removing of all files in directory
|
|
30 |
if [ -d "$DIRECTORY" ]; then
|
|
31 |
cd "$DIRECTORY"
|
|
32 |
rm * -rf
|
|
33 |
cmake -DUSE_DEBUGGER=OFF ..
|
|
34 |
make -j$CPU_NUM
|
|
35 |
make package-binary-deb
|
|
36 |
cd ..
|
|
37 |
mv ./$DIRECTORY/httra*.deb .
|
|
38 |
fi
|
|
0 |
#!/bin/bash
|
|
1 |
|
|
2 |
CMD=$(type -p cmake)
|
|
3 |
|
|
4 |
if [ ! -x "$CMD" ]; then
|
|
5 |
# not found exit
|
|
6 |
echo "please install cmake and restart this script"
|
|
7 |
exit 1
|
|
8 |
fi
|
|
9 |
|
|
10 |
CPU_NUM=$(nproc --all)
|
|
11 |
echo "cpu cores: $CPU_NUM"
|
|
12 |
|
|
13 |
DIRECTORY="build"
|
|
14 |
|
|
15 |
if [ ! -d "$DIRECTORY" ]; then
|
|
16 |
# Control will enter here if $DIRECTORY exists.
|
|
17 |
mkdir "$DIRECTORY"
|
|
18 |
fi
|
|
19 |
|
|
20 |
# because of removing of all files in directory
|
|
21 |
if [ -d "$DIRECTORY" ]; then
|
|
22 |
cd "$DIRECTORY"
|
|
23 |
rm * -rf
|
|
24 |
# options: USE_PROFILER, USE_DEBUGGER, USE_QT5
|
|
25 |
cmake -DUSE_DEBUGGER=OFF -DUSE_PROFILER=OFF ..
|
|
26 |
make -j$CPU_NUM
|
|
27 |
cd ..
|
|
28 |
cp ./$DIRECTORY/httraqt .
|
|
29 |
fi
|
|
0 |
#!/bin/bash
|
|
1 |
|
|
2 |
CMD=$(type -p cmake)
|
|
3 |
|
|
4 |
if [ ! -x "$CMD" ]; then
|
|
5 |
# not found exit
|
|
6 |
echo "please install cmake and restart this script"
|
|
7 |
exit 1
|
|
8 |
fi
|
|
9 |
|
|
10 |
CMD=$(type -p rpmbuild)
|
|
11 |
|
|
12 |
if [ ! -x "$CMD" ]; then
|
|
13 |
# not found exit
|
|
14 |
echo "please install rpmbuild and restart this script"
|
|
15 |
exit 1
|
|
16 |
fi
|
|
17 |
|
|
18 |
|
|
19 |
CPU_NUM=$(nproc --all)
|
|
20 |
echo "cpu cores: $CPU_NUM"
|
|
21 |
|
|
22 |
DIRECTORY="build-rpm"
|
|
23 |
|
|
24 |
if [ ! -d "$DIRECTORY" ]; then
|
|
25 |
# Control will enter here if $DIRECTORY exists.
|
|
26 |
mkdir "$DIRECTORY"
|
|
27 |
fi
|
|
28 |
|
|
29 |
# because of removing of all files in directory
|
|
30 |
if [ -d "$DIRECTORY" ]; then
|
|
31 |
cd "$DIRECTORY"
|
|
32 |
rm * -rf
|
|
33 |
cmake -DUSE_DEBUGGER=OFF ..
|
|
34 |
make -j$CPU_NUM
|
|
35 |
make package-binary-rpm
|
|
36 |
cd ..
|
|
37 |
mv ./$DIRECTORY/httra*.rpm .
|
|
38 |
fi
|
|
39 |
|
0 | |
#!/bin/bash
|
1 | |
|
2 | |
CPPCHCK=`type -p astyle`
|
3 | |
|
4 | |
if [ ! -f "$CPPCHCK" ]; then
|
5 | |
# not found exit
|
6 | |
echo "please install astyle and restart this script"
|
7 | |
exit 0
|
8 | |
fi
|
9 | |
|
10 | |
set -e
|
11 | |
|
12 | |
export ARTISTIC_STYLE_OPTIONS="\
|
13 | |
--mode=c \
|
14 | |
--style=k&r \
|
15 | |
--indent=spaces=4 \
|
16 | |
--indent-classes \
|
17 | |
--indent-switches \
|
18 | |
--indent-col1-comments \
|
19 | |
--indent-preprocessor \
|
20 | |
--break-blocks \
|
21 | |
--pad-oper \
|
22 | |
--add-brackets \
|
23 | |
--align-reference=name \
|
24 | |
--convert-tabs \
|
25 | |
--formatted \
|
26 | |
--lineend=linux"
|
27 | |
|
28 | |
for i in $(find . -type f \( -name "*.cpp" -or -name "*.c" -or -name "*.h" \));
|
29 | |
do
|
30 | |
astyle $ARTISTIC_STYLE_OPTIONS "$i";
|
31 | |
done
|
32 | |
|
33 | |
for i in $(find . -type f \( -name "*.orig" -or -name "*~" \));
|
34 | |
do
|
35 | |
rm -if "$i";
|
36 | |
done
|
1 | 1 |
#define HTTVERSION_H
|
2 | 2 |
|
3 | 3 |
#define HTTQTVERSION "1.4.10"
|
4 | |
#define PROGRAM_DATE "01 Sep 2017"
|
|
4 |
#define PROGRAM_DATE "06 Sep 2017"
|
5 | 5 |
|
6 | |
#define USE_QT_VERSION 5
|
|
6 |
#define USE_QT_VERSION 4
|
7 | 7 |
|
8 | 8 |
#endif
|