Skip to content

Commit

Permalink
Documentation: Move Ladybird BuildInstructions to Documentation
Browse files Browse the repository at this point in the history
Update Ladybird/README.md at the same time to reflect its new monorepo
status.
  • Loading branch information
ADKaster committed Dec 25, 2022
1 parent e8c2f67 commit e79e7dc
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,33 +42,38 @@ sudo apt install qt6-wayland

## Build steps

Basic workflow, using serenity source dir cloned from github:
Basic workflow, if you only want to build Ladybird

```
cmake -GNinja -B Build
cmake --build Build
ninja -C Build run
cmake -GNinja -S Ladybird -B Build/ladybird
cmake --build Build/ladybird
ninja -C Build/ladybird run
```

Advanced workflow, using pre-existing serenity checkout.

If you previously didn't set SERENITY_SOURCE_DIR, probably want to blast the Build directory before doing this:
To automatically run in gdb:
```
ninja -C Build/ladybird debug
```

To run without ninja rule:
```
cmake -GNinja -B Build -DSERENITY_SOURCE_DIR=/path/to/serenity
ninja -C Build run
export SERENITY_SOURCE_DIR=$(realpath ../)
./Build/ladybird/ladybird # or, in macOS: open ./Build/ladybird/ladybird.app
```

To automatically run in gdb:
However, if you already have a serenity build, you might want to enable ladybird as part of your pre-existing build directories:

```
ninja -C Build debug
# From /path/to/serenity
./Meta/serenity.sh run lagom ladybird
./Meta/serenity.sh debug lagom ladybird
```

To run without ninja rule:
Doing so will re-build Lagom LibWeb and ladybird whenever you change any related serenity library source code. To disable this after
enabling it, simply disable LibWeb and ladybird on the Lagom binary directory:

```
# or your existing serenity checkout /path/to/serenity
export SERENITY_SOURCE_DIR=${PWD}/Build/serenity
./Build/ladybird # or, in macOS: open ./Build/ladybird.app
cmake -S Meta/Lagom -B Build/lagom -DENABLE_LAGOM_LADYBIRD=OFF -DENABLE_LAGOM_LIBWEB=OFF
```

## Experimental Android Build Steps
Expand All @@ -88,18 +93,10 @@ The build configuration was tested with the following packages from the Android
* Android System Images for API 33 aka ``"system-images;android-33;google-apis;x86_64"``
* Android NDK 24.0.8215888 for the llvm-14 based toolchain

In order to build ladybird for cross compilation, a separate serenity checkout is recommended.

e.g.
```
cd ~/Repos
git clone https://github.com/SerenityOS/serenity
```

First create a LagomTools build:

```
cmake -GNinja -S /path/to/serenity -B BuildTools -Dpackage=LagomTools -DCMAKE_INSTALL_PREFIX=tool-install
cmake -GNinja -S /path/to/serenity/Meta/Lagom -B BuildTools -Dpackage=LagomTools -DCMAKE_INSTALL_PREFIX=tool-install
ninja -C BuildTools install
```

Expand Down
4 changes: 1 addition & 3 deletions Ladybird/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

Ladybird is a web browser built on the [LibWeb](https://github.com/SerenityOS/serenity/tree/master/Userland/Libraries/LibWeb) and [LibJS](https://github.com/SerenityOS/serenity/tree/master/Userland/Libraries/LibJS) engines from [SerenityOS](https://github.com/SerenityOS/serenity) with a cross-platform GUI in Qt.

This is part of the greater SerenityOS project, and the separate repository may eventually be integrated in the [serenity](https://github.com/SerenityOS/serenity) monorepo.

For more information about Ladybird, see [this blog post](https://awesomekling.github.io/Ladybird-a-new-cross-platform-browser-project/).

See [build instructions](Documentation/BuildInstructions.md).
See [build instructions](../Documentation/LadybirdBuildInstructions.md).

0 comments on commit e79e7dc

Please sign in to comment.