Changeset 223234 in webkit
- Timestamp:
- Oct 12, 2017 1:37:53 AM (7 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r223226 r223234 1 2017-10-11 Frederic Wang <fwang@igalia.com> 2 3 run-safari --ios-simulator is no longer working with Xcode 9 4 https://bugs.webkit.org/show_bug.cgi?id=177595 5 6 Reviewed by Daniel Bates. 7 8 In Xcode 9, the path of the simulator application is now in a new CoreSimulator subdirectory 9 of the iphoneOS SDK platform. This patch updates webkitdirs.pm to use the new path in 10 Xcode 9 or higher so that it is possible to run Safari on the iOS simulator again. It also 11 does some minor code refactoring to improve code reuse. 12 13 * Scripts/configure-xcode-for-ios-development: Move sdkDirectory() and sdkPlatformDirectory() 14 into webkitdirs. 15 (sdkDirectory): Deleted. 16 (sdkPlatformDirectory): Deleted. 17 * Scripts/webkitdirs.pm: Expose new sdkDirectory() and sdkPlatformDirectory(). 18 (sdkDirectory): Moved from configure-xcode-for-ios-development. 19 (sdkPlatformDirectory): Ditto. 20 (XcodeSDKPath): Rely on sdkDirectory() to implement this function. 21 (iosSimulatorApplicationsPath): In Xcode 9 or higher use the new path. It is calculated 22 by relying on sdkPlatformDirectory(). 23 1 24 2017-10-11 Dewei Zhu <dewei_zhu@apple.com> 2 25 -
trunk/Tools/Scripts/configure-xcode-for-ios-development
r221168 r223234 46 46 sub mergeXcodeSpecificationWithSpecificationAndId($$$); 47 47 sub readXcodeSpecificationById($$); 48 sub sdkDirectory($);49 sub sdkPlatformDirectory($);50 48 sub updateXcode7SpecificationFile($); 51 49 sub updateXcodeSpecificationFilesForSDKIfNeeded($); … … 213 211 } 214 212 215 sub sdkDirectory($)216 {217 my ($sdkName) = @_;218 chomp(my $sdkDirectory = `xcrun --sdk '$sdkName' --show-sdk-path`);219 die "Failed to get SDK path from xcrun: $!" if exitStatus($?);220 return $sdkDirectory;221 }222 223 sub sdkPlatformDirectory($)224 {225 my ($sdkName) = @_;226 chomp(my $sdkPlatformDirectory = `xcrun --sdk '$sdkName' --show-sdk-platform-path`);227 die "Failed to get SDK platform path from xcrun: $!" if exitStatus($?);228 return $sdkPlatformDirectory;229 }230 231 213 sub writeXcodeSpecification($$) 232 214 { -
trunk/Tools/Scripts/webkitdirs.pm
r222538 r223234 72 72 &findOrCreateSimulatorForIOSDevice 73 73 &iosSimulatorDeviceByName 74 &iosVersion 74 75 &nmPath 75 76 &passedConfiguration … … 83 84 &runMacWebKitApp 84 85 &safariPath 85 &iosVersion 86 &sdkDirectory 87 &sdkPlatformDirectory 86 88 &setConfiguration 87 89 &setupMacWebKitEnvironment … … 166 168 sub hasArgument($$); 167 169 170 sub sdkDirectory($) 171 { 172 my ($sdkName) = @_; 173 chomp(my $sdkDirectory = `xcrun --sdk '$sdkName' --show-sdk-path`); 174 die "Failed to get SDK path from xcrun: $!" if exitStatus($?); 175 return $sdkDirectory; 176 } 177 178 sub sdkPlatformDirectory($) 179 { 180 my ($sdkName) = @_; 181 chomp(my $sdkPlatformDirectory = `xcrun --sdk '$sdkName' --show-sdk-platform-path`); 182 die "Failed to get SDK platform path from xcrun: $!" if exitStatus($?); 183 return $sdkPlatformDirectory; 184 } 185 168 186 sub determineSourceDir 169 187 { … … 541 559 542 560 die "Can't find the SDK path because no Xcode SDK was specified" if not $xcodeSDK; 543 544 my $sdkPath = `xcrun --sdk $xcodeSDK --show-sdk-path` if $xcodeSDK; 545 die 'Failed to get SDK path from xcrun' if $?; 546 chomp $sdkPath; 547 548 return $sdkPath; 561 return sdkDirectory($xcodeSDK); 549 562 } 550 563 … … 2311 2324 sub iosSimulatorApplicationsPath() 2312 2325 { 2313 return File::Spec->catdir(XcodeSDKPath(), "Applications"); 2326 determineXcodeVersion(); 2327 if (eval "v$xcodeVersion" lt v9.0) { 2328 return File::Spec->catdir(XcodeSDKPath(), "Applications"); 2329 } 2330 2331 my $iphoneOSPlatformPath = sdkPlatformDirectory("iphoneos"); 2332 return File::Spec->catdir($iphoneOSPlatformPath, "Developer", "Library", "CoreSimulator", "Profiles", "Runtimes", "iOS.simruntime", "Contents", "Resources", "RuntimeRoot", "Applications"); 2314 2333 } 2315 2334
Note: See TracChangeset
for help on using the changeset viewer.