Skip to content

Commit e2f7bd5

Browse files
PancfJonWBedard
authored andcommitted
Optimize ReadMe and run-webkit-app usage
https://bugs.webkit.org/show_bug.cgi?id=278906 Reviewed by Jonathan Bedard. Add the guide of running applications in iOS simulator to ReadMe. Update the utility `run-webkit-app` usage output. * ReadMe.md: * Tools/Scripts/webkitdirs.pm: (determineXcodeSDKPlatformName): (printHelpAndExitForRunAndDebugWebKitAppIfNeeded): Canonical link: https://commits.webkit.org/285197@main
1 parent 2ff609d commit e2f7bd5

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

Diff for: ReadMe.md

+10
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,16 @@ run-safari --debug --ios-simulator
142142

143143
In both cases, if you have built release builds instead, use `--release` instead of `--debug`.
144144

145+
To run other applications, for example MobileMiniBrowser, with your local build of WebKit, run the following command:
146+
147+
``` shell
148+
Tools/Scripts/run-webkit-app --debug --iphone-simulator <application-path>
149+
```
150+
151+
#### Using Xcode
152+
153+
Open `WebKit.xcworkspace`, select intended scheme such as MobileMiniBrowser and an iOS simulator as target, click run.
154+
145155
### Linux Ports
146156

147157
If you have a development build, you can use the `run-minibrowser` script, e.g.:

Diff for: Tools/Scripts/webkitdirs.pm

+6-3
Original file line numberDiff line numberDiff line change
@@ -984,9 +984,11 @@ sub determineXcodeSDKPlatformName {
984984
$xcodeSDKPlatformNameExplanation ||= "via argument, `--simulator`";
985985
$simulatorIdiom = 'iPhone';
986986
}
987-
if (checkForArgumentAndRemoveFromARGV("--ios-simulator")) {
987+
if (checkForArgumentAndRemoveFromARGV("--iphone-simulator") ||
988+
checkForArgumentAndRemoveFromARGV("--ios-simulator")) {
989+
# `--ios-simulator` option checking is for compatible here.
988990
$xcodeSDKPlatformName ||= 'iphonesimulator';
989-
$xcodeSDKPlatformNameExplanation ||= "via argument, `--ios-simulator`";
991+
$xcodeSDKPlatformNameExplanation ||= "via argument, `--iphone-simulator`";
990992
$simulatorIdiom = 'iPhone';
991993
}
992994
if (checkForArgumentAndRemoveFromARGV("--ipad-simulator")) {
@@ -2999,9 +3001,10 @@ sub printHelpAndExitForRunAndDebugWebKitAppIfNeeded
29993001
return unless checkForArgumentAndRemoveFromARGV("--help");
30003002

30013003
print STDERR <<EOF;
3002-
Usage: @{[basename($0)]} [options] [args ...]
3004+
Usage: @{[basename($0)]} [options] <application-path>
30033005
--help Show this help message
30043006
--no-saved-state Launch the application without state restoration
3007+
--debug|release build configuration
30053008
30063009
Options specific to macOS:
30073010
-g|--guard-malloc Enable Guard Malloc

0 commit comments

Comments
 (0)