45 int main(
int argc,
char** argv)
49 std::string logFileName;
51 bool updateVer =
false;
55 std::string yymmVer =
"";
59 ParseCmdLineArgs(argc, argv, logFileName, logLevel, updateVer, incVer, majVer, minVer, yymmVer, buildVer);
78 else if (majVer != -1 && minVer != -1 && yymmVer !=
"" && buildVer != -1)
80 SetVersion(ver, majVer, minVer, yymmVer, buildVer);
82 else if (majVer != -1 || minVer != -1 || yymmVer !=
"" || buildVer != -1)
void ParseCmdLineArgs(int &argc, char **argv, std::string &logFileName, std::string &logLevel, bool &updateVer, bool &incVer, int &majVer, int &minVer, std::string &yymmVer, int &buildVer)
std::string ToString() const
Converts this exception to a string.
void SetBuildVersion(int build)
Sets the Build part of the version string.
static const std::string EXE_NAME
void SetMinorVersion(int min)
Sets the Minor part of the version string.
This is the exception class used throughout the engine.
void IncrementVersion()
Increments the version number of the build by one and sets the YYMM to current date.
void UpdateVersion()
Updates the version file to the most recent HG/Git Revision and YTMM.
void SetVersion(int maj, int min, std::string yymm, int build)
Sets the version numbers.
A string wrapper that will make sure that all of the strings with the same value will point to the sa...
void SaveVersionFile()
Saves the version file currently in RAM to default location.
static const trUtil::RefStr TR_NEW_VERSION("\rue Reality Engine New Version : ")
TR_UTIL_EXPORT void CreateUserDataPathTree()
Creates all the folders in the Data (TR_USER_DATA) folder, that includes Maps, GUI, Shaders, StaticMeshes, etc etc.
void LogException(trUtil::Logging::LogLevel level=trUtil::Logging::LogLevel::LOG_ERROR) const
Logs the exception to the default logger.
void SetMajorVersion(int maj)
Sets the Major part of the version string.
int main(int argc, char **argv)
Software's main function.
void TR_UTIL_EXPORT TextColor(TXT_COLOR TextColor)
Changes Text color in the console window....
A utility to read and control the engines version numbers.
#define LOG_E(msg)
Log an ERROR message.
void SetYYMMVersion(std::string yymm)
Sets the Year/Month part of the version string.
void SetVersion(trUtil::VersionUtil &ver, int maj, int min, std::string yymm, int build)
Sets all the version numbers.
std::string GetVersionString()
Returns the full version string.
void UpdateVersion(trUtil::VersionUtil &ver)
Updates the version from the current .hg revision and YYMM.
void IncremenetVersion(trUtil::VersionUtil &ver)
Increments the version in the version file.
void TR_UTIL_EXPORT SetupLoggingOptions(const std::string &logFileName, const std::string &logLevel)
Sets up all the default logging options for the software.
static const trUtil::RefStr TR_CURRENT_VERSION("True Reality Engine Current version: ")
static const trUtil::RefStr TR_VERSION("True Reality v")