Initial Mercurial commit.

This commit is contained in:
rude
2009-07-26 15:46:49 +02:00
commit dcb3dfd83d
417 changed files with 124060 additions and 0 deletions
+128
View File
@@ -0,0 +1,128 @@
#!/bin/bash
#
# This script gets all needed packages, builds LOVE, makes deb and tar.gz
# and optionally uploads them to servers.
#
# Note: this script must be called in the same directory as the love
# folder resides. It also assumes that love has been checked out previously.
#
# Usage:
#
# autobuild [action [revision [version]]]
#
# action:
#
# There are only two recognized actions:
#
# build -- Causes files to be uploaded to tehlol servers.
# release -- Coming soon.
#
# All other actions will be ignored, so if you don not wish to upload
# files (but still build LOVE), you can write "test", for instance.
#
# revision:
#
# The SVN revision that should be built. Should be a valid revision
# number or HEAD. If not specified, it defaults to HEAD.
#
# version:
#
# The display version that will appear in files, eg. love-version.tar.gz.
# If not specified, the script defaults to use the SVN revision number.
#
# Examples:
#
# autobuild
# (Builds HEAD, but does not upload)
#
# autobuild build
# (Builds HEAD and uploads to tehlol server with the current svn rev. as
# version number)
#
# autobuild build HEAD 1.0
# (Builds HEAD and uploads it using the version 1.0)
#
#
# Passwords for servers must be in these external files:
#
# tehlol.com: pwtehlol
# sourceforge.net: pwsourceforge
#
cd ../..
# Get required packages.
sudo apt-get -y install subversion build-essential liblua5.1-dev \
libopenal-dev libsdl1.2-dev libsdl-sound1.2-dev libfreetype6-dev \
libphysfs-dev libdevil-dev libtiff4-dev libalut-dev libmng-dev \
liblcms1-dev ftp-upload libmpg123-dev libmodplug-dev libpng12-dev
# Check which revision to build.
if [ -z $2 ]; then
buildrev="HEAD"
else
buildrev=$2
fi
# Upload to the appropriate revision.
svn up -r $buildrev
# Set the displayversion.
if [ -z $3 ]; then
if [ "$buildrev" == "HEAD" ]; then
# Get the current SVN version, use sed to remove any non-numbers.
currentsvnversion=`svnversion | sed 's/[a-zA-Z: ]//g'`
displayversion="r$currentsvnversion"
else
# The revision is already specified, so we'll use that as the
# display version.
displayversion="r$buildrev"
fi
else
# If the param is present, it overrides everything else.
displayversion=$3
fi
# Update version in configure.
# cat configure.in | sed "s/LOVE_VERSION/$displayversion/g" > configure.in
head -c 15 configure.in > configure.in.tmp
echo " [$displayversion])" >> configure.in.tmp
tail -n +2 configure.in >> configure.in.tmp
cp configure.in.tmp configure.in
rm configure.in.tmp
# Build ... BUILD!
sh platform/unix/gen-makefile
sh platform/unix/automagic
./configure
make
make dist
# Move and rename the tar.
tar="love-$displayversion-linux-src.tar.gz"
mv "love-$displayversion.tar.gz" platform/unix/$tar
# Create the deb.
cd platform/unix
sh make-package deb $displayversion
# Move and rename the deb.
deb="love-$displayversion-ubuntu-x86.deb"
mv "love-$displayversion.deb" $deb
# Copy and rename the binary.
binary="love-$displayversion"
cp ../../src/love $binary
# Deal with uploading.
if [ "$1" == "build" ]; then
pass=`cat pwtehlol`
ftp-upload -u tehloejc --password $pass -h tehlol.com -d public_html/love2d/builds/ $deb
ftp-upload -u tehloejc --password $pass -h tehlol.com -d public_html/love2d/builds/ $tar
ftp-upload -u tehloejc --password $pass -h tehlol.com -d public_html/love2d/builds/ $binary
fi
if [ "$1" == "release" ]; then
echo "release"
fi
+9
View File
@@ -0,0 +1,9 @@
#!/bin/bash
echo
echo " * Remember to run 'sh platform/unix/gen-makefile' if you've added/removed any files under src/ before running this script"
echo
autoheader # Gimmie config.h.in
libtoolize --force
aclocal
autoconf
automake -a
+11
View File
@@ -0,0 +1,11 @@
Package: love
Version: %VERSION%
Section: games
Priority: optional
Architecture: i386
Essential: no
Depends: libdevil1c2, libfreetype6, libgl1-mesa-glx, liblua5.1-0, libphysfs-1.0-0, libsdl1.2debian, libsdl-sound1.2, libopenal1, libalut0
Installed-Size: %INSTALLSIZE%
Maintainer: Tommy Nguyen [tn0502@hotmail.com]
Provides: love
Description: LOVE is a free 2D game engine which enables easy game creation in Lua.
+22
View File
@@ -0,0 +1,22 @@
./modules/native/tcc/libtcc/tccelf.c
./modules/native/tcc/libtcc/x86_64-gen.c
./modules/native/tcc/libtcc/tccasm.c
./modules/native/tcc/libtcc/tccpp.c
./modules/native/tcc/libtcc/il-gen.c
./modules/native/tcc/libtcc/c67-gen.c
./modules/native/tcc/libtcc/tcc.c
./modules/native/tcc/libtcc/elf.h
./modules/native/tcc/libtcc/tcccoff.c
./modules/native/tcc/libtcc/config.h
./modules/native/tcc/libtcc/i386-asm.h
./modules/native/tcc/libtcc/tccpe.c
./modules/native/tcc/libtcc/tcctok.h
./modules/native/tcc/libtcc/arm-gen.c
./modules/native/tcc/libtcc/i386-asm.c
./modules/native/tcc/libtcc/i386-gen.c
./modules/native/tcc/libtcc/tccgen.c
./modules/native/tcc/libtcc/tcc.h
./modules/native/tcc/libtcc/il-opcodes.h
./modules/native/tcc/libtcc/coff.h
./modules/native/tcc/libtcc/stab.h
./libraries/luasocket/libluasocket/wsocket.*
+22
View File
@@ -0,0 +1,22 @@
#!/bin/bash
echo Generating src/Makefile.am ...
cd src
inc_current=`pwd`
inc_modules="$inc_current/modules"
echo "AM_CPPFLAGS = -I$inc_current -I$inc_modules -I/usr/include/AL -I/usr/include/freetype2 \$(INCLUDE_LUA) -I/usr/include/SDL
AUTOMAKE_OPTIONS = subdir-objects
DEFAULT_INCLUDES =
SUBDIRS =
# LÖVE executable
bin_PROGRAMS = love
#love_LDFLAGS =
#love_LDADD =
love_SOURCES = \\" > Makefile.am.tmp
find . \( \( -iname "*.c" -o -iname "*.cpp" -o -iname "*.h" \) \) -exec echo '{}' \\ \; >> Makefile.am.tmp
cat Makefile.am.tmp | grep -v -f"../platform/unix/exclude" | head -c -3 > Makefile.am
#head -c -3 Makefile.am.tmp > Makefile.am
rm Makefile.am.tmp
cd ..
echo src/Makefile.am is updated! \^.^
+40
View File
@@ -0,0 +1,40 @@
#!/bin/bash
echo
echo "Packing LÖVE to go v1.2"
echo
if [ -z "$2" ]; then
echo "Syntax: ./make-package <package> <version>"
echo "Example: ./make-package deb 0.3.0-1"
echo "All files will be created in this folder."
echo
exit 0
fi
case "$1" in
deb )
strip ../../src/love
mkdir deb
mkdir deb/DEBIAN
sed "s/%VERSION%/$2/" < debian > deb/DEBIAN/tmp
sed "s/%INSTALLSIZE%/`ls -l ../../src/love | awk '{ sum += $5 } END { printf "%.2f", sum / 1000 }'`/" < deb/DEBIAN/tmp > deb/DEBIAN/control
rm deb/DEBIAN/tmp
mkdir deb/usr
mkdir deb/usr/bin
cp ../../src/love deb/usr/bin/love
dpkg -b deb love-$2.deb && \
echo " * love-$2.deb created"
rm -rf deb
;;
src )
cd ../../../
tar -czf love/platform/unix/love-$2-src.tar.gz --exclude=.svn love/demos/* love/*.txt love/makefile-ancient love/src/ && \
echo " * love-$2-src.tar.gz created"
tar -cjf love/platform/unix/love-$2-src.tar.bz2 --exclude=.svn love/demos/* love/*.txt love/makefile-ancient love/src/ && \
echo " * love-$2-src.tar.bz2 created"
zip -9q love/platform/unix/love-$2-src.zip love/*.txt love/demos/* love/makefile-ancient `find love/src/* | grep -viE svn` && \
echo " * love-$2-src.zip created"
;;
* )
echo "Unknown package type: $1"
echo "Valid types: deb src"
esac
echo