-
Notifications
You must be signed in to change notification settings - Fork 0
/
checkbuildlinux.sh
204 lines (176 loc) · 4.67 KB
/
checkbuildlinux.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
# Script to build Scintilla and SciTE for Linux with most supported build files.
# Both gcc and clang are used for both GTK+ 2 and 3 and the clang static analyzer
# run for GTK+2.
# All three Qt libraries are built with gcc.
# Current directory should be scite\scripts before running.
# Pre-requisite packages on Ubuntu:
# sudo apt-get install --yes g++
# sudo apt-get install --yes libgtk-3-dev
# sudo apt-get install --yes libgtk2.0-dev
# sudo apt-get install --yes clang
# sudo apt-get install --yes qtcreator
# sudo apt-get install --yes python-dev
# sudo apt-get install --yes libshiboken-dev
# sudo apt-get install --yes shiboken
# sudo apt-get install --yes libpyside-dev
# sudo apt-get install --yes python-pyside
# sudo apt-get install --yes cppcheck
# Pre-requisite packages on Fedora:
# sudo yum install -y gcc-c++
# sudo yum install -y gtk3-devel
# sudo yum install -y gtk2-devel
# sudo yum install -y clang
# sudo yum install -y qt-creator
# sudo yum install -y python-devel
# sudo yum install -y shiboken-devel
# sudo yum install -y python-pyside-devel
# On Fedora 17, qmake is called qmake-qt4 so sepbuild.py should probe for correct name.
# There are also problems with clang failing in the g++ 4.7 headers.
# Turn off glib deprecation warnings since gtk headers use deprecated items
NO_GLIB_DEPRECATIONS="CXXFLAGS=-D GLIB_DISABLE_DEPRECATION_WARNINGS"
# Run commands in parallel up to number of processors
JOBS="--jobs=$(getconf _NPROCESSORS_ONLN)"
cd ../..
# ************************************************************
# Target 1: gcc build for GTK+ 2
(
cd scintilla/test/unit || exit
make clean
make "$JOBS" test
make clean
)
(
cd lexilla/src || exit
make clean
make "$JOBS"
)
(
cd lexilla/test || exit
make clean
make test
make clean
)
(
cd lexilla/test/unit || exit
make clean
make test
make clean
)
(
cd scintilla/gtk || exit
make clean
make "$JOBS" "$NO_GLIB_DEPRECATIONS" GTK2=1
)
(
cd scite/gtk || exit
make clean
make "$JOBS" "$NO_GLIB_DEPRECATIONS" GTK2=1
)
# ************************************************************
# Target 2: gcc build for GTK+ 3
(
cd scintilla/gtk || exit
make clean
make "$JOBS" "$NO_GLIB_DEPRECATIONS" GTK3=1
)
(
cd scite/gtk || exit
make clean
make "$JOBS" GTK3=1
)
# ************************************************************
# Target 3: Qt builds
# Requires Qt development libraries and qmake to be installed
# Find best available qmake
QMAKENAME=""
if hash qmake-qt5 2>/dev/null; then
QMAKENAME="qmake-qt5"
elif hash qmake 2>/dev/null; then
QMAKENAME="qmake -qt=5"
elif hash qmake-qt4 2>/dev/null; then
QMAKENAME="qmake-qt4"
fi
(
cd scintilla/qt || exit
(
cd ScintillaEditBase || exit
$QMAKENAME
make clean
make "$JOBS"
make distclean
)
(
cd ScintillaEdit || exit
python3 WidgetGen.py
$QMAKENAME
make clean
make "$JOBS"
make distclean
)
(
cd ScintillaEditPy || exit
python2 sepbuild.py
cd ../../test || exit
python2 simpleTests.py
python2 lexTests.py
python2 performanceTests.py
cd ../qt/ScintillaEditPy || exit
python2 sepbuild.py --clean
)
)
# ************************************************************
# Target 4: clang build for GTK+ 2
(
cd lexilla/src || exit
make clean
make "$JOBS" CLANG=1 GTK2=1
)
(
cd scintilla/gtk || exit
make clean
make "$JOBS" "$NO_GLIB_DEPRECATIONS" CLANG=1 GTK2=1
)
(
cd scite/gtk || exit
make clean
make "$JOBS" "$NO_GLIB_DEPRECATIONS" CLANG=1 GTK2=1
)
# ************************************************************
# Target 5: clang build for GTK+ 3
(
cd scintilla/gtk || exit
make clean
make "$JOBS" "$NO_GLIB_DEPRECATIONS" CLANG=1 GTK3=1
)
(
cd scite/gtk || exit
make clean
make "$JOBS" CLANG=1 GTK3=1
)
# ************************************************************
# Target 6: clang analyze for GTK+ 2
(
cd lexilla/src || exit
make clean
make "$JOBS" CLANG=1 analyze
)
(
cd scintilla/gtk || exit
make clean
make "$JOBS" "$NO_GLIB_DEPRECATIONS" analyze
)
(
cd scite/gtk || exit
make clean
make "$JOBS" "$NO_GLIB_DEPRECATIONS" analyze
make clean
cd ../..
cd scintilla/gtk || exit
make clean
)
# ************************************************************
# Target 7: cppcheck static checker
# Disabled as there are false warnings and some different style choices
cppcheck --enable=all --max-configs=120 --suppressions-list=lexilla/cppcheck.suppress -I lexilla/include -I lexilla/lexlib --template=gcc --quiet lexilla
cppcheck --enable=all --max-configs=100 --suppressions-list=scintilla/cppcheck.suppress -I scintilla/src -I scintilla/include -I scintilla/qt/ScintillaEditBase "-DSTDMETHODIMP_(type) type STDMETHODCALLTYPE" --template=gcc --quiet scintilla
cppcheck --enable=all --max-configs=100 --suppressions-list=scite/cppcheck.suppress -I scite/src -I scintilla/include -I scite/lua/src -Ulua_assert -DPATH_MAX=260 --template=gcc --quiet scite