about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorJoel de Vahl <joel@stalverk80.se>2007-12-15 11:44:27 +0000
committerJoel de Vahl <joel@stalverk80.se>2007-12-15 11:44:27 +0000
commita3c5960ffedccf31ba2f133c88ed1533038e7f92 (patch)
tree8fec7a40043ba86d58f788b7bbd0eb2a6ce2bb92 /scripts
parent59c82d6198d11e54f3be74aa866e93dcb45d0a14 (diff)
downloadzcatch-a3c5960ffedccf31ba2f133c88ed1533038e7f92.tar.gz
zcatch-a3c5960ffedccf31ba2f133c88ed1533038e7f92.zip
Initial OSX release scripts.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/make_release.py21
1 files changed, 19 insertions, 2 deletions
diff --git a/scripts/make_release.py b/scripts/make_release.py
index 9c5a3f71..1ee1fb2d 100644
--- a/scripts/make_release.py
+++ b/scripts/make_release.py
@@ -13,6 +13,7 @@ platform = sys.argv[2]
 exe_ext = ""
 use_zip = 0
 use_gz = 1
+use_bundle = 0
 include_data = True
 include_exe = True
 include_src = False
@@ -33,6 +34,10 @@ if platform == 'win32':
 	exe_ext = ".exe"
 	use_zip = 1
 	use_gz = 0
+if platform == 'osx':
+	use_zip = 1
+	use_gz = 0
+	use_bundle = 1
 
 def copydir(src, dst, excl=[]):
 	for root, dirs, files in os.walk(src, topdown=True):
@@ -56,13 +61,13 @@ print "adding files"
 shutil.copy("readme.txt", package_dir)
 shutil.copy("license.txt", package_dir)
 
-if include_data:
+if include_data and not use_bundle:
 	os.mkdir(os.path.join(package_dir, "data"))
 	copydir("data", package_dir)
 	if platform[:3] == "win":
 		shutil.copy("other/config_directory.bat", package_dir)
 
-if include_exe:
+if include_exe and not use_bundle:
 	shutil.copy("teewars"+exe_ext, package_dir)
 	shutil.copy("teewars_srv"+exe_ext, package_dir)
 	
@@ -72,6 +77,18 @@ if include_src:
 		copydir(p, package_dir)
 	shutil.copy("default.bam", package_dir)
 
+if use_bundle:
+	bundle_content_dir = os.path.join(package_dir, "Teewars.app/Contents")
+	bundle_bin_dir = os.path.join(bundle_content_dir, "MaxOS")
+	bundle_resource_dir = os.path.join(bundle_content_dir, "Resources")
+	os.mkdir(os.path.join(package_dir, "Teewars.app"))
+	os.mkdir(bundle_content_dir)
+	os.mkdir(bundle_bin_dir)
+	os.mkdir(bundle_resource_dir)
+	os.mkdir(os.path.join(bundle_resource_dir, "data"))
+	copydir("data", bundle_resource_dir)
+	shutil.copy("teewars"+ext_ext, bundle_bin_dir)
+
 if use_zip:
 	print "making zip archive"
 	zf = zipfile.ZipFile("%s.zip" % package, 'w', zipfile.ZIP_DEFLATED)