forked from mirrors/linphone-iphone
prepare.py: fix dummy libraries generation
This commit is contained in:
parent
fac9e55456
commit
9a8d5412e0
2 changed files with 16 additions and 12 deletions
|
|
@ -892,7 +892,6 @@
|
|||
|
||||
/* Begin PBXFileReference section */
|
||||
045B5CB218D72E9A0088350C /* libbzrtp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libbzrtp.a; path = "liblinphone-sdk/apple-darwin/lib/libbzrtp.a"; sourceTree = "<group>"; };
|
||||
15017E6F1773578400784ACB /* libxml2.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libxml2.a; path = "liblinphone-sdk/apple-darwin/lib/libxml2.a"; sourceTree = "<group>"; };
|
||||
152F22331B15E83B008C0621 /* libilbcrfc3951.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libilbcrfc3951.a; path = "liblinphone-sdk/apple-darwin/lib/libilbcrfc3951.a"; sourceTree = "<group>"; };
|
||||
152F22351B15E889008C0621 /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; };
|
||||
1560821E18EEF26100765332 /* libmsopenh264.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmsopenh264.a; path = "liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins/libmsopenh264.a"; sourceTree = "<group>"; };
|
||||
|
|
@ -952,7 +951,6 @@
|
|||
22276E8213C73D3100210156 /* libswscale.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libswscale.a; path = "liblinphone-sdk/apple-darwin/lib/libswscale.a"; sourceTree = "<group>"; };
|
||||
22276E8613C73D8A00210156 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; };
|
||||
22276E8813C73DC000210156 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
|
||||
223148E31178A08200637D6A /* libilbc.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libilbc.a; path = "liblinphone-sdk/apple-darwin/lib/libilbc.a"; sourceTree = "<group>"; };
|
||||
223148E51178A09900637D6A /* libmsilbc.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmsilbc.a; path = "liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins/libmsilbc.a"; sourceTree = "<group>"; };
|
||||
2234C8E715EE2F7F00E18E83 /* chat_message_delivered.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = chat_message_delivered.png; path = Resources/chat_message_delivered.png; sourceTree = "<group>"; };
|
||||
2234C8E815EE2F7F00E18E83 /* chat_message_not_delivered.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = chat_message_not_delivered.png; path = Resources/chat_message_not_delivered.png; sourceTree = "<group>"; };
|
||||
|
|
@ -2289,7 +2287,6 @@
|
|||
F03A9B9718C0DB6F00C4D7FE /* libc++.dylib */,
|
||||
F0BB8C111936240300974404 /* libcunit.a */,
|
||||
220FAD2910765B400068D98F /* libgsm.a */,
|
||||
223148E31178A08200637D6A /* libilbc.a */,
|
||||
2211DB911475562600DEE054 /* liblinphone.a */,
|
||||
F0BB8C0F193623F200974404 /* liblinphonetester.a */,
|
||||
22405EE916006F0700B92522 /* libmediastreamer_base.a */,
|
||||
|
|
@ -2319,7 +2316,6 @@
|
|||
D30BF33216A427BC00AF0026 /* libtunnel.a */,
|
||||
7066FC0B13E830E400EFC6DC /* libvpx.a */,
|
||||
22AA8AFB13D7125500B30535 /* libx264.a */,
|
||||
15017E6F1773578400784ACB /* libxml2.a */,
|
||||
F0B89C2118DC89E30050B60E /* MediaPlayer.framework */,
|
||||
D37DC7171594AF3400B2A5EB /* MessageUI.framework */,
|
||||
226EF06B15FA256B005865C7 /* MobileCoreServices.framework */,
|
||||
|
|
|
|||
24
prepare.py
24
prepare.py
|
|
@ -139,14 +139,15 @@ def warning(platforms):
|
|||
|
||||
def extract_libs_list():
|
||||
l = []
|
||||
regex = re.compile("lib\S+\.a")
|
||||
# name = libspeexdsp.a; path = "liblinphone-sdk/apple-darwin/lib/libspeexdsp.a"; sourceTree = "<group>"; };
|
||||
regex = re.compile("name = (lib(\S+)\.a); path = \"liblinphone-sdk/apple-darwin/")
|
||||
f = open('linphone.xcodeproj/project.pbxproj', 'r')
|
||||
lines = f.readlines()
|
||||
f.close()
|
||||
for line in lines:
|
||||
m = regex.search(line)
|
||||
if m is not None:
|
||||
l += [m.group(0)]
|
||||
l += [m.group(1)]
|
||||
return list(set(l))
|
||||
|
||||
|
||||
|
|
@ -166,7 +167,7 @@ def main(argv=None):
|
|||
dest='list_cmake_variables')
|
||||
argparser.add_argument('platform', nargs='*', action=PlatformListAction, default=[
|
||||
'x86_64', 'devices'],
|
||||
help="The platform to build for (default is 'x84_64 devices'). Space separated"
|
||||
help="The platform to build for (default is 'x86_64 devices'). Space separated"
|
||||
" architectures in list: {0}.".format(', '.join([repr(platform) for platform in platforms])))
|
||||
args, additional_args = argparser.parse_known_args()
|
||||
|
||||
|
|
@ -276,7 +277,7 @@ def main(argv=None):
|
|||
makefile = """
|
||||
archs={archs}
|
||||
packages={packages}
|
||||
libs={libs}
|
||||
libs_list={libs_list}
|
||||
LINPHONE_IPHONE_VERSION=$(shell git describe --always)
|
||||
|
||||
.PHONY: all
|
||||
|
|
@ -333,9 +334,15 @@ libs: $(addprefix all-,$(archs))
|
|||
echo "[$$all_archs] Mixing `basename $$archive` in $$destpath"; \\
|
||||
lipo -create $$all_paths -output $$destpath; \\
|
||||
done && \\
|
||||
for lib in $$libs ; do \\
|
||||
if ! test -f liblinphone-sdk/apple-darwin/lib/$$lib ; then \\
|
||||
cp -f submodules/binaries/libdummy.a liblinphone-sdk/apple-darwin/lib/$$lib ; \\
|
||||
for lib in {libs_list} ; do \\
|
||||
if [ $${{lib:0:5}} = "libms" ] ; then \\
|
||||
library_path=liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins/$$lib ; \\
|
||||
else \\
|
||||
library_path=liblinphone-sdk/apple-darwin/lib/$$lib ; \\
|
||||
fi ; \\
|
||||
if ! test -f $$library_path ; then \\
|
||||
echo "[$$all_archs] Generating dummy $$lib static library." ; \\
|
||||
cp -f submodules/binaries/libdummy.a $$library_path ; \\
|
||||
fi \\
|
||||
done
|
||||
|
||||
|
|
@ -382,7 +389,8 @@ help:
|
|||
@echo ""
|
||||
@echo " * sdk : re-add all generated libraries to the SDK. Use this only after a full build."
|
||||
@echo " * libs : after a rebuild of a subpackage, will mix the new libs in liblinphone-sdk/apple-darwin directory"
|
||||
""".format(archs=' '.join(makefile_platforms), arch_opts='|'.join(makefile_platforms), first_arch=makefile_platforms[0], arch_targets=arch_targets, packages=' '.join(packages), libs=' '.join(libs_list), multiarch=multiarch)
|
||||
""".format(archs=' '.join(makefile_platforms), arch_opts='|'.join(makefile_platforms), first_arch=makefile_platforms[0],
|
||||
arch_targets=arch_targets, packages=' '.join(packages), libs_list=' '.join(libs_list), multiarch=multiarch)
|
||||
f = open('Makefile', 'w')
|
||||
f.write(makefile)
|
||||
f.close()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue