diff --git a/CMakeLists.txt b/CMakeLists.txt index 534162f1..ba045021 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,8 @@ option(WITH_HTTPD "HTTP REST API" OFF) option(WITH_CC_CLIENT "CC Client" ON) option(WITH_CC_SERVER "CC Server" ON) option(WITH_TLS "TLS support" ON) +set(MINER_EXECUTABLE_NAME "xmrigMiner" CACHE STRING "Miner executable file name") +set(DAEMON_EXECUTABLE_NAME "xmrigDaemon" CACHE STRING "Daemon executable file name") include (CheckIncludeFile) include (cmake/cpu.cmake) @@ -104,6 +106,7 @@ endif() add_definitions(/D__STDC_FORMAT_MACROS) add_definitions(/DUNICODE) +add_definitions(/DMINER_EXECUTABLE_NAME=${MINER_EXECUTABLE_NAME}) #add_definitions(/DAPP_DEBUG) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake") @@ -217,6 +220,7 @@ if (WITH_CC_SERVER OR WITH_CC_CLIENT) endif (WITH_CC_SERVER OR WITH_CC_CLIENT) add_executable(xmrigMiner ${SOURCES} ${SOURCES_CRYPTO} ${HTTPD_SOURCES} ${SOURCES_CC_CLIENT} res/app.rc) +set_target_properties(xmrigMiner PROPERTIES OUTPUT_NAME ${MINER_EXECUTABLE_NAME}) target_link_libraries(xmrigMiner xmrig_common xmrig_os_dependencies xmrig_cpuid ${UV_LIBRARIES} ${MHD_LIBRARY} ${EXTRA_LIBS} ${CPUID_LIB}) @@ -230,6 +234,7 @@ if (WITH_TLS) endif (WITH_TLS) add_executable(xmrigDaemon src/cc/XMRigd.cpp res/app.rc) +set_target_properties(xmrigDaemon PROPERTIES OUTPUT_NAME ${DAEMON_EXECUTABLE_NAME}) if (WITH_CC_SERVER AND MHD_FOUND) add_library(xmrig_common_cc STATIC ${SOURCES_COMMON}) diff --git a/README.md b/README.md index fb27a7dc..ca209ba5 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ The modified version can also handle commands like "update config", "start/stop Full Windows/Linux compatible, and you can mix Linux and Windows miner on one XMRigCCServer. ## Additional features of XMRigCC (on top of XMRig) +* **NEW: Full SSL/TLS support** * Command and control server * CC Dashboard with: * statistics of all connected miners @@ -201,7 +202,6 @@ This will limit multihash mode (multihash-factor = 2) to thread 0 and thread 2, ## Other information * No HTTP support, only stratum protocol support. -* No TLS support. ### CPU mining performance diff --git a/src/cc/XMRigd.cpp b/src/cc/XMRigd.cpp index 34494148..2f08e612 100644 --- a/src/cc/XMRigd.cpp +++ b/src/cc/XMRigd.cpp @@ -36,16 +36,22 @@ #include #endif +#ifndef MINER_EXECUTABLE_NAME + #define MINER_EXECUTABLE_NAME xmrigMiner +#endif +#define VALUE_TO_STRING(x) #x +#define VALUE(x) VALUE_TO_STRING(x) + int main(int argc, char **argv) { std::string ownPath(argv[0]); #if defined(_WIN32) || defined(WIN32) int pos = ownPath.rfind('\\'); - std::string xmrigMiner("xmrigMiner.exe"); + std::string xmrigMiner( VALUE(MINER_EXECUTABLE_NAME) ".exe"); #else int pos = ownPath.rfind('/'); - std::string xmrigMiner("xmrigMiner"); + std::string xmrigMiner( VALUE(MINER_EXECUTABLE_NAME) ); #endif std::string xmrigMinerPath = ownPath.substr(0, pos+1) + xmrigMiner;