diff --git a/prepare.py b/prepare.py index 4e87f74ad..45af70408 100755 --- a/prepare.py +++ b/prepare.py @@ -24,6 +24,7 @@ import argparse import os +import re import shutil import sys sys.path.insert(0, 'submodules/cmake-builder') @@ -80,6 +81,40 @@ class PlatformListAction(argparse.Action): raise argparse.ArgumentError(self, message) setattr(namespace, self.dest, values) +def warning(platforms): + gpl_third_parties_enabled = False + regex = re.compile("^ENABLE_GPL_THIRD_PARTIES:BOOL=ON") + f = open('WORK/ios-{arch}/cmake/CMakeCache.txt'.format(arch=platforms[0]), 'r') + for line in f: + if regex.match(line): + gpl_third_parties_enabled = True + break + f.close() + + if gpl_third_parties_enabled: + print(""" +*************************************************************************** +*************************************************************************** +***** CAUTION, this liblinphone SDK is built using 3rd party GPL code ***** +***** Even if you acquired a proprietary license from Belledonne ***** +***** Communications, this SDK is GPL and GPL only. ***** +***** To disable 3rd party gpl code, please use: ***** +***** $ ./prepare.py -DENABLE_GPL_THIRD_PARTIES=NO ***** +*************************************************************************** +*************************************************************************** +""") + else: + print(""" +***************************************************************** +***************************************************************** +***** Linphone SDK without 3rd party GPL software ***** +***** If you acquired a proprietary license from Belledonne ***** +***** Communications, this SDK can be used to create ***** +***** a proprietary linphone-based application. ***** +***************************************************************** +***************************************************************** +""") + def main(argv = None): if argv is None: argv = sys.argv @@ -168,7 +203,7 @@ clean-%: $(MAKE) -C WORK/ios-$$arch/Build/$* clean || exit 1; \\ done -build: libs +build: libs sdk libs: $(addprefix all-,$(archs)) archives=`find liblinphone-sdk/{first_arch}-apple-darwin.ios -name *.a` && \\ @@ -192,6 +227,10 @@ libs: $(addprefix all-,$(archs)) cp -f submodules/binaries/libdummy.a liblinphone-sdk/apple-darwin/lib/libtunnel.a ; \\ fi +ipa: build + xcodebuild -configuration Release \\ + && xcrun -sdk iphoneos PackageApplication -v build/Release-iphoneos/linphone.app -o linphone-iphone.ipa + sdk: libs echo "Generating SDK zip file for version $(LINPHONE_IPHONE_VERSION)" zip -r liblinphone-iphone-sdk-$(LINPHONE_IPHONE_VERSION).zip \\ @@ -235,6 +274,7 @@ help: f = open('Makefile', 'w') f.write(makefile) f.close() + warning(makefile_platforms) elif os.path.isfile('Makefile'): os.remove('Makefile') diff --git a/submodules/cmake-builder b/submodules/cmake-builder index c1ef3535b..047fa5e04 160000 --- a/submodules/cmake-builder +++ b/submodules/cmake-builder @@ -1 +1 @@ -Subproject commit c1ef3535b8e1817137580355934547083000216c +Subproject commit 047fa5e04c85c855b0afdabcca929bd35a261065