summaryrefslogtreecommitdiffstats
path: root/TOOLS/osxbundle.py
diff options
context:
space:
mode:
Diffstat (limited to 'TOOLS/osxbundle.py')
-rwxr-xr-xTOOLS/osxbundle.py20
1 files changed, 12 insertions, 8 deletions
diff --git a/TOOLS/osxbundle.py b/TOOLS/osxbundle.py
index 6cd2a227c5..66ef576efd 100755
--- a/TOOLS/osxbundle.py
+++ b/TOOLS/osxbundle.py
@@ -30,24 +30,28 @@ def user_dylib_lst(input_file):
return [lib for lib in dylib_lst(input_file).split("\n") if
is_user_lib(lib, input_file)]
-def bundle_name(binary_name):
+def bundle_path(binary_name):
return "%s.app" % binary_name
+def bundle_name(binary_name):
+ return os.path.basename(bundle_path(binary_name))
+
def target_plist(binary_name):
- return os.path.join(bundle_name(binary_name), 'Contents', 'Info.plist')
+ return os.path.join(bundle_path(binary_name), 'Contents', 'Info.plist')
def target_directory(binary_name):
- return os.path.join(bundle_name(binary_name), 'Contents', 'MacOS')
+ return os.path.join(bundle_path(binary_name), 'Contents', 'MacOS')
def target_binary(binary_name):
- return os.path.join(target_directory(binary_name), binary_name)
+ return os.path.join(target_directory(binary_name),
+ os.path.basename(binary_name))
def copy_bundle(binary_name):
- if os.path.isdir(bundle_name(binary_name)):
- shutil.rmtree(bundle_name(binary_name))
+ if os.path.isdir(bundle_path(binary_name)):
+ shutil.rmtree(bundle_path(binary_name))
shutil.copytree(
os.path.join('TOOLS', 'osxbundle', bundle_name(binary_name)),
- bundle_name(binary_name))
+ bundle_path(binary_name))
def copy_binary(binary_name):
shutil.copy(binary_name, target_binary(binary_name))
@@ -91,7 +95,7 @@ def fix_dylibs_paths(target_file, dest_dir, root=True):
fix_dylibs_paths(dylib_dest_path, dest_dir, False)
def apply_plist_template(plist_file, version):
- sh("sed -i -e 's/{{VERSION}}/%s/g' %s" % (version, plist_file))
+ sh("sed -i -e 's/${VERSION}/%s/g' %s" % (version, plist_file))
def bundle_dependencies(binary_name):
lib_bundle_directory = os.path.join(target_directory(binary_name), "lib")