diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2025-03-09 05:17:07 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2025-03-09 05:17:07 +0100 |
| commit | eab0c97a968cc4c0aa77c61185df25884a99357f (patch) | |
| tree | 61559a978adf3ad05fdb2012b0ce1605a602c210 /public/tools/make_app/src/CommandLine.cc | |
| parent | 5bf5213bc1f2adf5e3a9e707fb4026ded95fcc14 (diff) | |
ADD: Fixes and tweaks of CLI programs.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'public/tools/make_app/src/CommandLine.cc')
| -rw-r--r-- | public/tools/make_app/src/CommandLine.cc | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/public/tools/make_app/src/CommandLine.cc b/public/tools/make_app/src/CommandLine.cc index cb014842..984251a5 100644 --- a/public/tools/make_app/src/CommandLine.cc +++ b/public/tools/make_app/src/CommandLine.cc @@ -57,23 +57,31 @@ 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)); FsCreateDir(StrFmt("{}{}", path, kExecDirectory)); + if (MmStrCmp(ext, kStepsExtension) == 0) + { + FsCreateFile(StrFmt("{}{}{}{}", path, kRootDirectory, "_setup")); + + auto handle = IoOpenFile(StrFmt("{}{}{}{}", path, kRootDirectory, "_setup", kStepsExtension), nullptr); + + struct STEPS_COMMON_RECORD record + { + 0 + }; + + record.setup_magic = 0xAABB; + record.setup_version = 1; + + IoWriteFile(handle, (void*)&record, sizeof(STEPS_COMMON_RECORD)); + IoCloseFile(handle); + + handle = nullptr; + } + for (SInt32 i = 0; i < files.Count(); ++i) { auto& file = files[i]; |
