mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 01:51:03 +09: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: b634683662
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}")
|
local lagom_args=("${CMD_ARGS[@]:1}")
|
||||||
|
|
||||||
if [ -z "$lagom_target" ]; then
|
if [ -z "$lagom_target" ]; then
|
||||||
lagom_target="ladybird"
|
lagom_target="Ladybird"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$lagom_target" = "ladybird" ]; then
|
||||||
|
lagom_target="Ladybird"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# FIXME: Find some way to centralize these b/w CMakePresets.json, CI files, Documentation and here.
|
# 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}"
|
build_target "${lagom_target}"
|
||||||
|
|
||||||
if [ "$lagom_target" = "ladybird" ] && [ "$(uname -s)" = "Darwin" ]; then
|
if [[ "$lagom_target" =~ ^(headless-browser|ImageDecoder|Ladybird|RequestServer|WebContent|WebDriver|WebWorker)$ ]] && [ "$(uname -s)" = "Darwin" ]; then
|
||||||
"$BUILD_DIR/bin/Ladybird.app/Contents/MacOS/Ladybird" "${lagom_args[@]}"
|
"$BUILD_DIR/bin/Ladybird.app/Contents/MacOS/$lagom_target" "${lagom_args[@]}"
|
||||||
else
|
else
|
||||||
local lagom_bin="$lagom_target"
|
"$BUILD_DIR/bin/$lagom_target" "${lagom_args[@]}"
|
||||||
if [ "$lagom_bin" = "ladybird" ]; then
|
|
||||||
lagom_bin="Ladybird"
|
|
||||||
fi
|
|
||||||
"$BUILD_DIR/bin/$lagom_bin" "${lagom_args[@]}"
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue