mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:47:45 +00:00
Ports: Allow ports to specify working directory when run from launcher
This commit is contained in:
parent
05e7b338ad
commit
66c039c66f
1 changed files with 6 additions and 3 deletions
|
@ -76,6 +76,7 @@ auth_opts=()
|
||||||
launcher_name=
|
launcher_name=
|
||||||
launcher_category=
|
launcher_category=
|
||||||
launcher_command=
|
launcher_command=
|
||||||
|
launcher_workdir=
|
||||||
launcher_run_in_terminal=false
|
launcher_run_in_terminal=false
|
||||||
icon_file=
|
icon_file=
|
||||||
|
|
||||||
|
@ -204,18 +205,19 @@ install_icon() {
|
||||||
|
|
||||||
install_main_launcher() {
|
install_main_launcher() {
|
||||||
if [ -n "$launcher_name" ] && [ -n "$launcher_category" ] && [ -n "$launcher_command" ]; then
|
if [ -n "$launcher_name" ] && [ -n "$launcher_category" ] && [ -n "$launcher_command" ]; then
|
||||||
install_launcher "$launcher_name" "$launcher_category" "$launcher_command"
|
install_launcher "$launcher_name" "$launcher_category" "$launcher_command" "$launcher_workdir"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
install_launcher() {
|
install_launcher() {
|
||||||
if [ "$#" -lt 3 ]; then
|
if [ "$#" -lt 4 ]; then
|
||||||
echo "Syntax: install_launcher <name> <category> <command>"
|
echo "Syntax: install_launcher <name> <category> <command> <workdir>"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
local launcher_name="$1"
|
local launcher_name="$1"
|
||||||
local launcher_category="$2"
|
local launcher_category="$2"
|
||||||
local launcher_command="$3"
|
local launcher_command="$3"
|
||||||
|
local launcher_workdir="$4"
|
||||||
local launcher_filename="${launcher_name,,}"
|
local launcher_filename="${launcher_name,,}"
|
||||||
launcher_filename="${launcher_filename// /}"
|
launcher_filename="${launcher_filename// /}"
|
||||||
local icon_override=""
|
local icon_override=""
|
||||||
|
@ -240,6 +242,7 @@ SCRIPT
|
||||||
Name=$launcher_name
|
Name=$launcher_name
|
||||||
Executable=$launcher_executable
|
Executable=$launcher_executable
|
||||||
Category=$launcher_category
|
Category=$launcher_category
|
||||||
|
WorkingDirectory=$launcher_workdir
|
||||||
RunInTerminal=$launcher_run_in_terminal
|
RunInTerminal=$launcher_run_in_terminal
|
||||||
${icon_override}
|
${icon_override}
|
||||||
CONFIG
|
CONFIG
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue