forked from mru00/crane_gps_watch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake_release.sh
executable file
·53 lines (39 loc) · 1.17 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
#! /bin/bash -xeu
# Copyright (C) 2014 - 2015 mru@sisyphus.teil.cc
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
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
release win-i686 "--host i686-w64-mingw32 --build ${build_cpu}-pc-linux-gnu"
release win-x86_64 "--host x86_64-w64-mingw32 --build ${build_cpu}-pc-linux-gnu"
release linux-i686 "--host i686-pc-linux-gnu --build ${build_cpu}-pc-linux-gnu"
#release linux-x86_64 "--host x86_64-pc-linux-gnu --build ${build_cpu}-pc-linux-gnu"
echo done