/ld27

To get this branch, use:
bzr branch /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
42
43
#!/bin/sh

mkdir -p deploy/love

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

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

grep '^[^-]*require .lovebird.' main.lua && zip deploy/decimaze.love lovebird.lua

cd deploy

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

# package osx
rm -rf "Treasures of the Decimaze.app" decimaze-macosx.zip
cp -r love/love.app "Treasures of the Decimaze.app"
cp decimaze.love "Treasures of the Decimaze.app"/Contents/Resources/
cp ../Info.plist "Treasures of the Decimaze.app"/Contents/
zip -qry decimaze-macosx.zip "Treasures of the Decimaze.app"

cd ..