mirror of https://github.com/AxioDL/metaforce.git
codebase cleanups
This commit is contained in:
parent
0b5cd024d2
commit
cd0b2f0926
|
@ -9,6 +9,9 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "HECL/Database.hpp"
|
#include "HECL/Database.hpp"
|
||||||
|
#include "LogVisor/LogVisor.hpp"
|
||||||
|
|
||||||
|
extern LogVisor::LogModule LogModule;
|
||||||
|
|
||||||
struct ToolPassInfo
|
struct ToolPassInfo
|
||||||
{
|
{
|
||||||
|
@ -71,7 +74,10 @@ private:
|
||||||
++it;
|
++it;
|
||||||
}
|
}
|
||||||
if (counter == WRAP_INDENT)
|
if (counter == WRAP_INDENT)
|
||||||
it = string.insert(it, WRAP_INDENT, _S(' ')) + WRAP_INDENT;
|
{
|
||||||
|
string.insert(it, WRAP_INDENT, _S(' '));
|
||||||
|
it += WRAP_INDENT;
|
||||||
|
}
|
||||||
if (it >= string.end())
|
if (it >= string.end())
|
||||||
return;
|
return;
|
||||||
if (*it != _S('\n'))
|
if (*it != _S('\n'))
|
||||||
|
|
|
@ -50,10 +50,10 @@ public:
|
||||||
}
|
}
|
||||||
catch (HECL::Exception& e)
|
catch (HECL::Exception& e)
|
||||||
{
|
{
|
||||||
HECL::FPrintf(stderr, _S("unable to init project: '%s'\n"), e.swhat());
|
LogModule.report(LogVisor::Error, _S("unable to init project: '%s'\n"), e.swhat());
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
HECL::Printf(_S("initialized project at '%s/.hecl'\n"), m_dir->c_str());
|
LogModule.report(LogVisor::Info, _S("initialized project at '%s/.hecl'\n"), m_dir->c_str());
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
|
TEMPLATE = app
|
||||||
TARGET = hecl
|
TARGET = hecl
|
||||||
CONFIG -= Qt
|
CONFIG -= Qt
|
||||||
|
CONFIG += c++11
|
||||||
QT =
|
QT =
|
||||||
LIBS -= -lQtGui -lQtCore
|
LIBS -= -lQtGui -lQtCore
|
||||||
unix:QMAKE_CXXFLAGS += -std=c++11
|
|
||||||
unix:LIBS += -std=c++11
|
|
||||||
clang:QMAKE_CXXFLAGS += -stdlib=libc++
|
|
||||||
clang:LIBS += -stdlib=libc++ -lc++abi
|
|
||||||
|
|
||||||
INCLUDEPATH += ../include ../extern/Athena/include ../extern
|
INCLUDEPATH += ../include \
|
||||||
|
../extern/Athena/include \
|
||||||
|
../extern/LogVisor/include \
|
||||||
|
../extern
|
||||||
|
|
||||||
LIBPATH += $$OUT_PWD/../lib \
|
LIBPATH += $$OUT_PWD/../lib \
|
||||||
$$OUT_PWD/../blender \
|
$$OUT_PWD/../blender \
|
||||||
|
|
|
@ -6,6 +6,9 @@
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include "HECL/Database.hpp"
|
#include "HECL/Database.hpp"
|
||||||
|
#include "LogVisor/LogVisor.hpp"
|
||||||
|
|
||||||
|
LogVisor::LogModule LogModule("HECLDriver");
|
||||||
|
|
||||||
#include "ToolBase.hpp"
|
#include "ToolBase.hpp"
|
||||||
#include "ToolInit.hpp"
|
#include "ToolInit.hpp"
|
||||||
|
@ -21,6 +24,7 @@
|
||||||
|
|
||||||
bool XTERM_COLOR = false;
|
bool XTERM_COLOR = false;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#define HECL_GIT 1234567
|
#define HECL_GIT 1234567
|
||||||
#define HECL_GIT_S "1234567"
|
#define HECL_GIT_S "1234567"
|
||||||
|
@ -164,9 +168,9 @@ int main(int argc, const char** argv)
|
||||||
}
|
}
|
||||||
catch (HECL::Exception& ex)
|
catch (HECL::Exception& ex)
|
||||||
{
|
{
|
||||||
HECL::FPrintf(stderr,
|
LogModule.report(LogVisor::Error,
|
||||||
_S("Unable to open discovered project at '%s':\n%s\n"),
|
_S("Unable to open discovered project at '%s':\n%s\n"),
|
||||||
rootPath->getAbsolutePath().c_str(), ex.swhat());
|
rootPath->getAbsolutePath().c_str(), ex.swhat());
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -202,14 +206,14 @@ int main(int argc, const char** argv)
|
||||||
}
|
}
|
||||||
catch (HECL::Exception& ex)
|
catch (HECL::Exception& ex)
|
||||||
{
|
{
|
||||||
HECL::FPrintf(stderr,
|
LogModule.report(LogVisor::Error, _S("Unable to construct HECL tool '%s':\n%s\n"),
|
||||||
_S("Unable to construct HECL tool '%s':\n%s\n"),
|
toolName.c_str(), ex.swhat());
|
||||||
toolName.c_str(), ex.swhat());
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info.verbosityLevel)
|
if (info.verbosityLevel)
|
||||||
HECL::Printf(_S("Constructed tool '%s' %d\n"), tool->toolName().c_str(), info.verbosityLevel);
|
LogModule.report(LogVisor::Info, _S("Constructed tool '%s' %d\n"),
|
||||||
|
tool->toolName().c_str(), info.verbosityLevel);
|
||||||
|
|
||||||
/* Run tool */
|
/* Run tool */
|
||||||
int retval;
|
int retval;
|
||||||
|
@ -219,7 +223,8 @@ int main(int argc, const char** argv)
|
||||||
}
|
}
|
||||||
catch (HECL::Exception& ex)
|
catch (HECL::Exception& ex)
|
||||||
{
|
{
|
||||||
HECL::FPrintf(stderr, _S("Error running HECL tool '%s':\n%s\n"), toolName.c_str(), ex.swhat());
|
LogModule.report(LogVisor::Error, _S("Error running HECL tool '%s':\n%s\n"),
|
||||||
|
toolName.c_str(), ex.swhat());
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,11 +3,6 @@ CONFIG += staticlib c++11
|
||||||
TARGET = hecl
|
TARGET = hecl
|
||||||
CONFIG -= Qt
|
CONFIG -= Qt
|
||||||
QT =
|
QT =
|
||||||
unix:QMAKE_CXXFLAGS += -std=c++11
|
|
||||||
unix:QMAKE_CFLAGS += -std=c99
|
|
||||||
unix:LIBS += -std=c++11
|
|
||||||
clang:QMAKE_CXXFLAGS += -stdlib=libc++
|
|
||||||
clang:LIBS += -stdlib=libc++ -lc++abi
|
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD ../include ../extern ../extern/Athena/include
|
INCLUDEPATH += $$PWD ../include ../extern ../extern/Athena/include
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue