summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmlal <amlalelmahrouss@icloud.com>2024-12-14 16:30:27 +0100
committerAmlal <amlalelmahrouss@icloud.com>2024-12-14 16:30:27 +0100
commitc51737aad748d7ee00231bb58f61aefe04e480fb (patch)
treefbe1b2de1a3693520765a894867b11152ff38b87
parent3e9c2c93214f960a3ef3a6f1533e005df588f75b (diff)
Add dry_run field support.
Signed-off-by: Amlal <amlalelmahrouss@icloud.com>
-rw-r--r--BTBKit/IManifestBuilder.h2
-rw-r--r--BTBKit/JSONManifestBuilder.h2
-rw-r--r--BTBKit/Macros.h2
-rw-r--r--ReadMe.md11
-rw-r--r--cli/ManifestCLI.cc (renamed from cli/ManifestBuilder.cc)8
-rw-r--r--src/IManifestBuilder.cc2
-rw-r--r--src/JSONManifestBuilder.cc22
7 files changed, 29 insertions, 20 deletions
diff --git a/BTBKit/IManifestBuilder.h b/BTBKit/IManifestBuilder.h
index 48ef3e2..95d9e88 100644
--- a/BTBKit/IManifestBuilder.h
+++ b/BTBKit/IManifestBuilder.h
@@ -1,6 +1,6 @@
// ============================================================= //
// btb
-// Copyright (C) 2024, ELMH Group, all rights reserved.
+// Copyright (C) 2024, Theater Quality Inc, all rights reserved.
// ============================================================= //
#pragma once
diff --git a/BTBKit/JSONManifestBuilder.h b/BTBKit/JSONManifestBuilder.h
index 1975a68..10d0857 100644
--- a/BTBKit/JSONManifestBuilder.h
+++ b/BTBKit/JSONManifestBuilder.h
@@ -1,6 +1,6 @@
// ============================================================= //
// btb
-// Copyright (C) 2024, ELMH Group, all rights reserved.
+// Copyright (C) 2024, Theater Quality Inc, all rights reserved.
// ============================================================= //
#pragma once
diff --git a/BTBKit/Macros.h b/BTBKit/Macros.h
index 15986fb..64dcd55 100644
--- a/BTBKit/Macros.h
+++ b/BTBKit/Macros.h
@@ -1,6 +1,6 @@
// ============================================================= //
// btb
-// Copyright (C) 2024, ELMH Group, all rights reserved.
+// Copyright (C) 2024, Theater Quality Inc, all rights reserved.
// ============================================================= //
#pragma once
diff --git a/ReadMe.md b/ReadMe.md
index 3d9599e..1bea1e4 100644
--- a/ReadMe.md
+++ b/ReadMe.md
@@ -1,17 +1,16 @@
# BTB.
-A tool by ELMH Group to build libraries and programs.
-
## Installation requirements:
-- GNU C++ Compiler.
+- GNU C++
+- GNU Make
-## Steps (makefile):
+## Steps (GNU Make):
- Run make `build-btb-core` and `build-btb`.
-## Steps (btb):
+## Steps (BTB && OpenBTB):
- Run `btb` and pass the path to the manifest file.
-###### Copyright (C) 2024, ELMH Group, all rights reserved. All rights reserved. \ No newline at end of file
+###### Copyright (C) 2024, Theater Quality Inc, all rights reserved. All rights reserved. \ No newline at end of file
diff --git a/cli/ManifestBuilder.cc b/cli/ManifestCLI.cc
index ee05410..01ac73e 100644
--- a/cli/ManifestBuilder.cc
+++ b/cli/ManifestCLI.cc
@@ -1,6 +1,6 @@
// ============================================================= //
// btb
-// Copyright (C) 2024, ELMH Group, all rights reserved.
+// Copyright (C) 2024, Theater Quality Inc, all rights reserved.
// ============================================================= //
#include <JSONManifestBuilder.h>
@@ -22,10 +22,10 @@ int main(int argc, char** argv)
index_path == "--version")
{
std::cout << "Usage: btb <file>\n";
- std::cout << "Check for issues at: www.el-mahrouss-logic.com/btb/issues\n";
+ std::cout << "Check for issues at: el-mahrouss-logic.com/developer/issues\n";
- std::cout << "Brought to you by ELMH Group.\n";
- std::cout << "© ELMH Group, all rights reserved.\n";
+ std::cout << "Brought to you by Theater Quality Inc.\n";
+ std::cout << "© Theater Quality Inc, all rights reserved.\n";
return 0;
}
diff --git a/src/IManifestBuilder.cc b/src/IManifestBuilder.cc
index 20604de..c649afe 100644
--- a/src/IManifestBuilder.cc
+++ b/src/IManifestBuilder.cc
@@ -1,6 +1,6 @@
// ============================================================= //
// btb
-// Copyright (C) 2024, ELMH Group, all rights reserved.
+// Copyright (C) 2024, Theater Quality Inc, all rights reserved.
// ============================================================= //
#include <IManifestBuilder.h>
diff --git a/src/JSONManifestBuilder.cc b/src/JSONManifestBuilder.cc
index d737dcb..358f990 100644
--- a/src/JSONManifestBuilder.cc
+++ b/src/JSONManifestBuilder.cc
@@ -1,6 +1,6 @@
// ============================================================= //
// btb
-// Copyright (C) 2024, ELMH Group, all rights reserved.
+// Copyright (C) 2024, Theater Quality Inc, all rights reserved.
// ============================================================= //
#include <JSONManifestBuilder.h>
@@ -86,6 +86,16 @@ bool JSONManifestBuilder::buildTarget(int arg_sz, const char* arg_val, const boo
std::cout << "btb: output path: " << target << "\n";
std::cout << "btb: command: " << command << "\n";
+ try
+ {
+ if (json_obj["dry_run"].get<bool>())
+ return true;
+ }
+ catch (...)
+ {
+
+ }
+
if (dry_run)
{
return true;
@@ -105,7 +115,7 @@ bool JSONManifestBuilder::buildTarget(int arg_sz, const char* arg_val, const boo
{
if (target.ends_with(".so"))
{
- std::cout << "btb: error: can't open DLL/SO, it mayn't contain an entrypoint." << std::endl;
+ std::cout << "btb: error: can't open dynamic library, it may not have an entrypoint." << std::endl;
return true;
}
else if (target.ends_with(".dll"))
@@ -119,19 +129,19 @@ bool JSONManifestBuilder::buildTarget(int arg_sz, const char* arg_val, const boo
ss.str()[1] == 'o' &&
ss.str()[2] == 'y' &&
ss.str()[3] == '!')
- std::cout << "btb: error: can't open Joy! DLL, it maynt't contain an entrypoint." << std::endl;
+ std::cout << "btb: error: can't open Joy! dynamic library, it maynt't contain an entrypoint." << std::endl;
else if (ss.str()[0] == '!' &&
ss.str()[1] == 'y' &&
ss.str()[2] == 'o' &&
ss.str()[3] == 'J')
- std::cout << "btb: error: can't open !yoJ DLL, it maynt't contain an entrypoint." << std::endl;
+ std::cout << "btb: error: can't open !yoJ dynamic library, it maynt't contain an entrypoint." << std::endl;
else if (ss.str()[0] == 'M' &&
ss.str()[1] == 'Z')
- std::cout << "btb: error: can't open MZ DLL, it maynt't contain an entrypoint." << std::endl;
+ std::cout << "btb: error: can't open MZ dynamic library, it maynt't contain an entrypoint." << std::endl;
else if (ss.str()[0] == 0x7F &&
ss.str()[1] == 'E')
{
- std::cout << "btb: error: can't open ELF DLL, it maynt't contain an entrypoint." << std::endl;
+ std::cout << "btb: error: can't open ELF dynamic library, it maynt't contain an entrypoint." << std::endl;
}
return true;