diff --git a/Ladybird/Documentation/BuildInstructions.md b/Documentation/LadybirdBuildInstructions.md similarity index 84% rename from Ladybird/Documentation/BuildInstructions.md rename to Documentation/LadybirdBuildInstructions.md index bf727ff49e..3e5ab71084 100644 --- a/Ladybird/Documentation/BuildInstructions.md +++ b/Documentation/LadybirdBuildInstructions.md @@ -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 -``` - -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: - -``` -cmake -GNinja -B Build -DSERENITY_SOURCE_DIR=/path/to/serenity -ninja -C Build run +cmake -GNinja -S Ladybird -B Build/ladybird +cmake --build Build/ladybird +ninja -C Build/ladybird run ``` To automatically run in gdb: ``` -ninja -C Build debug +ninja -C Build/ladybird debug ``` To run without ninja rule: ``` -# or your existing serenity checkout /path/to/serenity -export SERENITY_SOURCE_DIR=${PWD}/Build/serenity -./Build/ladybird # or, in macOS: open ./Build/ladybird.app +export SERENITY_SOURCE_DIR=$(realpath ../) +./Build/ladybird/ladybird # or, in macOS: open ./Build/ladybird/ladybird.app +``` + +However, if you already have a serenity build, you might want to enable ladybird as part of your pre-existing build directories: + +``` +# From /path/to/serenity +./Meta/serenity.sh run lagom ladybird +./Meta/serenity.sh debug lagom ladybird +``` + +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: + +``` +cmake -S Meta/Lagom -B Build/lagom -DENABLE_LAGOM_LADYBIRD=OFF -DENABLE_LAGOM_LIBWEB=OFF ``` ## Experimental Android Build Steps @@ -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 ``` diff --git a/Ladybird/README.md b/Ladybird/README.md index 99dc3c907c..5a97393112 100644 --- a/Ladybird/README.md +++ b/Ladybird/README.md @@ -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).