Commit graph

15 commits

Author SHA1 Message Date
Ben Wiederhake
51b42e0463 Meta: Make QtCreator aware of all CMake files 2021-09-15 20:21:19 +00:00
Panagiotis Vasilopoulos
e45e0eeb47 Everywhere: Replace SERENITY_ROOT with SERENITY_SOURCE_DIR 2021-04-20 15:27:52 +02:00
Ben Wiederhake
b46da5c2cb Meta: Make CMakeLists accessible to QtCreator
We end up having to edit various CMakeLists.txt all the time, and having to open
them in a different editor becomes old quite fast.
2021-02-21 22:34:09 +01:00
Andreas Kling
822dc56ef3 LibGUI: Introduce GML - a simple GUI Markup Language :^)
This patch replaces the UI-from-JSON mechanism with a more
human-friendly DSL.

The current implementation simply converts the GML into a JSON object
that can be consumed by GUI::Widget::load_from_json(). The parser is
not very helpful if you make a mistake.

The language offers a very simple way to instantiate any registered
Core::Object class by simply saying @ClassName

@GUI::Label {
    text: "Hello friends!"
    tooltip: ":^)"
}

Layouts are Core::Objects and can be assigned to the "layout" property:

@GUI::Widget {
    layout: @GUI::VerticalBoxLayout {
        spacing: 2
        margins: [8, 8, 8, 8]
    }
}

And finally, child objects are simply nested within their parent:

@GUI::Widget {
    layout: @GUI::HorizontalBoxLayout {
    }
    @GUI::Button {
        text: "OK"
    }
    @GUI::Button {
        text: "Cancel"
    }
}

This feels a *lot* more pleasant to write than the JSON we had. The fact
that no new code was being written with the JSON mechanism was pretty
telling, so let's approach this with developer convenience in mind. :^)
2020-12-20 11:59:40 +01:00
Andreas Kling
2b17d980cf Meta: Include .json files in the Qt Creator refresh script 2020-09-14 19:55:18 +02:00
Andreas Kling
370624bc37 Meta: Actually exclude the Build/ directory from QtCreator refresh 2020-08-16 16:44:09 +02:00
Ben Wiederhake
f19b88c965 Meta: Don't require setting SERENITY_ROOT for refresh script
The need for SERENITY_ROOT was basically eliminated in
73c953b674. The existing guess
'git rev-parse --show-toplevel' should be correct in all conceivable cases.
Most code just assumes the layout in git, or depends on SERENITY_ROOT as
set in the CMakeLists.txt. *Requiring* the user to set it doesn't make
sense anymore.

While I was in there anyway, I added exit code propagation. Also, 'find' should
be a tad faster now, because it doesn't enumerate files in the large ignored
directories Build/ and Toolchain/ anymore.
2020-08-15 13:38:24 +02:00
Andreas Kling
fbfae033cc Meta: Tweak QtCreator .files sync script to include .idl files 2020-06-21 00:58:55 +02:00
Shannon Booth
fe668db999 Meta: Fix shellcheck warnings in various scripts
Warnings fixed:
 * SC2086: Double quote to prevent globbing and word splitting.
 * SC2006: Use $(...) notation instead of legacy backticked `...`
 * SC2039: In POSIX sh, echo flags are undefined
 * SC2209: Use var=$(command) to assign output (or quote to assign string)
 * SC2164: Use 'cd ... || exit' or 'cd ... || return' in case cd fails
 * SC2166: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
 * SC2034: i appears unused. Verify use (or export if used externally)
 * SC2046: Quote this to prevent word splitting.
 * SC2236: Use -z instead of ! -n.

There are still a lot of warnings in Kernel/run about:
 - SC2086: Double quote to prevent globbing and word splitting.

However, splitting on space is intentional in this case, and not trivial to
change. Therefore ignore the warning for now - but we should fix this in
the future.
2020-02-10 10:46:25 +01:00
Emanuel Sprung
462e223c3d Meta: Fix typo + suggest value of export variable.
The variable is not set anymore by the UseIt.sh script, so if a user doesn't
have it set in the .bashrc or .zshrc file already, it's not working properly.
2020-01-25 09:09:52 +01:00
anon
d058a9319d Meta: refresh-serenity-qtcreator.sh now checks if SERENITY_ROOT is set 2019-12-24 11:12:00 +01:00
Andreas Kling
06ee24263c Meta: The Qt Creator .files refresh script should pick up .c files 2019-11-23 16:50:21 +01:00
George Pickering
704f48d7f3 POSIX compliance: (most) shell scripts converted to generic shell
Ports/.port_include.sh, Toolchain/BuildIt.sh, Toolchain/UseIt.sh
have been left largely untouched due to use of Bash-exclusive
functions and variables such as $BASH_SOURCE, pushd and popd.
2019-11-03 09:26:22 +01:00
Andreas Kling
b8cab2a934 Meta: Tweak the Qt Creator project updater a bit 2019-09-28 22:57:46 +02:00
Andreas Kling
37d30d7b2b Meta: Add the script I use to refresh my Qt Creator project files 2019-08-16 16:39:56 +02:00