/ld28

To get this branch, use:
bzr branch http://9ix.org/bzr/ld28
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/ld28.love
bzr ls -RV |zip -q@ deploy/ld28.love
bzr revert --no-backup version.lua

cd deploy

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

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

cd ..