From eab0c97a968cc4c0aa77c61185df25884a99357f Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sun, 9 Mar 2025 05:17:07 +0100 Subject: ADD: Fixes and tweaks of CLI programs. Signed-off-by: Amlal El Mahrouss --- public/tools/make_app/src/CommandLine.cc | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) (limited to 'public/tools/make_app/src/CommandLine.cc') 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]; -- cgit v1.2.3