mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +00:00
Meta: Allow ladybird.sh
to run any target in the MacOS app bundle
Previously, using `ladybird.sh run` with any target that was part of the MacOS app bundle would try to run the given executable from the wrong directory.
This commit is contained in:
parent
0bedc79ca5
commit
b634683662
Notes:
github-actions[bot]
2024-09-23 17:12:36 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/b6346836622 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1436 Reviewed-by: https://github.com/ADKaster ✅
1 changed files with 8 additions and 8 deletions
|
@ -208,7 +208,11 @@ build_and_run_lagom_target() {
|
|||
local lagom_args=("${CMD_ARGS[@]:1}")
|
||||
|
||||
if [ -z "$lagom_target" ]; then
|
||||
lagom_target="ladybird"
|
||||
lagom_target="Ladybird"
|
||||
fi
|
||||
|
||||
if [ "$lagom_target" = "ladybird" ]; then
|
||||
lagom_target="Ladybird"
|
||||
fi
|
||||
|
||||
# FIXME: Find some way to centralize these b/w CMakePresets.json, CI files, Documentation and here.
|
||||
|
@ -219,14 +223,10 @@ build_and_run_lagom_target() {
|
|||
|
||||
build_target "${lagom_target}"
|
||||
|
||||
if [ "$lagom_target" = "ladybird" ] && [ "$(uname -s)" = "Darwin" ]; then
|
||||
"$BUILD_DIR/bin/Ladybird.app/Contents/MacOS/Ladybird" "${lagom_args[@]}"
|
||||
if [[ "$lagom_target" =~ ^(headless-browser|ImageDecoder|Ladybird|RequestServer|WebContent|WebDriver|WebWorker)$ ]] && [ "$(uname -s)" = "Darwin" ]; then
|
||||
"$BUILD_DIR/bin/Ladybird.app/Contents/MacOS/$lagom_target" "${lagom_args[@]}"
|
||||
else
|
||||
local lagom_bin="$lagom_target"
|
||||
if [ "$lagom_bin" = "ladybird" ]; then
|
||||
lagom_bin="Ladybird"
|
||||
fi
|
||||
"$BUILD_DIR/bin/$lagom_bin" "${lagom_args[@]}"
|
||||
"$BUILD_DIR/bin/$lagom_target" "${lagom_args[@]}"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue