2025-03-11 04:55:16 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "cli_parsers.hpp"
|
|
|
|
#include <dpmdk/include/CommonModuleAPI.hpp>
|
|
|
|
#include <filesystem>
|
2025-03-15 09:12:18 +00:00
|
|
|
#include "package_staging.hpp"
|
2025-03-21 01:27:41 +00:00
|
|
|
#include <map>
|
|
|
|
#include <sstream>
|
2025-03-11 04:55:16 +00:00
|
|
|
|
|
|
|
/**
|
2025-03-13 00:05:59 +00:00
|
|
|
* @brief Handler for the stage command
|
2025-03-11 04:55:16 +00:00
|
|
|
*
|
2025-03-13 00:05:59 +00:00
|
|
|
* Processes arguments and stages a DPM package.
|
2025-03-11 04:55:16 +00:00
|
|
|
*
|
|
|
|
* @param argc Number of arguments
|
|
|
|
* @param argv Array of arguments
|
|
|
|
* @return 0 on success, non-zero on failure
|
|
|
|
*/
|
2025-03-13 00:05:59 +00:00
|
|
|
int cmd_stage(int argc, char** argv);
|
2025-03-11 04:55:16 +00:00
|
|
|
|
2025-03-17 03:16:40 +00:00
|
|
|
/**
|
|
|
|
* @brief Handler for the manifest command
|
|
|
|
*
|
|
|
|
* Generates or refreshes package manifest.
|
|
|
|
*
|
|
|
|
* @param argc Number of arguments
|
|
|
|
* @param argv Array of arguments
|
|
|
|
* @return 0 on success, non-zero on failure
|
|
|
|
*/
|
|
|
|
int cmd_manifest(int argc, char** argv);
|
|
|
|
|
2025-03-11 04:55:16 +00:00
|
|
|
/**
|
|
|
|
* @brief Handler for the help command
|
|
|
|
*
|
|
|
|
* Displays information about available commands in the build module.
|
|
|
|
*
|
|
|
|
* @param argc Number of arguments
|
|
|
|
* @param argv Array of arguments
|
|
|
|
* @return 0 on success, non-zero on failure
|
|
|
|
*/
|
2025-03-11 05:08:55 +00:00
|
|
|
int cmd_help(int argc, char** argv);
|
|
|
|
|
2025-03-14 01:30:02 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Handler for the help command
|
|
|
|
*
|
|
|
|
* Displays information about available commands in the build module.
|
|
|
|
*
|
|
|
|
* @param argc Number of arguments
|
|
|
|
* @param argv Array of arguments
|
|
|
|
* @return 0 on success, non-zero on failure
|
|
|
|
*/
|
|
|
|
int cmd_stage_help(int argc, char** argv);
|
|
|
|
|
2025-03-17 03:16:40 +00:00
|
|
|
/**
|
|
|
|
* @brief Handler for the manifest help command
|
|
|
|
*
|
|
|
|
* Displays information about manifest command options.
|
|
|
|
*
|
|
|
|
* @param argc Number of arguments
|
|
|
|
* @param argv Array of arguments
|
|
|
|
* @return 0 on success, non-zero on failure
|
|
|
|
*/
|
|
|
|
int cmd_manifest_help(int argc, char** argv);
|
2025-03-14 01:30:02 +00:00
|
|
|
|
2025-03-11 05:08:55 +00:00
|
|
|
/**
|
|
|
|
* @brief Handler for unknown commands
|
|
|
|
*
|
|
|
|
* Displays an error message for unrecognized commands.
|
|
|
|
*
|
|
|
|
* @param command The unrecognized command string
|
|
|
|
* @param argc Number of arguments
|
|
|
|
* @param argv Array of arguments
|
|
|
|
* @return 1 to indicate failure
|
|
|
|
*/
|
2025-03-13 00:05:59 +00:00
|
|
|
int cmd_unknown(const char* command, int argc, char** argv);
|