forked from skiselkov/BetterPushbackC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_release
executable file
·198 lines (191 loc) · 6.58 KB
/
build_release
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
#!/bin/bash
# CDDL HEADER START
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#
# CDDL HEADER END
# Copyright 2017 Saso Kiselkov. All rights reserved.
DIST_FILES=(
'COPYING' ''
'data/msgs/en/connected.wav' ''
'data/msgs/en/disco.wav' ''
'data/msgs/en/done_left.wav' ''
'data/msgs/en/done_right.wav' ''
'data/msgs/en/driving_up.wav' ''
'data/msgs/en/op_complete.wav' ''
'data/msgs/en/plan_end.wav' ''
'data/msgs/en/plan_start.wav' ''
'data/msgs/en/ready2conn.wav' ''
'data/msgs/en/start_pb.wav' ''
'data/msgs/en/start_tow.wav' ''
'data/msgs/en/connected.wav' ''
'data/msgs/en/disco.wav' ''
'data/msgs/en/driving_up.wav' ''
'data/msgs/en/op_complete.wav' ''
'data/msgs/en/plan_end.wav' ''
'data/msgs/en/plan_start.wav' ''
'data/msgs/en/ready2conn.wav' ''
'data/msgs/en/start_pb.wav' ''
'data/msgs/en/start_tow.wav' ''
'data/msgs/en/winch.wav' ''
'data/msgs/de/connected.wav' ''
'data/msgs/de/disco.wav' ''
'data/msgs/de/done_left.wav' ''
'data/msgs/de/done_right.wav' ''
'data/msgs/de/driving_up.wav' ''
'data/msgs/de/op_complete.wav' ''
'data/msgs/de/plan_end.wav' ''
'data/msgs/de/plan_start.wav' ''
'data/msgs/de/ready2conn.wav' ''
'data/msgs/de/start_pb.wav' ''
'data/msgs/de/start_tow.wav' ''
'data/msgs/de/connected.wav' ''
'data/msgs/de/disco.wav' ''
'data/msgs/de/driving_up.wav' ''
'data/msgs/de/op_complete.wav' ''
'data/msgs/de/plan_end.wav' ''
'data/msgs/de/plan_start.wav' ''
'data/msgs/de/ready2conn.wav' ''
'data/msgs/de/start_pb.wav' ''
'data/msgs/de/start_tow.wav' ''
'data/msgs/de/winch.wav' ''
'data/msgs/ru/connected.wav' ''
'data/msgs/ru/disco.wav' ''
'data/msgs/ru/done_left.wav' ''
'data/msgs/ru/done_right.wav' ''
'data/msgs/ru/driving_up.wav' ''
'data/msgs/ru/op_complete.wav' ''
'data/msgs/ru/plan_end.wav' ''
'data/msgs/ru/plan_start.wav' ''
'data/msgs/ru/ready2conn.wav' ''
'data/msgs/ru/start_pb.wav' ''
'data/msgs/ru/start_tow.wav' ''
'data/msgs/ru/connected.wav' ''
'data/msgs/ru/disco.wav' ''
'data/msgs/ru/driving_up.wav' ''
'data/msgs/ru/op_complete.wav' ''
'data/msgs/ru/plan_end.wav' ''
'data/msgs/ru/plan_start.wav' ''
'data/msgs/ru/ready2conn.wav' ''
'data/msgs/ru/start_pb.wav' ''
'data/msgs/ru/start_tow.wav' ''
'data/msgs/ru/winch.wav' ''
'data/icons/en/accept_plan.png' ''
'data/icons/en/conn_first.png' ''
'data/icons/en/delete_seg.png' ''
'data/icons/en/place_seg.png' ''
'data/icons/en/cancel_plan.png' ''
'data/icons/en/move_view.png' ''
'data/icons/en/rotate_seg.png' ''
'data/icons/de/accept_plan.png' ''
'data/icons/de/conn_first.png' ''
'data/icons/de/delete_seg.png' ''
'data/icons/de/place_seg.png' ''
'data/icons/de/cancel_plan.png' ''
'data/icons/de/move_view.png' ''
'data/icons/de/rotate_seg.png' ''
'data/icons/fr/accept_plan.png' ''
'data/icons/fr/conn_first.png' ''
'data/icons/fr/delete_seg.png' ''
'data/icons/fr/place_seg.png' ''
'data/icons/fr/cancel_plan.png' ''
'data/icons/fr/move_view.png' ''
'data/icons/fr/rotate_seg.png' ''
'data/icons/ru/accept_plan.png' ''
'data/icons/ru/conn_first.png' ''
'data/icons/ru/delete_seg.png' ''
'data/icons/ru/place_seg.png' ''
'data/icons/ru/cancel_plan.png' ''
'data/icons/ru/move_view.png' ''
'data/icons/ru/rotate_seg.png' ''
'data/po/de/strings.po' ''
'objects/tugs/AST-3F.tug/AST-3F.obj' ''
'objects/tugs/AST-3F.tug/air.wav' ''
'objects/tugs/AST-3F.tug/beeper.wav' ''
'objects/tugs/AST-3F.tug/engine.wav' ''
'objects/tugs/AST-3F.tug/info.cfg' ''
'objects/tugs/AST-3F.tug/liveries/generic.livery/AST-3F_tex.png' \
'//PNG2DDS//'
'objects/tugs/AST-3F.tug/liveries/generic.livery/AST-3F_lit.png' \
'//PNG2DDS//'
'objects/tugs/AST-3F.tug/liveries/GlobeGroundBerlin.livery/info.cfg' \
''
'objects/tugs/AST-3F.tug/liveries/GlobeGroundBerlin.livery/AST-3F_tex.png' \
'//PNG2DDS//'
'objects/tugs/AST-3F.tug/liveries/HAviationGroundServices.livery/info.cfg' \
''
'objects/tugs/AST-3F.tug/liveries/HAviationGroundServices.livery/AST-3F_tex.png' \
'//PNG2DDS//'
'objects/tugs/AST-3F.tug/liveries/LEOS.livery/info.cfg' ''
'objects/tugs/AST-3F.tug/liveries/LEOS.livery/AST-3F_tex.png' '//PNG2DDS//'
'objects/tugs/AST-3F.tug/liveries/Swissport.livery/info.cfg' ''
'objects/tugs/AST-3F.tug/liveries/Swissport.livery/AST-3F_tex.png' \
'//PNG2DDS//'
'objects/tugs/AST-1X.tug/AST-1X.obj' ''
'objects/tugs/AST-1X.tug/beeper.wav' ''
'objects/tugs/AST-1X.tug/engine.wav' ''
'objects/tugs/AST-1X.tug/info.cfg' ''
'objects/tugs/AST-1X.tug/liveries/generic.livery/AST-1X_tex.png' \
'//PNG2DDS//'
'objects/tugs/AP88.tug/AP88.obj' ''
'objects/tugs/AP88.tug/engine.wav' ''
'objects/tugs/AP88.tug/info.cfg' ''
'objects/tugs/AP88.tug/liveries/generic.livery/AAP88_tex.png' \
'//PNG2DDS//'
)
function install_xtra_files() {
for (( I=0; $I < ${#DIST_FILES[@]}; I=$I + 2 )); do
FILE="${DIST_FILES[$I]}"
DSTDIR="${DIST_FILES[$I+1]}"
if [[ "$DSTDIR" = "//PNG2DDS//" ]]; then
DSTDIR=""
XFERCMD="convert"
TGTFILE="$(basename "$FILE")"
TGTFILE="${TGTFILE/%.png/.dds}"
else
TGTFILE="$(basename "$FILE")"
XFERCMD="cp"
fi
if [[ "$DSTDIR" = "" ]]; then
DSTDIR="$(dirname "$FILE")"
fi
mkdir -p "BetterPushback/$DSTDIR"
$XFERCMD "$FILE" "BetterPushback/$DSTDIR/$TGTFILE"
done
}
rm -rf BetterPushback
(cd zlib && ./build_zlib_deps ) || exit 1
(cd libpng && ./build_libpng_deps ) || exit 1
(cd pcre2 && ./build_pcre2_deps ) || exit 1
(cd libxml2 && ./build_libxml2_deps ) || exit 1
case `uname` in
Linux)
set -e
( cd qmake && ./build-win-lin )
mkdir -p BetterPushback/{32,64}
cp qmake/output/32/{win,lin}.xpl BetterPushback/32
cp qmake/output/64/{win,lin}.xpl BetterPushback/64
install_xtra_files
set +e
;;
Darwin)
set -e
( cd qmake && ./build-mac )
mkdir -p BetterPushback/{32,64}
cp qmake/output/32/mac.xpl BetterPushback/32
cp qmake/output/64/mac.xpl BetterPushback/64
install_xtra_files
set +e
;;
*)
echo "Unsupported platform" >&2
exit 1
;;
esac