-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathmake_release.sh
executable file
·58 lines (43 loc) · 1.4 KB
/
make_release.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
#! /bin/bash -xeu
# Copyright (C) 2014 - 2015 [email protected]
readonly topdir=$(readlink -f $(dirname $0))
readonly releasedir=release
readonly iscc="$HOME/.wine/drive_c/Program Files (x86)/Inno Setup 5/ISCC.exe"
readonly build_cpu=$(uname -m)
if [[ -e $iscc ]]; then
echo "using innosetup compiler at $iscc"
else
echo "inno setup compiler not found"
exit 1
fi
which i686-w64-mingw32-g++
which x86_64-w64-mingw32-g++
release() {
local title=$1
local config="$2"
local destdir=$releasedir/$title
mkdir $destdir
(
cd $destdir
$topdir/configure $config
make -j 10
# only run test suite if architecture matches current architecture
if [[ $title =~ $build_cpu ]]; then
make check
fi
if [[ $title =~ win ]]; then
"$iscc" src/setup.ss
cp src/Output/setup.exe $topdir/$releasedir/setup-gps_watch-${title}.exe
fi
)
}
autoreconf
rm -rf $releasedir
mkdir $releasedir
make distclean || true
release win-i686 "--host i686-w64-mingw32 --build ${build_cpu}-pc-linux-gnu CXX=i686-w64-mingw32-g++ CC=i686-w64-mingw32-gcc"
release win-x86_64 "--host x86_64-w64-mingw32 --build ${build_cpu}-pc-linux-gnu CXX=x86_64-w64-mingw32-g++ CC=x86_64-w64-mingw32-gcc"
#release linux-i686 "--host i686-pc-linux-gnu --build ${build_cpu}-pc-linux-gnu"
# yes, i finally installed a 64bit linux
release linux-${build_cpu} "--host ${build_cpu}-pc-linux-gnu --build ${build_cpu}-pc-linux-gnu"
echo done