/ld27

To get this branch, use:
bzr branch http://9ix.org/bzr/ld27
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
#!/bin/sh

mkdir -p deploy/love

# make sure we have löve
cd deploy/love
if [ ! -e love-0.8.0-win-x86.zip ]; then
    wget https://bitbucket.org/rude/love/downloads/love-0.8.0-win-x86.zip
    unzip love-0.8.0-win-x86.zip || exit 1
fi
if [ ! -e love-0.8.0-macosx-ub.zip ]; then
    wget https://bitbucket.org/rude/love/downloads/love-0.8.0-macosx-ub.zip
    unzip love-0.8.0-macosx-ub.zip || exit 1
fi
cd ../..

# make the love file
V=`bzr version-info --custom --template={revno}`
echo "VERSION = '$V'" >version.lua
rm -f deploy/ld27.love
bzr ls -RV |zip -q@ deploy/ld27.love
bzr revert --no-backup version.lua

cd deploy

# package win32
rm -rf ld27-win32 ld27-win32.zip
mkdir ld27-win32
cat love/love-0.8.0-win-x86/love.exe ld27.love >ld27-win32/ld27.exe
cp love/love-0.8.0-win-x86/*.dll ld27-win32
# TODO: this is a spot I could copy a README, LICENSE, or VERSION file in.
zip -qr ld27-win32.zip ld27-win32

# package osx
rm -rf ld27.app ld27-macosx.zip
cp -r love/love.app ld27.app
cp ld27.love ld27.app/Contents/Resources/
cp ../Info.plist ld27.app/Contents/
zip -qry ld27-macosx.zip ld27.app

cd ..