forked from riksweeney/edgar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildwindows.sh
executable file
·88 lines (57 loc) · 1.54 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
85
86
87
88
#!/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 Subversion Tag $APPVERSION-$APPRELEASE"
svn export https://github.com/riksweeney/edgar/tags/$APPVERSION $APPDIR
echo "Getting latest translations from the trunk"
rm -rf $APPDIR/locale
svn export https://github.com/riksweeney/edgar/trunk/locale $APPDIR/locale
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
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.installer.exe
cd ..
rm -r $APPDIR