about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorKrzysztof Socha <ksocha@ksocha.com>2011-11-13 01:30:03 +0100
committeroy <Tom_Adams@web.de>2011-12-10 18:13:03 +0100
commit242e551142834c8bf1d34ec00b6a40214f0a253d (patch)
treed86fbf2c084bde39da3921f4f4f5ab79ceaf28af /scripts
parent1fb4ead61acb6d4030c98b9f93b2907d727d1e5f (diff)
downloadzcatch-242e551142834c8bf1d34ec00b6a40214f0a253d.tar.gz
zcatch-242e551142834c8bf1d34ec00b6a40214f0a253d.zip
changed make_release.py script, so it can correctly create universal binary on all architectures
Diffstat (limited to 'scripts')
-rw-r--r--scripts/make_release.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/scripts/make_release.py b/scripts/make_release.py
index 6dce1cac..90c8a964 100644
--- a/scripts/make_release.py
+++ b/scripts/make_release.py
@@ -83,9 +83,16 @@ if include_src:
 	shutil.copy("configure.lua", package_dir)
 
 if use_bundle:
-	os.system("lipo -create -output "+name+"_srv "+name+"_srv"+"_ppc "+name+"_srv"+"_x86")
-	os.system("lipo -create -output "+name+" "+name+"_ppc "+name+"_x86")
-	os.system("lipo -create -output serverlaunch serverlaunch_ppc serverlaunch_x86")
+	bins = [name, name+'_srv', 'serverlaunch']
+	platforms = ('x86', 'x86_64', 'ppc')
+	for bin in bins:
+		to_lipo = []
+		for p in platforms:
+			fname = bin+'_'+p
+			if os.path.isfile(fname):
+				to_lipo.append(fname)
+		if to_lipo:
+			os.system("lipo -create -output "+bin+" "+" ".join(to_lipo))
 
 	# create Teeworlds appfolder
 	clientbundle_content_dir = os.path.join(package_dir, "Teeworlds.app/Contents")