diff --git a/renderdoc/Makefile b/renderdoc/Makefile index fbcd883b1..ea510187c 100644 --- a/renderdoc/Makefile +++ b/renderdoc/Makefile @@ -1,10 +1,10 @@ CC=gcc CPP=g++ +COMMIT=`git rev-parse HEAD` MACROS=-DLINUX \ -DRENDERDOC_PLATFORM=linux \ -DRENDERDOC_EXPORTS \ - -DGIT_COMMIT_HASH='"'$$(git rev-parse HEAD)'"' \ - -DRENDERDOC_VERSION_STRING='"0.21"' + -DGIT_COMMIT_HASH="\"$(COMMIT)\"" CFLAGS=-c -Wall -Werror -Wno-unknown-pragmas -Wno-error=format -fPIC $(MACROS) -I. CPPFLAGS=-std=c++11 -g -Wno-unused -Wno-unknown-pragmas -Wno-reorder -fvisibility=hidden -fvisibility-inlines-hidden LDFLAGS=-lpthread -lrt -shared -ldl -lX11 diff --git a/renderdoc/core/core.cpp b/renderdoc/core/core.cpp index 01fa3a57b..2b109076f 100644 --- a/renderdoc/core/core.cpp +++ b/renderdoc/core/core.cpp @@ -30,10 +30,7 @@ #include -#ifdef WIN32 -#include "data/resource.h" -#endif - +#include "data/version.h" #include "crash_handler.h" template<> diff --git a/renderdoc/data/resource.h b/renderdoc/data/resource.h index a22d5de6b..0ac4ca753 100644 --- a/renderdoc/data/resource.h +++ b/renderdoc/data/resource.h @@ -24,12 +24,8 @@ #define STRINGIZE(a) STRINGIZE2(a) #endif -#define RENDERDOC_VERSION_MAJOR 0 -#define RENDERDOC_VERSION_MINOR 21 #define GIT_COMMIT_HASH "NO_GIT_COMMIT_HASH_DEFINED" //#define RENDERDOC_OFFICIAL_BUILD // used to determine whether to submit auto crash reports -#define RENDERDOC_VERSION_STRING STRINGIZE(RENDERDOC_VERSION_MAJOR) "." STRINGIZE(RENDERDOC_VERSION_MINOR) -#define RENDERDOC_VERSION_STRING_W WIDEN(STRINGIZE(RENDERDOC_VERSION_MAJOR)) L"." WIDEN(STRINGIZE(RENDERDOC_VERSION_MINOR)) // Next default values for new objects // @@ -41,3 +37,5 @@ #define _APS_NEXT_SYMED_VALUE 101 #endif #endif + +#include "version.h" diff --git a/renderdoc/data/version.h b/renderdoc/data/version.h new file mode 100644 index 000000000..49308cebc --- /dev/null +++ b/renderdoc/data/version.h @@ -0,0 +1,30 @@ +/****************************************************************************** + * The MIT License (MIT) + * + * Copyright (c) 2014 Baldur Karlsson + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + ******************************************************************************/ + +#pragma once + +#define RENDERDOC_VERSION_MAJOR 0 +#define RENDERDOC_VERSION_MINOR 21 +#define RENDERDOC_VERSION_STRING STRINGIZE(RENDERDOC_VERSION_MAJOR) "." STRINGIZE(RENDERDOC_VERSION_MINOR) +#define RENDERDOC_VERSION_STRING_W WIDEN(STRINGIZE(RENDERDOC_VERSION_MAJOR)) L"." WIDEN(STRINGIZE(RENDERDOC_VERSION_MINOR)) diff --git a/renderdoc/renderdoc.vcxproj b/renderdoc/renderdoc.vcxproj index ba10b676b..ac0f77d83 100644 --- a/renderdoc/renderdoc.vcxproj +++ b/renderdoc/renderdoc.vcxproj @@ -243,6 +243,7 @@ + diff --git a/renderdoc/renderdoc.vcxproj.filters b/renderdoc/renderdoc.vcxproj.filters index 9c20c7491..868d5090e 100644 --- a/renderdoc/renderdoc.vcxproj.filters +++ b/renderdoc/renderdoc.vcxproj.filters @@ -303,6 +303,9 @@ 3rdparty\stb + + Resources + diff --git a/renderdoccmd/Makefile b/renderdoccmd/Makefile index e4d7a6fee..402a07c03 100644 --- a/renderdoccmd/Makefile +++ b/renderdoccmd/Makefile @@ -1,10 +1,10 @@ CC=gcc CPP=g++ +COMMIT=`git rev-parse HEAD` MACROS=-DLINUX \ -DRENDERDOC_PLATFORM=linux \ -DRENDERDOC_EXPORTS \ - -DGIT_COMMIT_HASH='"'$$(git rev-parse HEAD)'"' \ - -DRENDERDOC_VERSION_STRING='"0.21"' + -DGIT_COMMIT_HASH="\"$(COMMIT)\"" CFLAGS=-c -Wall -Werror -fPIC $(MACROS) -I../renderdoc/ CPPFLAGS=-std=c++11 -g -Wno-unused -Wno-unknown-pragmas -Wno-reorder LDFLAGS=-L../renderdoc -lrenderdoc -lGL