2015-06-10 02:40:03 +00:00
|
|
|
#ifndef CTOOL_PACKAGE
|
|
|
|
#define CTOOL_PACKAGE
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <string>
|
|
|
|
#include "ToolBase.hpp"
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
class ToolPackage final : public ToolBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ToolPackage(const ToolPassInfo& info)
|
|
|
|
: ToolBase(info)
|
|
|
|
{
|
2015-07-08 04:26:29 +00:00
|
|
|
if (!info.project)
|
|
|
|
LogModule.report(LogVisor::FatalError, "hecl package must be ran within a project directory");
|
2015-06-10 02:40:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
~ToolPackage()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
static void Help(HelpOutput& help)
|
|
|
|
{
|
|
|
|
help.secHead(_S("NAME"));
|
|
|
|
help.beginWrap();
|
2015-07-22 19:14:50 +00:00
|
|
|
help.wrap(_S("hecl-pack\n")
|
|
|
|
_S("hecl-package - Package objects within the project database\n"));
|
2015-06-10 02:40:03 +00:00
|
|
|
help.endWrap();
|
|
|
|
|
|
|
|
help.secHead(_S("SYNOPSIS"));
|
|
|
|
help.beginWrap();
|
|
|
|
help.wrap(_S("hecl package [-a] [-o <package-out>] [<input-dir>]\n"));
|
|
|
|
help.endWrap();
|
|
|
|
|
|
|
|
help.secHead(_S("DESCRIPTION"));
|
|
|
|
help.beginWrap();
|
2015-07-22 19:14:50 +00:00
|
|
|
help.wrap(_S("This command initiates a packaging pass on the project database. Packaging ")
|
|
|
|
_S("is analogous to linking in software development. All objects necessary to ")
|
|
|
|
_S("generate a complete package are gathered, grouped, and indexed within an .hlpk file.\n"));
|
2015-06-10 02:40:03 +00:00
|
|
|
help.endWrap();
|
|
|
|
|
|
|
|
help.secHead(_S("OPTIONS"));
|
|
|
|
help.optionHead(_S("<dir>"), _S("input directory"));
|
|
|
|
help.beginWrap();
|
2015-07-22 19:14:50 +00:00
|
|
|
help.wrap(_S("Specifies a project subdirectory to root the resulting package from. ")
|
|
|
|
_S("If any dependent-files fall outside this subdirectory, they will implicitly ")
|
|
|
|
_S("be gathered and packaged.\n"));
|
2015-06-10 02:40:03 +00:00
|
|
|
help.endWrap();
|
|
|
|
|
|
|
|
help.optionHead(_S("-o <package-out>"), _S("output package file"));
|
|
|
|
help.beginWrap();
|
2015-07-22 19:14:50 +00:00
|
|
|
help.wrap(_S("Specifies a target path to write the package. If not specified, the package ")
|
|
|
|
_S("is written into <project-root>/out/<relative-input-dirs>/<input-dir>.hlpk\n"));
|
2015-06-10 02:40:03 +00:00
|
|
|
help.endWrap();
|
|
|
|
|
|
|
|
help.optionHead(_S("-a"), _S("auto cook"));
|
|
|
|
help.beginWrap();
|
2015-07-22 19:14:50 +00:00
|
|
|
help.wrap(_S("Any referenced objects that haven't already been cooked are automatically cooked as ")
|
|
|
|
_S("part of the packaging process. If this flag is omitted, the packaging process will abort.\n"));
|
2015-06-10 02:40:03 +00:00
|
|
|
help.endWrap();
|
|
|
|
}
|
|
|
|
|
|
|
|
HECL::SystemString toolName() const {return _S("package");}
|
|
|
|
|
|
|
|
int run()
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CTOOL_PACKAGE
|