diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2025-03-08 14:26:06 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2025-03-08 14:26:06 +0100 |
| commit | 990e50df4d26b54e35f56a54e06837fdf13f5019 (patch) | |
| tree | 45c8b970881ab60973bd2bf270aa2450af1573f5 | |
| parent | 933b23c1d0564a2287601947ebadd651f50a16f9 (diff) | |
ADD: Great tweaks on tooling.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
| -rw-r--r-- | public/tools/ld/ld.json (renamed from public/tools/ld/make_app.json) | 0 | ||||
| -rw-r--r-- | public/tools/ld/src/CommandLine.cc | 3 | ||||
| -rw-r--r-- | public/tools/make_app/Steps.h | 10 | ||||
| -rw-r--r-- | public/tools/make_app/src/CommandLine.cc | 12 |
4 files changed, 21 insertions, 4 deletions
diff --git a/public/tools/ld/make_app.json b/public/tools/ld/ld.json index f423df30..f423df30 100644 --- a/public/tools/ld/make_app.json +++ b/public/tools/ld/ld.json diff --git a/public/tools/ld/src/CommandLine.cc b/public/tools/ld/src/CommandLine.cc index 534fdb4e..dfd5709f 100644 --- a/public/tools/ld/src/CommandLine.cc +++ b/public/tools/ld/src/CommandLine.cc @@ -10,6 +10,9 @@ SInt32 main(SInt32 argc, Char* argv[]) { + if (argc < 3) + return ~0; + UIntPtr exit_code = RtlSpawnProcess(argv[1], argc - 2, argv + 2, nullptr, 0); diff --git a/public/tools/make_app/Steps.h b/public/tools/make_app/Steps.h index 224f038a..1aee1dfa 100644 --- a/public/tools/make_app/Steps.h +++ b/public/tools/make_app/Steps.h @@ -10,14 +10,16 @@ #include <Framework.h> #define kStepsExtension ".stp" +#define kStepsStrLen (256U) -struct StepsCommonRecord final +struct STEPS_COMMON_RECORD final { - Char setup_name[256U]; - Char setup_company[256U]; - Char setup_author[256U]; + Char setup_name[kStepsStrLen]; + Char setup_company[kStepsStrLen]; + Char setup_author[kStepsStrLen]; SInt32 setup_version; SInt32 setup_pages; + SInt32 setup_check_page, setup_eula_page; }; #endif // ifndef APPS_STEPS_H
\ No newline at end of file diff --git a/public/tools/make_app/src/CommandLine.cc b/public/tools/make_app/src/CommandLine.cc index 2df25d55..cb014842 100644 --- a/public/tools/make_app/src/CommandLine.cc +++ b/public/tools/make_app/src/CommandLine.cc @@ -57,6 +57,18 @@ int main(int argc, char* argv[]) auto path = argv[1]; + else if (MmStrCmp(ext, kStepsExtension) == 0) + { + FsCreateFile(FsCreateDir(StrFmt("{}{}{}{}", path, kRootDirectory, "_setup", kStepsExtension))); + auto handle = IoOpenFile(StrFmt("{}{}{}{}", path, kRootDirectory, "_setup", kStepsExtension), nullptr); + struct STEPS_COMMON_RECORD record{}; + + IoWriteFile(handle, (void*)&record, sizeof(STEPS_COMMON_RECORD)); + IoCloseFile(handle); + + handle = nullptr; + } + if (FsCreateDir(path)) { FsCreateDir(StrFmt("{}{}", path, kRootDirectory)); |
