File tree Expand file tree Collapse file tree 2 files changed +27
-2
lines changed Expand file tree Collapse file tree 2 files changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -717,6 +717,29 @@ def get_xcode_version():
717
717
718
718
return version
719
719
720
+ def version_minimum (a , b ):
721
+ '''Compares two version numbers to see if a >= b
722
+
723
+ expects two dot separated version numbers
724
+ can be string, float or int
725
+ '''
726
+ if a == b or str (a ).strip () == str (b ).strip ():
727
+ return True
728
+
729
+ a = [int (x ) for x in str (a ).split ("." )]
730
+ b = [int (x ) for x in str (b ).split ("." )]
731
+ for i in range (max (len (a ), len (b ))):
732
+ ai , bi = 0 , 0
733
+ if len (a ) > i :
734
+ ai = a [i ]
735
+ if len (b ) > i :
736
+ bi = b [i ]
737
+ if ai > bi :
738
+ return True
739
+ if ai < bi :
740
+ return False
741
+
742
+ return True
720
743
721
744
def copy_files_in_dir (src , dst ):
722
745
Original file line number Diff line number Diff line change @@ -804,10 +804,12 @@ def build_ios(self):
804
804
"CONFIGURATION_BUILD_DIR=\" %s\" " % (output_dir ),
805
805
"%s" % "VALID_ARCHS=\" i386\" " if self .use_sdk == 'iphonesimulator' else ''
806
806
])
807
-
807
+
808
808
# PackageApplication is removed since xcode 8.3, should use new method to generate .ipa
809
809
# should generate .xcarchive first, then generate .ipa
810
- use_new_ipa_method = float (cocos .get_xcode_version ()) >= 8.3
810
+ xcode_version = cocos .get_xcode_version ()
811
+
812
+ use_new_ipa_method = cocos .version_minimum (xcode_version , 8.3 )
811
813
812
814
if self ._sign_id is not None :
813
815
if use_new_ipa_method :
You can’t perform that action at this time.
0 commit comments