summaryrefslogtreecommitdiffhomepage
path: root/public/tools
diff options
context:
space:
mode:
Diffstat (limited to 'public/tools')
-rw-r--r--public/tools/make_app/src/CommandLine.cc2
-rw-r--r--public/tools/open/src/CommandLine.cc13
2 files changed, 9 insertions, 6 deletions
diff --git a/public/tools/make_app/src/CommandLine.cc b/public/tools/make_app/src/CommandLine.cc
index a4d655aa..ea22fb26 100644
--- a/public/tools/make_app/src/CommandLine.cc
+++ b/public/tools/make_app/src/CommandLine.cc
@@ -22,7 +22,7 @@ int main(int argc, char* argv[])
if (MmStrCmp(argv[i], "-h") == 0)
{
PrintOut(nullptr, "%s", "make_app: Framework/Application Creation Tool.\n");
- PrintOut(nullptr, "%s", "make_app: © Amlal EL Mahrouss, All rights reserved.\n");
+ PrintOut(nullptr, "%s", "make_app: © 2024-2025 Amlal EL Mahrouss, All rights reserved.\n");
PrintOut(nullptr, "%s", "make_app: -a: Application format.\n");
PrintOut(nullptr, "%s", "make_app: -s: Steps (Setup pages) format.\n");
diff --git a/public/tools/open/src/CommandLine.cc b/public/tools/open/src/CommandLine.cc
index 1f9d8f3c..32606ce2 100644
--- a/public/tools/open/src/CommandLine.cc
+++ b/public/tools/open/src/CommandLine.cc
@@ -7,12 +7,13 @@
#include <user/SystemCalls.h>
/// @brief This program opens an application from **OPEN_APP_BASE_PATH**
+/// @file CommandLine.cc
#define OPEN_APP_APP_FLAG "-a"
#define OPEN_APP_HELP_FLAG "-h"
#define OPEN_APP_BASE_PATH "/app/"
-int main(int argc, char* argv[])
+SInt32 main(SInt32 argc, Char* argv[])
{
if (argc == 1)
return EXIT_FAILURE;
@@ -21,10 +22,10 @@ int main(int argc, char* argv[])
{
if (MmStrCmp(argv[i], OPEN_APP_HELP_FLAG) == 0)
{
- PrintOut(nullptr, "open: Open Tool.\n");
- PrintOut(nullptr, "open: © Amlal EL Mahrouss, All rights reserved.\n");
+ PrintOut(nullptr, "open: open .app(s) directories.\n");
+ PrintOut(nullptr, "open: © 2024-2025 Amlal EL Mahrouss, All rights reserved.\n");
- PrintOut(nullptr, "open: %s: Application is taken as input (opens a PEF/PE32+/ELF program depending on architecture).\n", OPEN_APP_APP_FLAG);
+ PrintOut(nullptr, "open: %s: App is being taken as the input (opens a PEF/PE32+/ELF program depending on the CPU architecture).\n", OPEN_APP_APP_FLAG);
return EXIT_SUCCESS;
}
@@ -32,11 +33,13 @@ int main(int argc, char* argv[])
{
if ((i + 1) == argc)
return EXIT_FAILURE;
+ else if ((i + 2) == argc)
+ return EXIT_FAILURE;
Char base_path[FILE_MAX_LEN] = OPEN_APP_BASE_PATH;
MmCopyMemory(base_path + MmStrLen(OPEN_APP_BASE_PATH), argv[i + 1], MmStrLen(argv[i + 1]));
- UIntPtr ret = RtlSpawnProcess(base_path, 0, nullptr, nullptr, 0);
+ UIntPtr ret = RtlSpawnProcess(StrFmt("{}/dist/{]}", base_path, argv[i + 2]), 0, nullptr, nullptr, 0);
return ret;
}