Title: [291454] trunk/Tools
Revision
291454
Author
[email protected]
Date
2022-03-17 17:18:32 -0700 (Thu, 17 Mar 2022)

Log Message

configure-xcode-for-embedded-development fails with Xcode 13.3
https://bugs.webkit.org/show_bug.cgi?id=237994
<rdar://problem/90455614>

Reviewed by Ryan Haddad.

* Tools/Scripts/configure-xcode-for-embedded-development: Handle different xcspec locations in XCode 13.3.

Canonical link: https://commits.webkit.org/248576@main

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (291453 => 291454)


--- trunk/Tools/ChangeLog	2022-03-18 00:14:50 UTC (rev 291453)
+++ trunk/Tools/ChangeLog	2022-03-18 00:18:32 UTC (rev 291454)
@@ -1,3 +1,13 @@
+2022-03-17  Jonathan Bedard  <[email protected]>
+
+        configure-xcode-for-embedded-development fails with Xcode 13.3
+        https://bugs.webkit.org/show_bug.cgi?id=237994
+        <rdar://problem/90455614>
+
+        Reviewed by Ryan Haddad.
+
+        * Scripts/configure-xcode-for-embedded-development: Handle different xcspec locations in XCode 13.3.
+
 2022-03-17  Brent Fulgham  <[email protected]>
 
         Disable push features in CaptivePortal mode 

Modified: trunk/Tools/Scripts/configure-xcode-for-embedded-development (291453 => 291454)


--- trunk/Tools/Scripts/configure-xcode-for-embedded-development	2022-03-18 00:14:50 UTC (rev 291453)
+++ trunk/Tools/Scripts/configure-xcode-for-embedded-development	2022-03-18 00:18:32 UTC (rev 291454)
@@ -72,14 +72,18 @@
 ]
 
 xcode_version = subprocess.run(['/usr/bin/xcodebuild', '-version'], capture_output=True, encoding='ascii').stdout.splitlines()[0].split(' ')[1]
-if int(xcode_version.split('.')[0]) >= 12:
-    mac_xcspec_location = 'Platforms/MacOSX.platform/Developer/Library/Xcode/PrivatePlugIns/IDEOSXSupportCore.ideplugin/Contents/Resources'
+if tuple(int(n) for n in xcode_version.split('.')) >= (13, 3):
+    mac_xcspec_location = f'Platforms/MacOSX.platform/Developer/Library/Xcode/PrivatePlugIns/IDEOSXSupportCore.xcplugindata/Contents/Resources'
+elif int(xcode_version.split('.')[0]) >= 12:
+    mac_xcspec_location = f'Platforms/MacOSX.platform/Developer/Library/Xcode/PrivatePlugIns/IDEOSXSupportCore.ideplugin/Contents/Resources'
 else:
     mac_xcspec_location = 'Platforms/MacOSX.platform/Developer/Library/Xcode/Specifications'
 
+ideplugin = 'XCBSpecifications' if tuple(int(n) for n in xcode_version.split('.')) >= (13, 3) else 'IDEiOSSupportCore'
+
 XCSPEC_INFO = [dict(
     id='com.apple.product-type.tool',
-    dest='../PlugIns/IDEiOSSupportCore.ideplugin/Contents/Resources/Embedded-Shared.xcspec',
+    dest=f'../PlugIns/{ideplugin}.ideplugin/Contents/Resources/Embedded-Shared.xcspec',
     content='''
     // Tool (normal Unix command-line executable)
     {   Type = ProductType;
@@ -114,7 +118,7 @@
 ''',
 ), dict(
     id='com.apple.package-type.mach-o-executable',
-    dest='../PlugIns/IDEiOSSupportCore.ideplugin/Contents/Resources/Embedded-Shared.xcspec',
+    dest=f'../PlugIns/{ideplugin}.ideplugin/Contents/Resources/Embedded-Shared.xcspec',
     content='''
     {   Type = PackageType;
         Identifier = com.apple.package-type.mach-o-executable;
@@ -274,7 +278,7 @@
     for spec_info in XCSPEC_INFO:
         dest_spec_path = xcode_developer_dir() / spec_info['dest']
         if not dest_spec_path.exists():
-            raise FileNotFoundError(errno.ENOENT, os.strerror(errno.ENOENT), path)
+            raise FileNotFoundError(errno.ENOENT, os.strerror(errno.ENOENT), dest_spec_path)
 
         result = subprocess.run(
             [PLIST_BUDDY_PATH, '-x', '-c', 'Print', dest_spec_path],
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to