summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/CMakeLists.txt23
-rw-r--r--src/common/logging/backend.cpp1
-rw-r--r--src/common/logging/log.h1
-rw-r--r--src/common/scm_rev.cpp.in2
-rw-r--r--src/common/scm_rev.h1
5 files changed, 28 insertions, 0 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 592911c2b..26c83efda 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -1,4 +1,27 @@
# Generate cpp with Git revision from template
+# Also if this is a CI build, add the build name (ie: Nightly, Bleeding Edge) to the scm_rev file as well
+set(REPO_NAME "")
+if ($ENV{CI})
+ if ($ENV{TRAVIS})
+ set(BUILD_REPOSITORY $ENV{TRAVIS_REPO_SLUG})
+ elseif($ENV{APPVEYOR})
+ set(BUILD_REPOSITORY $ENV{APPVEYOR_REPO_NAME})
+ endif()
+ # regex capture the string nightly or bleeding-edge into CMAKE_MATCH_1
+ string(REGEX MATCH "citra-emu/citra-?(.*)" OUTVAR ${BUILD_REPOSITORY})
+ if (${CMAKE_MATCH_COUNT} GREATER 0)
+ # capitalize the first letter of each word in the repo name.
+ string(REPLACE "-" ";" REPO_NAME_LIST ${CMAKE_MATCH_1})
+ foreach(WORD ${REPO_NAME_LIST})
+ string(SUBSTRING ${WORD} 0 1 FIRST_LETTER)
+ string(SUBSTRING ${WORD} 1 -1 REMAINDER)
+ string(TOUPPER ${FIRST_LETTER} FIRST_LETTER)
+ # this leaves a trailing space on the last word, but we actually want that
+ # because of how its styled in the title bar.
+ set(REPO_NAME "${REPO_NAME}${FIRST_LETTER}${REMAINDER} ")
+ endforeach()
+ endif()
+endif()
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/scm_rev.cpp.in" "${CMAKE_CURRENT_SOURCE_DIR}/scm_rev.cpp" @ONLY)
set(SRCS
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp
index 0ea65e817..737e1d57f 100644
--- a/src/common/logging/backend.cpp
+++ b/src/common/logging/backend.cpp
@@ -55,6 +55,7 @@ namespace Log {
SUB(Service, DSP) \
SUB(Service, DLP) \
SUB(Service, HID) \
+ SUB(Service, HTTP) \
SUB(Service, SOC) \
SUB(Service, IR) \
SUB(Service, Y2R) \
diff --git a/src/common/logging/log.h b/src/common/logging/log.h
index a590d39ff..4b0f8ff03 100644
--- a/src/common/logging/log.h
+++ b/src/common/logging/log.h
@@ -72,6 +72,7 @@ enum class Class : ClassType {
Service_DSP, ///< The DSP (DSP control) service
Service_DLP, ///< The DLP (Download Play) service
Service_HID, ///< The HID (Human interface device) service
+ Service_HTTP, ///< The HTTP service
Service_SOC, ///< The SOC (Socket) service
Service_IR, ///< The IR service
Service_Y2R, ///< The Y2R (YUV to RGB conversion) service
diff --git a/src/common/scm_rev.cpp.in b/src/common/scm_rev.cpp.in
index 79b404bb8..0080db5d5 100644
--- a/src/common/scm_rev.cpp.in
+++ b/src/common/scm_rev.cpp.in
@@ -7,12 +7,14 @@
#define GIT_REV "@GIT_REV@"
#define GIT_BRANCH "@GIT_BRANCH@"
#define GIT_DESC "@GIT_DESC@"
+#define BUILD_NAME "@REPO_NAME@"
namespace Common {
const char g_scm_rev[] = GIT_REV;
const char g_scm_branch[] = GIT_BRANCH;
const char g_scm_desc[] = GIT_DESC;
+const char g_build_name[] = BUILD_NAME;
} // namespace
diff --git a/src/common/scm_rev.h b/src/common/scm_rev.h
index 0ef190afa..e22389803 100644
--- a/src/common/scm_rev.h
+++ b/src/common/scm_rev.h
@@ -9,5 +9,6 @@ namespace Common {
extern const char g_scm_rev[];
extern const char g_scm_branch[];
extern const char g_scm_desc[];
+extern const char g_build_name[];
} // namespace