-
Notifications
You must be signed in to change notification settings - Fork 80
/
release.sh
executable file
·55 lines (50 loc) · 1.48 KB
/
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
#!/bin/bash
# This is the script to build most of the release archives that we publish to
# github releases. It is intended to run on a linux system. It uses mingw to
# cross compile for Windows, so the only build that has to be done elsewhere
# is the Mac
# In order to use this script you need to install MingW64 for command line use
# Under WSL (Windows Subsystem for Linux) Ubuntu (Can be installed from the MS Store)
# this command installs MingW64: sudo apt install mingw-w64
# Also, gpx needs to be installed on the machine you're running this script on
# ie after building the linux version: sudo make install
echo "------------------------------------------------------------------"
echo "Linux build first"
mkdir -p build
cd build
mkdir -p linux
cd linux
../../configure --enable-maintainer-mode $args
make
make test
make install
make bdist
archive=`ls gpx*.tar.gz`
if [[ "${#archive[@]}" == "1" ]]; then
mv $archive ..
fi
cd ..
for plat in "win32" "win64"; do
echo "------------------------------------------------------------------"
echo "Building $plat"
mkdir -p $plat
cd $plat
pwd
case $plat in
win32)
args="-host=i686-w64-mingw32"
;;
win64)
args="-host=x86_64-w64-mingw32"
;;
esac
echo "Calling configure"
../../configure --enable-maintainer-mode $args
make
make bdist
archive=`ls gpx*.zip`
if [[ "${#archive[@]}" == "1" ]]; then
mv $archive ..
fi
cd ..
done