mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
Documentation: Add instructions for debugging Ladybird with Xcode
This commit is contained in:
parent
1c01856021
commit
840afbb55f
Notes:
sideshowbarker
2024-07-17 06:28:38 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/840afbb55f Pull-request: https://github.com/SerenityOS/serenity/pull/18052 Reviewed-by: https://github.com/linusg
2 changed files with 25 additions and 1 deletions
|
@ -34,7 +34,7 @@ nix-shell ladybird.nix
|
|||
|
||||
On macOS:
|
||||
|
||||
Note that XCode 13.x does not have sufficient C++20 support to build ladybird. XCode 14.x or clang from homebrew may be required to successfully build ladybird.
|
||||
Note that Xcode 13.x does not have sufficient C++20 support to build ladybird. Xcode 14.x or clang from homebrew may be required to successfully build ladybird.
|
||||
|
||||
```
|
||||
xcode-select --install
|
||||
|
@ -119,6 +119,30 @@ export SERENITY_SOURCE_DIR=$(realpath ../)
|
|||
./Build/ladybird/ladybird # or, in macOS: open ./Build/ladybird/ladybird.app
|
||||
```
|
||||
|
||||
### Debugging with Xcode on macOS
|
||||
|
||||
The `serenity.sh` build script does not know how to generate Xcode projects, so creating the project must be done manually.
|
||||
To be compatible with the script, a few extra options are required. If there is a previous Lagom build directory, CMake will likely complain that the generator has changed.
|
||||
|
||||
```
|
||||
cmake -GXcode -S Meta/Lagom -B Build/lagom -DBUILD_LAGOM=ON -DENABLE_LAGOM_LADBIRD=ON
|
||||
```
|
||||
|
||||
Alternatively, if you don't need your ladybird build to be compatible with `serenity.sh`, you can use Ladybird as the source directory like so:
|
||||
|
||||
```
|
||||
cmake -GXcode -S Ladybird -B Build/ladybird
|
||||
```
|
||||
|
||||
After generating an Xcode project into the specified build directory, you can open `ladbyird.xcodeproj` in Xcode. The project has a ton of targets, many of which are generated code.
|
||||
The only target that needs a scheme is the ladybird app bundle.
|
||||
|
||||
In order for the application to launch properly through Xcode, the `SERENITY_SOURCE_DIR` environment variable must be set to your serenity checkout in the ladybird scheme, per the
|
||||
screenshot below. The same is true for profiling the application in Instruments. Future updates might fill out the application bundle such that the environment variable is not required.
|
||||
|
||||
![Modify Scheme...](Xcode_ladybird_Scheme.png)
|
||||
|
||||
|
||||
### Building on OpenIndiana
|
||||
|
||||
OpenIndiana needs some extra environment variables set to make sure it finds all the executables
|
||||
|
|
BIN
Documentation/Xcode_ladybird_Scheme.png
Normal file
BIN
Documentation/Xcode_ladybird_Scheme.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 93 KiB |
Loading…
Reference in a new issue