mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 09:51:57 -05:00
fd86509ef8
The spawn_helper_process method was introduced together with get_paths_for_helper_process but was only ever used briefly to spawn WebContent. Other helper processes (SqlServer, headless_browser etc) are either execed or spawned with their own helpers & custom arguments.
22 lines
827 B
C++
22 lines
827 B
C++
/*
|
|
* Copyright (c) 2023, Andrew Kaster <akaster@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include "HelperProcess.h"
|
|
#include "Utilities.h"
|
|
#include <QCoreApplication>
|
|
|
|
ErrorOr<Vector<String>> get_paths_for_helper_process(StringView process_name)
|
|
{
|
|
auto application_path = TRY(ak_string_from_qstring(QCoreApplication::applicationDirPath()));
|
|
Vector<String> paths;
|
|
|
|
TRY(paths.try_append(TRY(String::formatted("./{}/{}", process_name, process_name))));
|
|
TRY(paths.try_append(TRY(String::formatted("{}/{}/{}", application_path, process_name, process_name))));
|
|
TRY(paths.try_append(TRY(String::formatted("{}/{}", application_path, process_name))));
|
|
TRY(paths.try_append(TRY(String::formatted("./{}", process_name))));
|
|
// NOTE: Add platform-specific paths here
|
|
return paths;
|
|
}
|