forked from coopengo/tryton-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
win-make.sh
executable file
·68 lines (57 loc) · 1.54 KB
/
win-make.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
#!/bin/bash
GDRIVE_FOLDER_ID=1yQaeqEMAaD6chcF4YMpmUZe9L3YoGa89
version() {
local t
t=$(git describe --tags --exact-match 2> /dev/null | grep "^coog-" | head -1)
if [ ! -z "$t" ]
then
echo "${t//coog-/}"
else
local b; b=$(git rev-parse --abbrev-ref HEAD)
local c; c=$(git rev-parse --short HEAD)
echo "$b-$c" | sed -e "s/coog-//g"
fi
}
deps() {
pacman -S \
mingw-w64-i686-librsvg \
mingw-w64-i686-nsis \
mingw-w64-i686-python3 \
mingw-w64-i686-python3-setuptools \
mingw-w64-i686-python3-pip \
mingw-w64-i686-gtk3 \
mingw-w64-i686-python3-gobject \
mingw-w64-i686-gtksourceview3 \
mingw-w64-i686-gtkglext \
mingw-w64-i686-python3-cx_Freeze \
mingw-w64-i686-gobject-introspection \
mingw-w64-i686-goocanvas \
mingw-w64-i686-gtksourceview3
pip3.6 install \
python-dateutil \
chardet \
pyflakes
echo "gdrive should be installed from https://github.com/prasmussen/gdrive#downloads"
echo "gdrive should be placed in a PATH folder"
}
clean() {
rm -rf build dist coog-*
}
build() {
clean
local v; v=$(version)
python3.6 setup-freeze.py install_exe -d dist
makensis -DVERSION="$v" -DBITS=32 -DSERIES="$v" setup.nsi
makensis -DVERSION="$v" -DBITS=32 setup-single.nsi
}
upload() {
for f in ./coog-*
do
gdrive upload -p "$GDRIVE_FOLDER_ID" "$f"
done
}
main() {
[ -z "$1" ] && echo missing command && return 1
"$1" "$@"
}
main "$@"