diff --git a/CMakeLists.txt b/CMakeLists.txt index 7f707fa..1282b01 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1 +1,4 @@ -cmake_minimum_required(VERSION 3.0) \ No newline at end of file +cmake_minimum_required(VERSION 3.0) +project(llo-stage-one) +add_subdirectory(demo/) +add_library(${PROJECT_NAME} src/deconstructor.cpp) \ No newline at end of file diff --git a/demo/CMakeLists.txt b/demo/CMakeLists.txt new file mode 100644 index 0000000..1185f49 --- /dev/null +++ b/demo/CMakeLists.txt @@ -0,0 +1,14 @@ +cmake_minimum_required(VERSION 3.0) +project(llo-stage-one-demo) + +set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_FLAGS -Winvalid-constexpr) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + +if(MSVC) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17") +endif(MSVC) + +include_directories(dependencies/cli-parser/ dependencies/linux-pe/includes/) +add_executable(${PROJECT_NAME} src/main.cpp) \ No newline at end of file diff --git a/demo/src/main.cpp b/demo/src/main.cpp new file mode 100644 index 0000000..0289977 --- /dev/null +++ b/demo/src/main.cpp @@ -0,0 +1,30 @@ +#include +#include "cli-parser.hpp" +#include "linuxpe" + +int main(int argc, const char** argv) +{ + argparse::argument_parser_t cli_parser("llo-stage-one demo", "CLI, LLO, stage one demo..."); + cli_parser + .add_argument() + .names({"-i", "--input"}) + .required(true) + .description("input file, must be a file format supported by stage one modules..."); + + cli_parser.enable_help(); + auto err = cli_parser.parse(argc, argv); + + if (err) + { + std::cout << err << std::endl; + return -1; + } + + if ( cli_parser.exists( "help" ) ) + { + cli_parser.print_help(); + return 0; + } + + // win::dos_header_t image_dos; +} \ No newline at end of file diff --git a/include/deconstructor.hpp b/include/deconstructor.hpp index d7a976c..06308fb 100644 --- a/include/deconstructor.hpp +++ b/include/deconstructor.hpp @@ -5,6 +5,6 @@ namespace llo::s1 class dctor_base_t { public: - dctor_base_t(); + }; } \ No newline at end of file