diff options
Diffstat (limited to 'TOOLS')
-rwxr-xr-x | TOOLS/osxbundle.py | 20 | ||||
-rw-r--r-- | TOOLS/osxbundle/mpv.app/Contents/Info.plist | 2 |
2 files changed, 13 insertions, 9 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") diff --git a/TOOLS/osxbundle/mpv.app/Contents/Info.plist b/TOOLS/osxbundle/mpv.app/Contents/Info.plist index f1e2e6f34d..0573b62e44 100644 --- a/TOOLS/osxbundle/mpv.app/Contents/Info.plist +++ b/TOOLS/osxbundle/mpv.app/Contents/Info.plist @@ -183,7 +183,7 @@ <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> - <string>{{VERSION}}</string> + <string>${VERSION}</string> <key>NSHighResolutionCapable</key> <true/> <key>CFBundleURLTypes</key> |