texturec: Added version info.

This commit is contained in:
Branimir Karadžić
2017-05-10 18:17:29 -07:00
parent 80ae33da89
commit 5a7c9e4fc3
5 changed files with 20 additions and 1 deletions

View File

@@ -9,6 +9,8 @@
#include <stdint.h> // uint32_t
#include <stdlib.h> // NULL
#define BIMG_API_VERSION 1
namespace bx
{
struct AllocatorI;

1
tools/bin/darwin/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
*

1
tools/bin/linux/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
*

1
tools/bin/windows/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
*

View File

@@ -384,6 +384,14 @@ bimg::ImageContainer* convert(bx::AllocatorI* _allocator, const void* _inputData
return output;
}
#define BIMG_TEXTUREC_VERSION_MAJOR 1
#define BIMG_TEXTUREC_VERSION_MINOR 0
#define BIMG_TEXTUREC_VERSION_STR \
BX_STRINGIZE(BIMG_TEXTUREC_VERSION_MAJOR) \
"." BX_STRINGIZE(BIMG_TEXTUREC_VERSION_MINOR) \
"." BX_STRINGIZE(BIMG_API_VERSION)
void help(const char* _error = NULL)
{
if (NULL != _error)
@@ -392,7 +400,7 @@ void help(const char* _error = NULL)
}
fprintf(stderr
, "texturec, bgfx texture compiler tool\n"
, "texturec, bgfx texture compiler tool, version " BIMG_TEXTUREC_VERSION_STR "\n"
"Copyright 2011-2017 Branimir Karadzic. All rights reserved.\n"
"License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause\n\n"
);
@@ -430,6 +438,12 @@ int main(int _argc, const char* _argv[])
{
bx::CommandLine cmdLine(_argc, _argv);
if (cmdLine.hasArg('v', "version") )
{
fprintf(stderr, "texturec, bgfx texture compiler tool, version " BIMG_TEXTUREC_VERSION_STR "\n");
return EXIT_SUCCESS;
}
if (cmdLine.hasArg('h', "help") )
{
help();