Title: [261397] trunk/Tools
- Revision
- 261397
- Author
- [email protected]
- Date
- 2020-05-08 10:56:48 -0700 (Fri, 08 May 2020)
Log Message
Allow run-safari to launch an iPad simulator
https://bugs.webkit.org/show_bug.cgi?id=211606
<rdar://problem/63002849>
Reviewed by Jon Lee.
Add an "--ipad-simulator" command line option to run-safari.
* Scripts/webkitdirs.pm:
(argumentsForConfiguration):
(determineXcodeSDK): Mark the device idiom depending on the command line argument.
(printHelpAndExitForRunAndDebugWebKitAppIfNeeded):
(findOrCreateSimulatorForIOSDevice): Create an iPad Pro simulator if requested.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (261396 => 261397)
--- trunk/Tools/ChangeLog 2020-05-08 17:53:22 UTC (rev 261396)
+++ trunk/Tools/ChangeLog 2020-05-08 17:56:48 UTC (rev 261397)
@@ -1,3 +1,19 @@
+2020-05-08 Dean Jackson <[email protected]>
+
+ Allow run-safari to launch an iPad simulator
+ https://bugs.webkit.org/show_bug.cgi?id=211606
+ <rdar://problem/63002849>
+
+ Reviewed by Jon Lee.
+
+ Add an "--ipad-simulator" command line option to run-safari.
+
+ * Scripts/webkitdirs.pm:
+ (argumentsForConfiguration):
+ (determineXcodeSDK): Mark the device idiom depending on the command line argument.
+ (printHelpAndExitForRunAndDebugWebKitAppIfNeeded):
+ (findOrCreateSimulatorForIOSDevice): Create an iPad Pro simulator if requested.
+
2020-05-08 Wenson Hsieh <[email protected]>
Preserve character set information when writing to the pasteboard when copying rich text
Modified: trunk/Tools/Scripts/webkitdirs.pm (261396 => 261397)
--- trunk/Tools/Scripts/webkitdirs.pm 2020-05-08 17:53:22 UTC (rev 261396)
+++ trunk/Tools/Scripts/webkitdirs.pm 2020-05-08 17:56:48 UTC (rev 261397)
@@ -138,6 +138,7 @@
my @baseProductDirOption;
my $configuration;
my $xcodeSDK;
+my $simulatorIdiom;
my $configurationForVisualStudio;
my $configurationProductDir;
my $sourceDir;
@@ -514,7 +515,8 @@
push(@args, '--debug') if ($configuration =~ "^Debug");
push(@args, '--release') if ($configuration =~ "^Release");
push(@args, '--ios-device') if (defined $xcodeSDK && $xcodeSDK =~ /^iphoneos/);
- push(@args, '--ios-simulator') if (defined $xcodeSDK && $xcodeSDK =~ /^iphonesimulator/);
+ push(@args, '--ios-simulator') if (defined $xcodeSDK && $xcodeSDK =~ /^iphonesimulator/ && $simulatorIdiom eq "iPhone");
+ push(@args, '--ipad-simulator') if (defined $xcodeSDK && $xcodeSDK =~ /^iphonesimulator/ && $simulatorIdiom eq "iPad");
push(@args, '--maccatalyst') if (defined $xcodeSDK && $xcodeSDK =~ /^maccatalyst/);
push(@args, '--32-bit') if ($architecture eq "x86" and !isWin64());
push(@args, '--64-bit') if (isWin64());
@@ -589,7 +591,12 @@
}
if (checkForArgumentAndRemoveFromARGV("--simulator") || checkForArgumentAndRemoveFromARGV("--ios-simulator")) {
$xcodeSDK ||= 'iphonesimulator';
+ $simulatorIdiom = 'iPhone';
}
+ if (checkForArgumentAndRemoveFromARGV("--ipad-simulator")) {
+ $xcodeSDK ||= 'iphonesimulator';
+ $simulatorIdiom = 'iPad';
+ }
if (checkForArgumentAndRemoveFromARGV("--tvos-device")) {
$xcodeSDK ||= "appletvos";
}
@@ -2575,6 +2582,10 @@
--lang=LANGUAGE Use a specific language instead of system language.
This accepts a language name (German) or a language code (de, ar, pt_BR, etc).
--locale=LOCALE Use a specific locale instead of the system region.
+
+Options specific to iOS:
+ --iphone-simulator Run the app in an iPhone Simulator
+ --ipad-simulator Run the app in an iPad Simulator
EOF
exit(1);
@@ -2784,9 +2795,15 @@
my ($simulatorNameSuffix) = @_;
my $simulatorName;
my $simulatorDeviceType;
- $simulatorName = "iPhone SE " . $simulatorNameSuffix;
- $simulatorDeviceType = "com.apple.CoreSimulator.SimDeviceType.iPhone-SE";
+ if ($simulatorIdiom eq "iPad") {
+ $simulatorName = "iPad Pro " . $simulatorNameSuffix;
+ $simulatorDeviceType = "com.apple.CoreSimulator.SimDeviceType.iPad-Pro--9-7-inch-";
+ } else {
+ $simulatorName = "iPhone SE " . $simulatorNameSuffix;
+ $simulatorDeviceType = "com.apple.CoreSimulator.SimDeviceType.iPhone-SE";
+ }
+
my $simulatedDevice = iosSimulatorDeviceByName($simulatorName);
return $simulatedDevice if $simulatedDevice;
return createiOSSimulatorDevice($simulatorName, $simulatorDeviceType, iosSimulatorRuntime());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes