mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
updated build scripts
This commit is contained in:
parent
cdce8d9b0a
commit
144b9fbb6b
|
@ -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:
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue