From 0e02279b5d008daec78f0355352743bb22373fbd Mon Sep 17 00:00:00 2001 From: Federico Guerinoni Date: Mon, 3 Jun 2024 21:15:01 +0200 Subject: [PATCH] Documentation: Update instruction for building with QtCreator --- Documentation/QtCreatorConfiguration.md | 8 ++++---- Meta/refresh-ladybird-qtcreator.sh | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) create mode 100755 Meta/refresh-ladybird-qtcreator.sh diff --git a/Documentation/QtCreatorConfiguration.md b/Documentation/QtCreatorConfiguration.md index dd50a0737b1..d10db054084 100644 --- a/Documentation/QtCreatorConfiguration.md +++ b/Documentation/QtCreatorConfiguration.md @@ -11,8 +11,8 @@ First, make sure you have a working toolchain and can build and run SerenityOS. * Wait for the file list to generate. This can take a minute or two! * Ignore the file list, we will overwrite it later. Click Next. * Set `Add to version control` to ``. Click Finish. -* In your shell, go to your SerenityOS project directory, and invoke the `Meta/refresh-serenity-qtcreator.sh` script to regenerate the `serenity.files` file. You will also have to do this every time you delete or add a new file to the project. -* Edit the `serenity.config` file (In Qt Creator, hit ^K or CMD+K on a Mac to open the search dialog, type the name of the file and hit return to open it) +* In your shell, go to your SerenityOS project directory, and invoke the `Meta/refresh-ladybird-qtcreator.sh` script to regenerate the `ladybird.files` file. You will also have to do this every time you delete or add a new file to the project. +* Edit the `ladybird.config` file (In Qt Creator, hit ^K or CMD+K on a Mac to open the search dialog, type the name of the file and hit return to open it) * Add the following `#define`s to the file: ``` #define ENABLE_UNICODE_DATA 1 @@ -22,8 +22,8 @@ First, make sure you have a working toolchain and can build and run SerenityOS. #define SANITIZE_PTRS 1 #define __SSE__ ``` -* Edit the `serenity.cxxflags` file to say `-std=c++23 -fsigned-char -fconcepts -fno-exceptions -fno-semantic-interposition -fPIC` -* Edit the `serenity.includes` file to list the following lines: +* Edit the `ladybird.cxxflags` file to say `-std=c++23 -fsigned-char -fconcepts -fno-exceptions -fno-semantic-interposition -fPIC` +* Edit the `ladybird.includes` file to list the following lines: ``` ./ Userland/ diff --git a/Meta/refresh-ladybird-qtcreator.sh b/Meta/refresh-ladybird-qtcreator.sh new file mode 100755 index 00000000000..53bb2462c1c --- /dev/null +++ b/Meta/refresh-ladybird-qtcreator.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +set -e + +if [ -z "$LADYBIRD_SOURCE_DIR" ] +then + LADYBIRD_SOURCE_DIR="$(git rev-parse --show-toplevel)" + echo "Ladybird root not set. This is fine! Other scripts may require you to set the environment variable first, e.g.:" + echo " export LADYBIRD_SOURCE_DIR=${LADYBIRD_SOURCE_DIR}" +fi + +cd "${LADYBIRD_SOURCE_DIR}" + +find . \( -name Base -o -name Patches -o -name Ports -o -name Root -o -name Toolchain -o -name Build \) -prune -o \( -name '*.ipc' -or -name '*.cpp' -or -name '*.idl' -or -name '*.c' -or -name '*.h' -or -name '*.in' -or -name '*.S' -or -name '*.css' -or -name '*.cmake' -or -name '*.json' -or -name '*.gml' -or -name 'CMakeLists.txt' \) -print > ladybird.files