-
Notifications
You must be signed in to change notification settings - Fork 28
/
buildwindows.sh
executable file
·84 lines (55 loc) · 1.42 KB
/
buildwindows.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/bin/bash
if [ $# -ne 2 ];
then
echo ""
echo "Usage $0 <version> <release>"
echo ""
exit 1
fi
###### VARIABLES ############
APPNAME="edgar"
APPVERSION="$1"
APPRELEASE="$2"
APPDIR="$APPNAME-$APPVERSION/"
DISTNAME="$APPNAME-$APPVERSION-$APPRELEASE.win64.zip"
#############################
echo "Creating Windows Distribution for $APPNAME (Version $APPVERSION, Release $APPRELEASE)"
mkdir -p dist
cd dist
rm -rf $APPDIR
echo "Getting Git Tag $APPVERSION-$APPRELEASE"
git clone --branch $APPVERSION --depth=1 https://github.com/riksweeney/edgar $APPDIR
echo "Removing unwanted data files..."
for i in `find . -name *.wav | grep -v doc`;do
rm $i
done
for i in `find . -name *.xcf | grep -v doc`;do
rm $i
done
for i in `find . -name *.gif | grep -v doc`;do
rm $i
done
for i in `find . -name *.blend* | grep -v doc`;do
rm $i
done
for i in `find . -name *.jpg | grep -v doc`;do
rm $i
done
cd $APPDIR
rm -rf .git
make -f makefile.windows VERSION=$1 -j3
make -f makefile.windows -j3 buildpak
cp /opt/Windows/lib/*.dll .
cp icons/edgar.ico .
for f in `ls locale/*.po`; do \
FILE=`echo $f | cut -d'/' -f2 | cut -d'.' -f1`
echo "Moving $FILE.mo to locale/$FILE/LC_MESSAGES/edgar.mo"
mkdir -p locale/$FILE
mkdir -p locale/$FILE/LC_MESSAGES
mv locale/$FILE.mo locale/$FILE/LC_MESSAGES/edgar.mo
done
rm locale/*.po
makensis install.nsi
mv *.installer.exe ../edgar-$APPVERSION-$APPRELEASE.installer64.exe
cd ..
rm -r $APPDIR