Changeset 261397 in webkit


Ignore:
Timestamp:
May 8, 2020 10:56:48 AM (4 years ago)
Author:
dino@apple.com
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.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r261395 r261397  
     12020-05-08  Dean Jackson  <dino@apple.com>
     2
     3        Allow run-safari to launch an iPad simulator
     4        https://bugs.webkit.org/show_bug.cgi?id=211606
     5        <rdar://problem/63002849>
     6
     7        Reviewed by Jon Lee.
     8
     9        Add an "--ipad-simulator" command line option to run-safari.
     10
     11        * Scripts/webkitdirs.pm:
     12        (argumentsForConfiguration):
     13        (determineXcodeSDK): Mark the device idiom depending on the command line argument.
     14        (printHelpAndExitForRunAndDebugWebKitAppIfNeeded):
     15        (findOrCreateSimulatorForIOSDevice): Create an iPad Pro simulator if requested.
     16
    1172020-05-08  Wenson Hsieh  <wenson_hsieh@apple.com>
    218
  • trunk/Tools/Scripts/webkitdirs.pm

    r260758 r261397  
    139139my $configuration;
    140140my $xcodeSDK;
     141my $simulatorIdiom;
    141142my $configurationForVisualStudio;
    142143my $configurationProductDir;
     
    515516    push(@args, '--release') if ($configuration =~ "^Release");
    516517    push(@args, '--ios-device') if (defined $xcodeSDK && $xcodeSDK =~ /^iphoneos/);
    517     push(@args, '--ios-simulator') if (defined $xcodeSDK && $xcodeSDK =~ /^iphonesimulator/);
     518    push(@args, '--ios-simulator') if (defined $xcodeSDK && $xcodeSDK =~ /^iphonesimulator/ && $simulatorIdiom eq "iPhone");
     519    push(@args, '--ipad-simulator') if (defined $xcodeSDK && $xcodeSDK =~ /^iphonesimulator/ && $simulatorIdiom eq "iPad");
    518520    push(@args, '--maccatalyst') if (defined $xcodeSDK && $xcodeSDK =~ /^maccatalyst/);
    519521    push(@args, '--32-bit') if ($architecture eq "x86" and !isWin64());
     
    590592    if (checkForArgumentAndRemoveFromARGV("--simulator") || checkForArgumentAndRemoveFromARGV("--ios-simulator")) {
    591593        $xcodeSDK ||= 'iphonesimulator';
     594        $simulatorIdiom = 'iPhone';
     595    }
     596    if (checkForArgumentAndRemoveFromARGV("--ipad-simulator")) {
     597        $xcodeSDK ||= 'iphonesimulator';
     598        $simulatorIdiom = 'iPad';
    592599    }
    593600    if (checkForArgumentAndRemoveFromARGV("--tvos-device")) {
     
    25762583                                    This accepts a language name (German) or a language code (de, ar, pt_BR, etc).
    25772584  --locale=LOCALE                   Use a specific locale instead of the system region.
     2585
     2586Options specific to iOS:
     2587  --iphone-simulator                Run the app in an iPhone Simulator
     2588  --ipad-simulator                  Run the app in an iPad Simulator
    25782589EOF
    25792590
     
    27852796    my $simulatorName;
    27862797    my $simulatorDeviceType;
    2787     $simulatorName = "iPhone SE " . $simulatorNameSuffix;
    2788     $simulatorDeviceType = "com.apple.CoreSimulator.SimDeviceType.iPhone-SE";
     2798
     2799    if ($simulatorIdiom eq "iPad") {
     2800        $simulatorName = "iPad Pro " . $simulatorNameSuffix;
     2801        $simulatorDeviceType = "com.apple.CoreSimulator.SimDeviceType.iPad-Pro--9-7-inch-";
     2802    } else {
     2803        $simulatorName = "iPhone SE " . $simulatorNameSuffix;
     2804        $simulatorDeviceType = "com.apple.CoreSimulator.SimDeviceType.iPhone-SE";
     2805    }
    27892806
    27902807    my $simulatedDevice = iosSimulatorDeviceByName($simulatorName);
Note: See TracChangeset for help on using the changeset viewer.