From 7e2edad8efea55e8df1faa695d1389ef4e326d7c Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Tue, 16 Jul 2013 13:28:28 +0200 Subject: switch the build system to waf This commit adds a new build system based on waf. configure and Makefile are deprecated effective immediately and someday in the future they will be removed (they are still available by running ./old-configure). You can find how the choice for waf came to be in `DOCS/waf-buildsystem.rst`. TL;DR: we couldn't get the same level of abstraction and customization with other build systems we tried (CMake and autotools). For guidance on how to build the software now, take a look at README.md and the cross compilation guide. CREDITS: This is a squash of ~250 commits. Some of them are not by me, so here is the deserved attribution: - @wm4 contributed some Windows fixes, renamed configure to old-configure and contributed to the bootstrap script. Also, GNU/Linux testing. - @lachs0r contributed some Windows fixes and the bootstrap script. - @Nikoli contributed a lot of testing and discovered many bugs. - @CrimsonVoid contributed changes to the bootstrap script. --- TOOLS/osxbundle.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'TOOLS/osxbundle.py') 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") -- cgit v1.2.3