updated build scripts

This commit is contained in:
Magnus Auvinen 2009-01-11 12:35:37 +00:00
parent cdce8d9b0a
commit 144b9fbb6b
2 changed files with 18 additions and 15 deletions

View file

@ -4,7 +4,7 @@ name = "teeworlds"
domain = "www.%s.com" % name
version = sys.argv[1]
bam_version = "bam-0.2.0"
flag_download = True
flag_clean = True
@ -60,9 +60,13 @@ def unzip(filename, where):
for name in z.namelist():
try: os.makedirs(where+"/"+os.path.dirname(name))
except: pass
f = file(where+"/"+name, "wb")
f.write(z.read(name))
f.close()
try:
f = file(where+"/"+name, "wb")
f.write(z.read(name))
f.close()
except: pass
z.close()
@ -92,8 +96,7 @@ os.chdir(root_dir)
# download
if flag_download:
print "*** downloading bam source package ***"
if not fetch_file(domain, "/files/bam.zip", "bam.zip"):
if not fetch_file(domain, "/files/beta/bam.zip", "bam.zip"):
if not fetch_file(domain, "trac/bam/browser/releases/"+bam_version+".zip?format=raw", "bam.zip"):
bail("couldn't find source package and couldn't download it")
print "*** downloading %s source package ***" % name
@ -110,7 +113,7 @@ src_dir = name+"/"+ os.listdir(name+"/")[0]
# build bam
if 1:
print "*** building bam ***"
os.chdir("bam")
os.chdir(bam_version)
output = "bam"
bam_cmd = "./bam"
if os.name == "nt":
@ -122,7 +125,7 @@ if 1:
if os.system("sh make_unix.sh") != 0:
bail("failed to build bam")
os.chdir(root_dir)
shutil.copy("bam/src/"+output, src_dir+"/"+output)
shutil.copy(bam_version+"/src/"+output, src_dir+"/"+output)
# build the game
if 1:

View file

@ -23,13 +23,13 @@ root_dir = os.getcwd() + "/srcwork"
os.chdir(root_dir)
# fix bam
if 1:
os.system("svn export http://stalverk80.se/svn/bam bam")
z = zipfile.ZipFile("../bam.zip", "w")
for root, dirs, files in os.walk("bam"):
for f in files:
z.write(root+"/"+ f)
z.close()
#if 1:
# os.system("svn export http://stalverk80.se/svn/bam bam")
# z = zipfile.ZipFile("../bam.zip", "w")
# for root, dirs, files in os.walk("bam"):
# for f in files:
# z.write(root+"/"+ f)
# z.close()
if 1:
os.system("svn export svn://svn.teeworlds.com/teeworlds/%s teeworlds" % svn_tree)