diff --git a/CMakeLists.txt b/CMakeLists.txt index 093731f190a380539cca3db8f8c12793d4b6557c..b0d6dafed7b30215ee74beb09c4cc15867e91c2a 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,6 @@ SET(TD_MEM_CHECK FALSE) SET(TD_PAGMODE_LITE FALSE) SET(TD_SOMODE_STATIC FALSE) -SET(TD_POWER FALSE) SET(TD_GODLL FALSE) SET(TD_COMMUNITY_DIR ${PROJECT_SOURCE_DIR}) diff --git a/cmake/define.inc b/cmake/define.inc index f29f9c4cd8e2314a0b6f1dd5e18d9ecdaed9f59e..35f32e8c1e71ac478a7e971fc3e47bac3b71e967 100755 --- a/cmake/define.inc +++ b/cmake/define.inc @@ -37,26 +37,6 @@ IF (TD_GODLL) ADD_DEFINITIONS(-D_TD_GO_DLL_) ENDIF () -IF (TD_POWER) - ADD_DEFINITIONS(-D_TD_POWER_) -ENDIF () - -IF (TD_TQ) - ADD_DEFINITIONS(-D_TD_TQ_) -ENDIF () - -IF (TD_PRO) - ADD_DEFINITIONS(-D_TD_PRO_) -ENDIF () - -IF (TD_KH) - ADD_DEFINITIONS(-D_TD_KH_) -ENDIF () - -IF (TD_JH) - ADD_DEFINITIONS(-D_TD_JH_) -ENDIF () - IF (TD_MEM_CHECK) ADD_DEFINITIONS(-DTAOS_MEM_CHECK) ENDIF () diff --git a/cmake/input.inc b/cmake/input.inc index bff76a567973633fd4d7c3df5dae4b1a8c334d39..7e97f1e1207f0e12c914990adcc3edd33d8a90d8 100755 --- a/cmake/input.inc +++ b/cmake/input.inc @@ -43,23 +43,6 @@ IF (${SOMODE} MATCHES "static") MESSAGE(STATUS "Link so using static mode") ENDIF () -IF (${DBNAME} MATCHES "power") - SET(TD_POWER TRUE) - MESSAGE(STATUS "power is true") -ELSEIF (${DBNAME} MATCHES "tq") - SET(TD_TQ TRUE) - MESSAGE(STATUS "tq is true") -ELSEIF (${DBNAME} MATCHES "pro") - SET(TD_PRO TRUE) - MESSAGE(STATUS "pro is true") -ELSEIF (${DBNAME} MATCHES "kh") - SET(TD_KH TRUE) - MESSAGE(STATUS "kh is true") -ELSEIF (${DBNAME} MATCHES "jh") - SET(TD_JH TRUE) - MESSAGE(STATUS "jh is true") -ENDIF () - IF (${DLLTYPE} MATCHES "go") SET(TD_GODLL TRUE) MESSAGE(STATUS "input dll type: " ${DLLTYPE}) diff --git a/cmake/install.inc b/cmake/install.inc index 3844198047d2a1d5b5e2fd75b0f5bc887c9e50ec..ec0746f507e71553f6f35354ddb5b306e594fc9f 100755 --- a/cmake/install.inc +++ b/cmake/install.inc @@ -3,19 +3,7 @@ IF (TD_LINUX) INSTALL(CODE "MESSAGE(\"make install script: ${TD_MAKE_INSTALL_SH}\")") INSTALL(CODE "execute_process(COMMAND bash ${TD_MAKE_INSTALL_SH} ${TD_COMMUNITY_DIR} ${PROJECT_BINARY_DIR} Linux ${TD_VER_NUMBER})") ELSEIF (TD_WINDOWS) - IF (TD_POWER) - SET(CMAKE_INSTALL_PREFIX C:/PowerDB) - ELSEIF (TD_TQ) - SET(CMAKE_INSTALL_PREFIX C:/TQueue) - ELSEIF (TD_PRO) - SET(CMAKE_INSTALL_PREFIX C:/ProDB) - ELSEIF (TD_KH) - SET(CMAKE_INSTALL_PREFIX C:/KingHistorian) - ELSEIF (TD_JH) - SET(CMAKE_INSTALL_PREFIX C:/jh_iot) - ELSE () - SET(CMAKE_INSTALL_PREFIX C:/TDengine) - ENDIF () + SET(CMAKE_INSTALL_PREFIX C:/TDengine) INSTALL(FILES ${TD_COMMUNITY_DIR}/src/inc/taos.h DESTINATION include) INSTALL(FILES ${TD_COMMUNITY_DIR}/src/inc/taoserror.h DESTINATION include) @@ -23,32 +11,15 @@ ELSEIF (TD_WINDOWS) INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/taos.exp DESTINATION driver) INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/taos.dll DESTINATION driver) - IF (TD_POWER) - INSTALL(FILES ${TD_COMMUNITY_DIR}/packaging/cfg/taos.cfg DESTINATION cfg) - INSTALL(FILES ${EXECUTABLE_OUTPUT_PATH}/power.exe DESTINATION .) - ELSEIF (TD_TQ) - INSTALL(FILES ${TD_COMMUNITY_DIR}/packaging/cfg/taos.cfg DESTINATION cfg) - INSTALL(FILES ${EXECUTABLE_OUTPUT_PATH}/tq.exe DESTINATION .) - ELSEIF (TD_PRO) - INSTALL(FILES ${TD_COMMUNITY_DIR}/packaging/cfg/taos.cfg DESTINATION cfg) - INSTALL(FILES ${EXECUTABLE_OUTPUT_PATH}/prodbc.exe DESTINATION .) - ELSEIF (TD_KH) - INSTALL(FILES ${TD_COMMUNITY_DIR}/packaging/cfg/kinghistorian.cfg DESTINATION cfg) - INSTALL(FILES ${EXECUTABLE_OUTPUT_PATH}/khclient.exe DESTINATION .) - ELSEIF (TD_JH) - INSTALL(FILES ${TD_COMMUNITY_DIR}/packaging/cfg/taos.cfg DESTINATION cfg) - INSTALL(FILES ${EXECUTABLE_OUTPUT_PATH}/jh_taos.exe DESTINATION .) - ELSE () - INSTALL(DIRECTORY ${TD_COMMUNITY_DIR}/src/connector/go DESTINATION connector) - INSTALL(DIRECTORY ${TD_COMMUNITY_DIR}/src/connector/nodejs DESTINATION connector) - INSTALL(DIRECTORY ${TD_COMMUNITY_DIR}/src/connector/python DESTINATION connector) - INSTALL(DIRECTORY ${TD_COMMUNITY_DIR}/src/connector/C\# DESTINATION connector) - INSTALL(DIRECTORY ${TD_COMMUNITY_DIR}/tests/examples DESTINATION .) + INSTALL(DIRECTORY ${TD_COMMUNITY_DIR}/src/connector/go DESTINATION connector) + INSTALL(DIRECTORY ${TD_COMMUNITY_DIR}/src/connector/nodejs DESTINATION connector) + INSTALL(DIRECTORY ${TD_COMMUNITY_DIR}/src/connector/python DESTINATION connector) + INSTALL(DIRECTORY ${TD_COMMUNITY_DIR}/src/connector/C\# DESTINATION connector) + INSTALL(DIRECTORY ${TD_COMMUNITY_DIR}/tests/examples DESTINATION .) - INSTALL(FILES ${TD_COMMUNITY_DIR}/packaging/cfg/taos.cfg DESTINATION cfg) - INSTALL(FILES ${EXECUTABLE_OUTPUT_PATH}/taos.exe DESTINATION .) - INSTALL(FILES ${EXECUTABLE_OUTPUT_PATH}/taosdemo.exe DESTINATION .) - ENDIF () + INSTALL(FILES ${TD_COMMUNITY_DIR}/packaging/cfg/taos.cfg DESTINATION cfg) + INSTALL(FILES ${EXECUTABLE_OUTPUT_PATH}/taos.exe DESTINATION .) + INSTALL(FILES ${EXECUTABLE_OUTPUT_PATH}/taosdemo.exe DESTINATION .) #INSTALL(TARGETS taos RUNTIME DESTINATION driver) #INSTALL(TARGETS shell RUNTIME DESTINATION .) diff --git a/packaging/cfg/jh_taos.cfg b/packaging/cfg/jh_taos.cfg new file mode 100644 index 0000000000000000000000000000000000000000..ba3fa8e462d2c9bcbb87046204cb7bd87fa27f9d --- /dev/null +++ b/packaging/cfg/jh_taos.cfg @@ -0,0 +1,286 @@ +######################################################## +# # +# jh_iot Configuration # +# Any questions, please email jhkj@njsteel.com.cn # +# # +######################################################## + +# first fully qualified domain name (FQDN) for jh_iot system +# firstEp hostname:6030 + +# local fully qualified domain name (FQDN) +# fqdn hostname + +# first port number for the connection (12 continuous UDP/TCP port number are used) +# serverPort 6030 + +# log file's directory +# logDir /var/log/jh_taos + +# data file's directory +# dataDir /var/lib/jh_taos + +# temporary file's directory +# tempDir /tmp/ + +# the arbitrator's fully qualified domain name (FQDN) for jh_iot system, for cluster only +# arbitrator arbitrator_hostname:6042 + +# number of threads per CPU core +# numOfThreadsPerCore 1.0 + +# number of threads to commit cache data +# numOfCommitThreads 4 + +# the proportion of total CPU cores available for query processing +# 2.0: the query threads will be set to double of the CPU cores. +# 1.0: all CPU cores are available for query processing [default]. +# 0.5: only half of the CPU cores are available for query. +# 0.0: only one core available. +# ratioOfQueryCores 1.0 + +# the last_row/first/last aggregator will not change the original column name in the result fields +keepColumnName 1 + +# number of management nodes in the system +# numOfMnodes 3 + +# enable/disable backuping vnode directory when removing vnode +# vnodeBak 1 + +# enable/disable installation / usage report +# telemetryReporting 1 + +# enable/disable load balancing +# balance 1 + +# role for dnode. 0 - any, 1 - mnode, 2 - dnode +# role 0 + +# max timer control blocks +# maxTmrCtrl 512 + +# time interval of system monitor, seconds +# monitorInterval 30 + +# number of seconds allowed for a dnode to be offline, for cluster only +# offlineThreshold 864000 + +# RPC re-try timer, millisecond +# rpcTimer 300 + +# RPC maximum time for ack, seconds. +# rpcMaxTime 600 + +# time interval of dnode status reporting to mnode, seconds, for cluster only +# statusInterval 1 + +# time interval of heart beat from shell to dnode, seconds +# shellActivityTimer 3 + +# minimum sliding window time, milli-second +# minSlidingTime 10 + +# minimum time window, milli-second +# minIntervalTime 10 + +# maximum delay before launching a stream computation, milli-second +# maxStreamCompDelay 20000 + +# maximum delay before launching a stream computation for the first time, milli-second +# maxFirstStreamCompDelay 10000 + +# retry delay when a stream computation fails, milli-second +# retryStreamCompDelay 10 + +# the delayed time for launching a stream computation, from 0.1(default, 10% of whole computing time window) to 0.9 +# streamCompDelayRatio 0.1 + +# max number of vgroups per db, 0 means configured automatically +# maxVgroupsPerDb 0 + +# max number of tables per vnode +# maxTablesPerVnode 1000000 + +# cache block size (Mbyte) +# cache 16 + +# number of cache blocks per vnode +# blocks 6 + +# number of days per DB file +# days 10 + +# number of days to keep DB file +# keep 3650 + +# minimum rows of records in file block +# minRows 100 + +# maximum rows of records in file block +# maxRows 4096 + +# the number of acknowledgments required for successful data writing +# quorum 1 + +# enable/disable compression +# comp 2 + +# write ahead log (WAL) level, 0: no wal; 1: write wal, but no fysnc; 2: write wal, and call fsync +# walLevel 1 + +# if walLevel is set to 2, the cycle of fsync being executed, if set to 0, fsync is called right away +# fsync 3000 + +# number of replications, for cluster only +# replica 1 + +# the compressed rpc message, option: +# -1 (no compression) +# 0 (all message compressed), +# > 0 (rpc message body which larger than this value will be compressed) +# compressMsgSize -1 + +# max length of an SQL +# maxSQLLength 65480 + +# max length of WildCards +# maxWildCardsLength 100 + +# the maximum number of records allowed for super table time sorting +# maxNumOfOrderedRes 100000 + +# system time zone +# timezone Asia/Shanghai (CST, +0800) +# system time zone (for windows 10) +# timezone UTC-8 + +# system locale +# locale en_US.UTF-8 + +# default system charset +# charset UTF-8 + +# max number of connections allowed in dnode +# maxShellConns 5000 + +# max number of connections allowed in client +# maxConnections 5000 + +# stop writing logs when the disk size of the log folder is less than this value +# minimalLogDirGB 0.1 + +# stop writing temporary files when the disk size of the tmp folder is less than this value +# minimalTmpDirGB 0.1 + +# if disk free space is less than this value, server service exit directly within startup process +# minimalDataDirGB 0.1 + +# One mnode is equal to the number of vnode consumed +# mnodeEqualVnodeNum 4 + +# enbale/disable http service +# http 1 + +# enable/disable system monitor +# monitor 1 + +# enable/disable recording the SQL statements via restful interface +# httpEnableRecordSql 0 + +# number of threads used to process http requests +# httpMaxThreads 2 + +# maximum number of rows returned by the restful interface +# restfulRowLimit 10240 + +# The following parameter is used to limit the maximum number of lines in log files. +# max number of lines per log filters +# numOfLogLines 10000000 + +# enable/disable async log +# asyncLog 1 + +# time of keeping log files, days +# logKeepDays 0 + + +# The following parameters are used for debug purpose only. +# debugFlag 8 bits mask: FILE-SCREEN-UNUSED-HeartBeat-DUMP-TRACE_WARN-ERROR +# 131: output warning and error +# 135: output debug, warning and error +# 143: output trace, debug, warning and error to log +# 199: output debug, warning and error to both screen and file +# 207: output trace, debug, warning and error to both screen and file + +# debug flag for all log type, take effect when non-zero value +# debugFlag 0 + +# debug flag for meta management messages +# mDebugFlag 135 + +# debug flag for dnode messages +# dDebugFlag 135 + +# debug flag for sync module +# sDebugFlag 135 + +# debug flag for WAL +# wDebugFlag 135 + +# debug flag for SDB +# sdbDebugFlag 135 + +# debug flag for RPC +# rpcDebugFlag 131 + +# debug flag for TIMER +# tmrDebugFlag 131 + +# debug flag for jh_iot client +# cDebugFlag 131 + +# debug flag for JNI +# jniDebugFlag 131 + +# debug flag for storage +# uDebugFlag 131 + +# debug flag for http server +# httpDebugFlag 131 + +# debug flag for monitor +# monDebugFlag 131 + +# debug flag for query +# qDebugFlag 131 + +# debug flag for vnode +# vDebugFlag 131 + +# debug flag for TSDB +# tsdbDebugFlag 131 + +# debug flag for continue query +# cqDebugFlag 131 + +# enable/disable recording the SQL in client +# enableRecordSql 0 + +# generate core file when service crash +# enableCoreFile 1 + +# maximum display width of binary and nchar fields in the shell. The parts exceeding this limit will be hidden +# maxBinaryDisplayWidth 30 + +# enable/disable stream (continuous query) +# stream 1 + +# in retrieve blocking model, only in 50% query threads will be used in query processing in dnode +# retrieveBlockingModel 0 + +# the maximum allowed query buffer size in MB during query processing for each data node +# -1 no limit (default) +# 0 no query allowed, queries are disabled +# queryBufferSize -1 + diff --git a/packaging/cfg/power.cfg b/packaging/cfg/power.cfg new file mode 100644 index 0000000000000000000000000000000000000000..6f5e910a28c0471666243e275975243bc77d2fc5 --- /dev/null +++ b/packaging/cfg/power.cfg @@ -0,0 +1,286 @@ +######################################################## +# # +# PowerDB Configuration # +# Any questions, please email support@taosdata.com # +# # +######################################################## + +# first fully qualified domain name (FQDN) for PowerDB system +# firstEp hostname:6030 + +# local fully qualified domain name (FQDN) +# fqdn hostname + +# first port number for the connection (12 continuous UDP/TCP port number are used) +# serverPort 6030 + +# log file's directory +# logDir /var/log/power + +# data file's directory +# dataDir /var/lib/power + +# temporary file's directory +# tempDir /tmp/ + +# the arbitrator's fully qualified domain name (FQDN) for PowerDB system, for cluster only +# arbitrator arbitrator_hostname:6042 + +# number of threads per CPU core +# numOfThreadsPerCore 1.0 + +# number of threads to commit cache data +# numOfCommitThreads 4 + +# the proportion of total CPU cores available for query processing +# 2.0: the query threads will be set to double of the CPU cores. +# 1.0: all CPU cores are available for query processing [default]. +# 0.5: only half of the CPU cores are available for query. +# 0.0: only one core available. +# ratioOfQueryCores 1.0 + +# the last_row/first/last aggregator will not change the original column name in the result fields +keepColumnName 1 + +# number of management nodes in the system +# numOfMnodes 3 + +# enable/disable backuping vnode directory when removing vnode +# vnodeBak 1 + +# enable/disable installation / usage report +# telemetryReporting 1 + +# enable/disable load balancing +# balance 1 + +# role for dnode. 0 - any, 1 - mnode, 2 - dnode +# role 0 + +# max timer control blocks +# maxTmrCtrl 512 + +# time interval of system monitor, seconds +# monitorInterval 30 + +# number of seconds allowed for a dnode to be offline, for cluster only +# offlineThreshold 864000 + +# RPC re-try timer, millisecond +# rpcTimer 300 + +# RPC maximum time for ack, seconds. +# rpcMaxTime 600 + +# time interval of dnode status reporting to mnode, seconds, for cluster only +# statusInterval 1 + +# time interval of heart beat from shell to dnode, seconds +# shellActivityTimer 3 + +# minimum sliding window time, milli-second +# minSlidingTime 10 + +# minimum time window, milli-second +# minIntervalTime 10 + +# maximum delay before launching a stream computation, milli-second +# maxStreamCompDelay 20000 + +# maximum delay before launching a stream computation for the first time, milli-second +# maxFirstStreamCompDelay 10000 + +# retry delay when a stream computation fails, milli-second +# retryStreamCompDelay 10 + +# the delayed time for launching a stream computation, from 0.1(default, 10% of whole computing time window) to 0.9 +# streamCompDelayRatio 0.1 + +# max number of vgroups per db, 0 means configured automatically +# maxVgroupsPerDb 0 + +# max number of tables per vnode +# maxTablesPerVnode 1000000 + +# cache block size (Mbyte) +# cache 16 + +# number of cache blocks per vnode +# blocks 6 + +# number of days per DB file +# days 10 + +# number of days to keep DB file +# keep 3650 + +# minimum rows of records in file block +# minRows 100 + +# maximum rows of records in file block +# maxRows 4096 + +# the number of acknowledgments required for successful data writing +# quorum 1 + +# enable/disable compression +# comp 2 + +# write ahead log (WAL) level, 0: no wal; 1: write wal, but no fysnc; 2: write wal, and call fsync +# walLevel 1 + +# if walLevel is set to 2, the cycle of fsync being executed, if set to 0, fsync is called right away +# fsync 3000 + +# number of replications, for cluster only +# replica 1 + +# the compressed rpc message, option: +# -1 (no compression) +# 0 (all message compressed), +# > 0 (rpc message body which larger than this value will be compressed) +# compressMsgSize -1 + +# max length of an SQL +# maxSQLLength 65480 + +# max length of WildCards +# maxWildCardsLength 100 + +# the maximum number of records allowed for super table time sorting +# maxNumOfOrderedRes 100000 + +# system time zone +# timezone Asia/Shanghai (CST, +0800) +# system time zone (for windows 10) +# timezone UTC-8 + +# system locale +# locale en_US.UTF-8 + +# default system charset +# charset UTF-8 + +# max number of connections allowed in dnode +# maxShellConns 5000 + +# max number of connections allowed in client +# maxConnections 5000 + +# stop writing logs when the disk size of the log folder is less than this value +# minimalLogDirGB 0.1 + +# stop writing temporary files when the disk size of the tmp folder is less than this value +# minimalTmpDirGB 0.1 + +# if disk free space is less than this value, powerd service exit directly within startup process +# minimalDataDirGB 0.1 + +# One mnode is equal to the number of vnode consumed +# mnodeEqualVnodeNum 4 + +# enbale/disable http service +# http 1 + +# enable/disable system monitor +# monitor 1 + +# enable/disable recording the SQL statements via restful interface +# httpEnableRecordSql 0 + +# number of threads used to process http requests +# httpMaxThreads 2 + +# maximum number of rows returned by the restful interface +# restfulRowLimit 10240 + +# The following parameter is used to limit the maximum number of lines in log files. +# max number of lines per log filters +# numOfLogLines 10000000 + +# enable/disable async log +# asyncLog 1 + +# time of keeping log files, days +# logKeepDays 0 + + +# The following parameters are used for debug purpose only. +# debugFlag 8 bits mask: FILE-SCREEN-UNUSED-HeartBeat-DUMP-TRACE_WARN-ERROR +# 131: output warning and error +# 135: output debug, warning and error +# 143: output trace, debug, warning and error to log +# 199: output debug, warning and error to both screen and file +# 207: output trace, debug, warning and error to both screen and file + +# debug flag for all log type, take effect when non-zero value +# debugFlag 0 + +# debug flag for meta management messages +# mDebugFlag 135 + +# debug flag for dnode messages +# dDebugFlag 135 + +# debug flag for sync module +# sDebugFlag 135 + +# debug flag for WAL +# wDebugFlag 135 + +# debug flag for SDB +# sdbDebugFlag 135 + +# debug flag for RPC +# rpcDebugFlag 131 + +# debug flag for TAOS TIMER +# tmrDebugFlag 131 + +# debug flag for TDengine client +# cDebugFlag 131 + +# debug flag for JNI +# jniDebugFlag 131 + +# debug flag for storage +# uDebugFlag 131 + +# debug flag for http server +# httpDebugFlag 131 + +# debug flag for monitor +# monDebugFlag 131 + +# debug flag for query +# qDebugFlag 131 + +# debug flag for vnode +# vDebugFlag 131 + +# debug flag for TSDB +# tsdbDebugFlag 131 + +# debug flag for continue query +# cqDebugFlag 131 + +# enable/disable recording the SQL in power client +# enableRecordSql 0 + +# generate core file when service crash +# enableCoreFile 1 + +# maximum display width of binary and nchar fields in the shell. The parts exceeding this limit will be hidden +# maxBinaryDisplayWidth 30 + +# enable/disable stream (continuous query) +# stream 1 + +# in retrieve blocking model, only in 50% query threads will be used in query processing in dnode +# retrieveBlockingModel 0 + +# the maximum allowed query buffer size in MB during query processing for each data node +# -1 no limit (default) +# 0 no query allowed, queries are disabled +# queryBufferSize -1 + diff --git a/packaging/cfg/prodb.cfg b/packaging/cfg/prodb.cfg new file mode 100644 index 0000000000000000000000000000000000000000..f84ea63bd6791b050c67befbc0c16ecb0ee553f1 --- /dev/null +++ b/packaging/cfg/prodb.cfg @@ -0,0 +1,286 @@ +######################################################## +# # +# ProDB Configuration # +# Any questions, please email support@hanatech.com.cn # +# # +######################################################## + +# first fully qualified domain name (FQDN) for ProDB system +# firstEp hostname:6030 + +# local fully qualified domain name (FQDN) +# fqdn hostname + +# first port number for the connection (12 continuous UDP/TCP port number are used) +# serverPort 6030 + +# log file's directory +# logDir /var/log/ProDB + +# data file's directory +# dataDir /var/lib/ProDB + +# temporary file's directory +# tempDir /tmp/ + +# the arbitrator's fully qualified domain name (FQDN) for ProDB system, for cluster only +# arbitrator arbitrator_hostname:6042 + +# number of threads per CPU core +# numOfThreadsPerCore 1.0 + +# number of threads to commit cache data +# numOfCommitThreads 4 + +# the proportion of total CPU cores available for query processing +# 2.0: the query threads will be set to double of the CPU cores. +# 1.0: all CPU cores are available for query processing [default]. +# 0.5: only half of the CPU cores are available for query. +# 0.0: only one core available. +# ratioOfQueryCores 1.0 + +# the last_row/first/last aggregator will not change the original column name in the result fields +keepColumnName 1 + +# number of management nodes in the system +# numOfMnodes 3 + +# enable/disable backuping vnode directory when removing vnode +# vnodeBak 1 + +# enable/disable installation / usage report +# telemetryReporting 1 + +# enable/disable load balancing +# balance 1 + +# role for dnode. 0 - any, 1 - mnode, 2 - dnode +# role 0 + +# max timer control blocks +# maxTmrCtrl 512 + +# time interval of system monitor, seconds +# monitorInterval 30 + +# number of seconds allowed for a dnode to be offline, for cluster only +# offlineThreshold 864000 + +# RPC re-try timer, millisecond +# rpcTimer 300 + +# RPC maximum time for ack, seconds. +# rpcMaxTime 600 + +# time interval of dnode status reporting to mnode, seconds, for cluster only +# statusInterval 1 + +# time interval of heart beat from shell to dnode, seconds +# shellActivityTimer 3 + +# minimum sliding window time, milli-second +# minSlidingTime 10 + +# minimum time window, milli-second +# minIntervalTime 10 + +# maximum delay before launching a stream computation, milli-second +# maxStreamCompDelay 20000 + +# maximum delay before launching a stream computation for the first time, milli-second +# maxFirstStreamCompDelay 10000 + +# retry delay when a stream computation fails, milli-second +# retryStreamCompDelay 10 + +# the delayed time for launching a stream computation, from 0.1(default, 10% of whole computing time window) to 0.9 +# streamCompDelayRatio 0.1 + +# max number of vgroups per db, 0 means configured automatically +# maxVgroupsPerDb 0 + +# max number of tables per vnode +# maxTablesPerVnode 1000000 + +# cache block size (Mbyte) +# cache 16 + +# number of cache blocks per vnode +# blocks 6 + +# number of days per DB file +# days 10 + +# number of days to keep DB file +# keep 3650 + +# minimum rows of records in file block +# minRows 100 + +# maximum rows of records in file block +# maxRows 4096 + +# the number of acknowledgments required for successful data writing +# quorum 1 + +# enable/disable compression +# comp 2 + +# write ahead log (WAL) level, 0: no wal; 1: write wal, but no fysnc; 2: write wal, and call fsync +# walLevel 1 + +# if walLevel is set to 2, the cycle of fsync being executed, if set to 0, fsync is called right away +# fsync 3000 + +# number of replications, for cluster only +# replica 1 + +# the compressed rpc message, option: +# -1 (no compression) +# 0 (all message compressed), +# > 0 (rpc message body which larger than this value will be compressed) +# compressMsgSize -1 + +# max length of an SQL +# maxSQLLength 65480 + +# max length of WildCards +# maxWildCardsLength 100 + +# the maximum number of records allowed for super table time sorting +# maxNumOfOrderedRes 100000 + +# system time zone +# timezone Asia/Shanghai (CST, +0800) +# system time zone (for windows 10) +# timezone UTC-8 + +# system locale +# locale en_US.UTF-8 + +# default system charset +# charset UTF-8 + +# max number of connections allowed in dnode +# maxShellConns 5000 + +# max number of connections allowed in client +# maxConnections 5000 + +# stop writing logs when the disk size of the log folder is less than this value +# minimalLogDirGB 0.1 + +# stop writing temporary files when the disk size of the tmp folder is less than this value +# minimalTmpDirGB 0.1 + +# if disk free space is less than this value, prodbs service exit directly within startup process +# minimalDataDirGB 0.1 + +# One mnode is equal to the number of vnode consumed +# mnodeEqualVnodeNum 4 + +# enbale/disable http service +# http 1 + +# enable/disable system monitor +# monitor 1 + +# enable/disable recording the SQL statements via restful interface +# httpEnableRecordSql 0 + +# number of threads used to process http requests +# httpMaxThreads 2 + +# maximum number of rows returned by the restful interface +# restfulRowLimit 10240 + +# The following parameter is used to limit the maximum number of lines in log files. +# max number of lines per log filters +# numOfLogLines 10000000 + +# enable/disable async log +# asyncLog 1 + +# time of keeping log files, days +# logKeepDays 0 + + +# The following parameters are used for debug purpose only. +# debugFlag 8 bits mask: FILE-SCREEN-UNUSED-HeartBeat-DUMP-TRACE_WARN-ERROR +# 131: output warning and error +# 135: output debug, warning and error +# 143: output trace, debug, warning and error to log +# 199: output debug, warning and error to both screen and file +# 207: output trace, debug, warning and error to both screen and file + +# debug flag for all log type, take effect when non-zero value +# debugFlag 0 + +# debug flag for meta management messages +# mDebugFlag 135 + +# debug flag for dnode messages +# dDebugFlag 135 + +# debug flag for sync module +# sDebugFlag 135 + +# debug flag for WAL +# wDebugFlag 135 + +# debug flag for SDB +# sdbDebugFlag 135 + +# debug flag for RPC +# rpcDebugFlag 131 + +# debug flag for TAOS TIMER +# tmrDebugFlag 131 + +# debug flag for ProDB client +# cDebugFlag 131 + +# debug flag for JNI +# jniDebugFlag 131 + +# debug flag for storage +# uDebugFlag 131 + +# debug flag for http server +# httpDebugFlag 131 + +# debug flag for monitor +# monDebugFlag 131 + +# debug flag for query +# qDebugFlag 131 + +# debug flag for vnode +# vDebugFlag 131 + +# debug flag for TSDB +# tsdbDebugFlag 131 + +# debug flag for continue query +# cqDebugFlag 131 + +# enable/disable recording the SQL in prodb client +# enableRecordSql 0 + +# generate core file when service crash +# enableCoreFile 1 + +# maximum display width of binary and nchar fields in the shell. The parts exceeding this limit will be hidden +# maxBinaryDisplayWidth 30 + +# enable/disable stream (continuous query) +# stream 1 + +# in retrieve blocking model, only in 50% query threads will be used in query processing in dnode +# retrieveBlockingModel 0 + +# the maximum allowed query buffer size in MB during query processing for each data node +# -1 no limit (default) +# 0 no query allowed, queries are disabled +# queryBufferSize -1 + diff --git a/packaging/cfg/tq.cfg b/packaging/cfg/tq.cfg new file mode 100644 index 0000000000000000000000000000000000000000..284335a4ad9d5b60cc36a0d722e8c6994f20a812 --- /dev/null +++ b/packaging/cfg/tq.cfg @@ -0,0 +1,286 @@ +######################################################## +# # +# TQueue Configuration # +# Any questions, please email support@taosdata.com # +# # +######################################################## + +# first fully qualified domain name (FQDN) for TQueue system +# firstEp hostname:6030 + +# local fully qualified domain name (FQDN) +# fqdn hostname + +# first port number for the connection (12 continuous UDP/TCP port number are used) +# serverPort 6030 + +# log file's directory +# logDir /var/log/tq + +# data file's directory +# dataDir /var/lib/tq + +# temporary file's directory +# tempDir /tmp/ + +# the arbitrator's fully qualified domain name (FQDN) for TQueue system, for cluster only +# arbitrator arbitrator_hostname:6042 + +# number of threads per CPU core +# numOfThreadsPerCore 1.0 + +# number of threads to commit cache data +# numOfCommitThreads 4 + +# the proportion of total CPU cores available for query processing +# 2.0: the query threads will be set to double of the CPU cores. +# 1.0: all CPU cores are available for query processing [default]. +# 0.5: only half of the CPU cores are available for query. +# 0.0: only one core available. +# ratioOfQueryCores 1.0 + +# the last_row/first/last aggregator will not change the original column name in the result fields +keepColumnName 1 + +# number of management nodes in the system +# numOfMnodes 3 + +# enable/disable backuping vnode directory when removing vnode +# vnodeBak 1 + +# enable/disable installation / usage report +# telemetryReporting 1 + +# enable/disable load balancing +# balance 1 + +# role for dnode. 0 - any, 1 - mnode, 2 - dnode +# role 0 + +# max timer control blocks +# maxTmrCtrl 512 + +# time interval of system monitor, seconds +# monitorInterval 30 + +# number of seconds allowed for a dnode to be offline, for cluster only +# offlineThreshold 864000 + +# RPC re-try timer, millisecond +# rpcTimer 300 + +# RPC maximum time for ack, seconds. +# rpcMaxTime 600 + +# time interval of dnode status reporting to mnode, seconds, for cluster only +# statusInterval 1 + +# time interval of heart beat from shell to dnode, seconds +# shellActivityTimer 3 + +# minimum sliding window time, milli-second +# minSlidingTime 10 + +# minimum time window, milli-second +# minIntervalTime 10 + +# maximum delay before launching a stream computation, milli-second +# maxStreamCompDelay 20000 + +# maximum delay before launching a stream computation for the first time, milli-second +# maxFirstStreamCompDelay 10000 + +# retry delay when a stream computation fails, milli-second +# retryStreamCompDelay 10 + +# the delayed time for launching a stream computation, from 0.1(default, 10% of whole computing time window) to 0.9 +# streamCompDelayRatio 0.1 + +# max number of vgroups per db, 0 means configured automatically +# maxVgroupsPerDb 0 + +# max number of tables per vnode +# maxTablesPerVnode 1000000 + +# cache block size (Mbyte) +# cache 16 + +# number of cache blocks per vnode +# blocks 6 + +# number of days per DB file +# days 10 + +# number of days to keep DB file +# keep 3650 + +# minimum rows of records in file block +# minRows 100 + +# maximum rows of records in file block +# maxRows 4096 + +# the number of acknowledgments required for successful data writing +# quorum 1 + +# enable/disable compression +# comp 2 + +# write ahead log (WAL) level, 0: no wal; 1: write wal, but no fysnc; 2: write wal, and call fsync +# walLevel 1 + +# if walLevel is set to 2, the cycle of fsync being executed, if set to 0, fsync is called right away +# fsync 3000 + +# number of replications, for cluster only +# replica 1 + +# the compressed rpc message, option: +# -1 (no compression) +# 0 (all message compressed), +# > 0 (rpc message body which larger than this value will be compressed) +# compressMsgSize -1 + +# max length of an SQL +# maxSQLLength 65480 + +# max length of WildCards +# maxWildCardsLength 100 + +# the maximum number of records allowed for super table time sorting +# maxNumOfOrderedRes 100000 + +# system time zone +# timezone Asia/Shanghai (CST, +0800) +# system time zone (for windows 10) +# timezone UTC-8 + +# system locale +# locale en_US.UTF-8 + +# default system charset +# charset UTF-8 + +# max number of connections allowed in dnode +# maxShellConns 5000 + +# max number of connections allowed in client +# maxConnections 5000 + +# stop writing logs when the disk size of the log folder is less than this value +# minimalLogDirGB 0.1 + +# stop writing temporary files when the disk size of the tmp folder is less than this value +# minimalTmpDirGB 0.1 + +# if disk free space is less than this value, tqd service exit directly within startup process +# minimalDataDirGB 0.1 + +# One mnode is equal to the number of vnode consumed +# mnodeEqualVnodeNum 4 + +# enbale/disable http service +# http 1 + +# enable/disable system monitor +# monitor 1 + +# enable/disable recording the SQL statements via restful interface +# httpEnableRecordSql 0 + +# number of threads used to process http requests +# httpMaxThreads 2 + +# maximum number of rows returned by the restful interface +# restfulRowLimit 10240 + +# The following parameter is used to limit the maximum number of lines in log files. +# max number of lines per log filters +# numOfLogLines 10000000 + +# enable/disable async log +# asyncLog 1 + +# time of keeping log files, days +# logKeepDays 0 + + +# The following parameters are used for debug purpose only. +# debugFlag 8 bits mask: FILE-SCREEN-UNUSED-HeartBeat-DUMP-TRACE_WARN-ERROR +# 131: output warning and error +# 135: output debug, warning and error +# 143: output trace, debug, warning and error to log +# 199: output debug, warning and error to both screen and file +# 207: output trace, debug, warning and error to both screen and file + +# debug flag for all log type, take effect when non-zero value +# debugFlag 0 + +# debug flag for meta management messages +# mDebugFlag 135 + +# debug flag for dnode messages +# dDebugFlag 135 + +# debug flag for sync module +# sDebugFlag 135 + +# debug flag for WAL +# wDebugFlag 135 + +# debug flag for SDB +# sdbDebugFlag 135 + +# debug flag for RPC +# rpcDebugFlag 131 + +# debug flag for TAOS TIMER +# tmrDebugFlag 131 + +# debug flag for TQueue client +# cDebugFlag 131 + +# debug flag for JNI +# jniDebugFlag 131 + +# debug flag for storage +# uDebugFlag 131 + +# debug flag for http server +# httpDebugFlag 131 + +# debug flag for monitor +# monDebugFlag 131 + +# debug flag for query +# qDebugFlag 131 + +# debug flag for vnode +# vDebugFlag 131 + +# debug flag for TSDB +# tsdbDebugFlag 131 + +# debug flag for continue query +# cqDebugFlag 131 + +# enable/disable recording the SQL in tq client +# enableRecordSql 0 + +# generate core file when service crash +# enableCoreFile 1 + +# maximum display width of binary and nchar fields in the shell. The parts exceeding this limit will be hidden +# maxBinaryDisplayWidth 30 + +# enable/disable stream (continuous query) +# stream 1 + +# in retrieve blocking model, only in 50% query threads will be used in query processing in dnode +# retrieveBlockingModel 0 + +# the maximum allowed query buffer size in MB during query processing for each data node +# -1 no limit (default) +# 0 no query allowed, queries are disabled +# queryBufferSize -1 + diff --git a/packaging/release.bat b/packaging/release.bat new file mode 100644 index 0000000000000000000000000000000000000000..c1cf7875a505852ce3f8c0b78029fedf481aed8f --- /dev/null +++ b/packaging/release.bat @@ -0,0 +1,62 @@ +@echo off + +set internal_dir=%~dp0\..\..\ +set community_dir=%~dp0\.. +cd %community_dir% +git checkout -- . +cd %community_dir%\packaging + +:: %1 name %2 version +if !%1==! GOTO USAGE +if !%2==! GOTO USAGE +if %1 == taos GOTO TAOS +if %1 == power GOTO POWER +if %1 == tq GOTO TQ +if %1 == pro GOTO PRO +if %1 == kh GOTO KH +if %1 == jh GOTO JH +GOTO USAGE + +:TAOS +goto RELEASE + +:POWER +call sed_power.bat %community_dir% +goto RELEASE + +:TQ +call sed_tq.bat %community_dir% +goto RELEASE + +:PRO +call sed_pro.bat %community_dir% +goto RELEASE + +:KH +call sed_kh.bat %community_dir% +goto RELEASE + +:JH +call sed_jh.bat %community_dir% +goto RELEASE + +:RELEASE +echo release windows-client-64 for %1, version: %2 +if not exist %internal_dir%\debug\ver-%2-64bit-%1 ( + md %internal_dir%\debug\ver-%2-64bit-%1 +) else ( + rd /S /Q %internal_dir%\debug\ver-%2-64bit-%1 + md %internal_dir%\debug\ver-%2-64bit-%1 +) +cd %internal_dir%\debug\ver-%2-64bit-%1 +call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 +cmake ../../ -G "NMake Makefiles" -DVERNUMBER=%2 -DCPUTYPE=x64 +set CL=/MP4 +nmake install +goto EXIT0 + +:USAGE +echo Usage: release.bat $productName $version +goto EXIT0 + +:EXIT0 \ No newline at end of file diff --git a/packaging/release.sh b/packaging/release.sh index dfa9ae9281445f07a2cdba8a89a0c91a430e0138..14fcb044c066ba56b9521b6490248f4b3ca0ac16 100755 --- a/packaging/release.sh +++ b/packaging/release.sh @@ -1,10 +1,15 @@ #!/bin/bash -# # Generate the deb package for ubuntu, or rpm package for centos, or tar.gz package for other linux os set -e #set -x +source ./sed_power.sh +source ./sed_tq.sh +source ./sed_pro.sh +source ./sed_kh.sh +source ./sed_jh.sh + # release.sh -v [cluster | edge] # -c [aarch32 | aarch64 | x64 | x86 | mips64 ...] # -o [Linux | Kylin | Alpine | Raspberrypi | Darwin | Windows | Ningsi60 | Ningsi80 |...] @@ -25,7 +30,7 @@ soMode=dynamic # [static | dynamic] dbName=taos # [taos | power | tq | pro | kh | jh] allocator=glibc # [glibc | jemalloc] verNumber="" -verNumberComp="1.0.0.0" +verNumberComp="2.0.0.0" while getopts "hv:V:c:o:l:s:d:a:n:m:" arg do @@ -192,301 +197,18 @@ else allocator_macro="" fi -# for powerdb -if [[ "$dbName" == "power" ]]; then - # cmake/install.inc - sed -i "s/C:\/TDengine/C:\/PowerDB/g" ${top_dir}/cmake/install.inc - sed -i "s/taos\.exe/power\.exe/g" ${top_dir}/cmake/install.inc - sed -i "s/taosdemo\.exe/powerdemo\.exe/g" ${top_dir}/cmake/install.inc - # src/kit/shell/inc/shell.h - sed -i "s/taos_history/power_history/g" ${top_dir}/src/kit/shell/inc/shell.h - # src/inc/taosdef.h - sed -i "s/\"taosdata\"/\"powerdb\"/g" ${top_dir}/src/inc/taosdef.h - # src/util/src/tconfig.c - sed -i "s/taos config/power config/g" ${top_dir}/src/util/src/tconfig.c - sed -i "s/taos\.cfg/power\.cfg/g" ${top_dir}/src/util/src/tconfig.c - sed -i "s/etc\/taos/etc\/power/g" ${top_dir}/src/util/src/tconfig.c - # src/kit/taosdemo/taosdemo.c - sed -i "s/\"taosdata\"/\"powerdb\"/g" ${top_dir}/src/kit/taosdemo/taosdemo.c - # src/util/src/tlog.c - sed -i "s/log\/taos/log\/power/g" ${top_dir}/src/util/src/tlog.c - # src/dnode/src/dnodeSystem.c - sed -i "s/TDengine/Power/g" ${top_dir}/src/dnode/src/dnodeSystem.c - sed -i "s/TDengine/Power/g" ${top_dir}/src/dnode/src/dnodeMain.c - sed -i "s/taosdlog/powerdlog/g" ${top_dir}/src/dnode/src/dnodeMain.c - # src/client/src/tscSystem.c - sed -i "s/taoslog/powerlog/g" ${top_dir}/src/client/src/tscSystem.c - # src/util/src/tnote.c - sed -i "s/taosinfo/powerinfo/g" ${top_dir}/src/util/src/tnote.c - # src/dnode/CMakeLists.txt - sed -i "s/taos\.cfg/power\.cfg/g" ${top_dir}/src/dnode/CMakeLists.txt - # src/kit/taosdump/taosdump.c - sed -i "s/TDengine/Power/g" ${top_dir}/src/kit/taosdump/taosdump.c - sed -i "s/Default is taosdata/Default is power/g" ${top_dir}/src/kit/taosdump/taosdump.c - sed -i "s/\"taosdata\"/\"powerdb\"/g" ${top_dir}/src/kit/taosdump/taosdump.c - sed -i "s/taos\/taos\.cfg/power\/power\.cfg/g" ${top_dir}/src/kit/taosdump/taosdump.c - # src/os/src/linux/linuxEnv.c - sed -i "s/etc\/taos/etc\/power/g" ${top_dir}/src/os/src/linux/linuxEnv.c - sed -i "s/lib\/taos/lib\/power/g" ${top_dir}/src/os/src/linux/linuxEnv.c - sed -i "s/log\/taos/log\/power/g" ${top_dir}/src/os/src/linux/linuxEnv.c - # src/os/src/windows/wEnv.c - sed -i "s/TDengine/PowerDB/g" ${top_dir}/src/os/src/windows/wEnv.c - # src/kit/shell/src/shellEngine.c - sed -i "s/TDengine shell/PowerDB shell/g" ${top_dir}/src/kit/shell/src/shellEngine.c - sed -i "s/2020 by TAOS Data, Inc/2020 by PowerDB, Inc/g" ${top_dir}/src/kit/shell/src/shellEngine.c - sed -i "s/\"taos> \"/\"power> \"/g" ${top_dir}/src/kit/shell/src/shellEngine.c - sed -i "s/\" -> \"/\" -> \"/g" ${top_dir}/src/kit/shell/src/shellEngine.c - sed -i "s/prompt_size = 6/prompt_size = 7/g" ${top_dir}/src/kit/shell/src/shellEngine.c -fi - -# for tq -if [[ "$dbName" == "tq" ]]; then - # cmake/install.inc - sed -i "s/C:\/TDengine/C:\/TQueue/g" ${top_dir}/cmake/install.inc - sed -i "s/taos\.exe/tq\.exe/g" ${top_dir}/cmake/install.inc - sed -i "s/taosdemo\.exe/tqdemo\.exe/g" ${top_dir}/cmake/install.inc - # src/kit/shell/inc/shell.h - sed -i "s/taos_history/tq_history/g" ${top_dir}/src/kit/shell/inc/shell.h - # src/inc/taosdef.h - sed -i "s/\"taosdata\"/\"tqueue\"/g" ${top_dir}/src/inc/taosdef.h - # src/util/src/tconfig.c - sed -i "s/taos config/tq config/g" ${top_dir}/src/util/src/tconfig.c - sed -i "s/taos\.cfg/tq\.cfg/g" ${top_dir}/src/util/src/tconfig.c - sed -i "s/etc\/taos/etc\/tq/g" ${top_dir}/src/util/src/tconfig.c - # src/kit/taosdemo/taosdemo.c - sed -i "s/\"taosdata\"/\"tqueue\"/g" ${top_dir}/src/kit/taosdemo/taosdemo.c - # src/util/src/tlog.c - sed -i "s/log\/taos/log\/tq/g" ${top_dir}/src/util/src/tlog.c - # src/dnode/src/dnodeSystem.c - sed -i "s/TDengine/TQueue/g" ${top_dir}/src/dnode/src/dnodeSystem.c - sed -i "s/TDengine/TQueue/g" ${top_dir}/src/dnode/src/dnodeMain.c - sed -i "s/taosdlog/tqdlog/g" ${top_dir}/src/dnode/src/dnodeMain.c - # src/client/src/tscSystem.c - sed -i "s/taoslog/tqlog/g" ${top_dir}/src/client/src/tscSystem.c - # src/util/src/tnote.c - sed -i "s/taosinfo/tqinfo/g" ${top_dir}/src/util/src/tnote.c - # src/dnode/CMakeLists.txt - sed -i "s/taos\.cfg/tq\.cfg/g" ${top_dir}/src/dnode/CMakeLists.txt - # src/kit/taosdump/taosdump.c - sed -i "s/TDengine/TQueue/g" ${top_dir}/src/kit/taosdump/taosdump.c - sed -i "s/Default is taosdata/Default is tqueue/g" ${top_dir}/src/kit/taosdump/taosdump.c - sed -i "s/\"taosdata\"/\"tqueue\"/g" ${top_dir}/src/kit/taosdump/taosdump.c - sed -i "s/taos\/taos\.cfg/tq\/tq\.cfg/g" ${top_dir}/src/kit/taosdump/taosdump.c - # src/os/src/linux/linuxEnv.c - sed -i "s/etc\/taos/etc\/tq/g" ${top_dir}/src/os/src/linux/linuxEnv.c - sed -i "s/lib\/taos/lib\/tq/g" ${top_dir}/src/os/src/linux/linuxEnv.c - sed -i "s/log\/taos/log\/tq/g" ${top_dir}/src/os/src/linux/linuxEnv.c - # src/os/src/windows/wEnv.c - sed -i "s/TDengine/TQ/g" ${top_dir}/src/os/src/windows/wEnv.c - # src/kit/shell/src/shellEngine.c - sed -i "s/TDengine shell/TQ shell/g" ${top_dir}/src/kit/shell/src/shellEngine.c - sed -i "s/2020 by TAOS Data, Inc/2020 by TQ, Inc/g" ${top_dir}/src/kit/shell/src/shellEngine.c - sed -i "s/\"taos> \"/\"tq> \"/g" ${top_dir}/src/kit/shell/src/shellEngine.c - sed -i "s/\" -> \"/\" -> \"/g" ${top_dir}/src/kit/shell/src/shellEngine.c - sed -i "s/prompt_size = 6/prompt_size = 4/g" ${top_dir}/src/kit/shell/src/shellEngine.c -fi - -# for prodb -if [[ "$dbName" == "pro" ]]; then - # cmake/install.inc - sed -i "s/C:\/TDengine/C:\/ProDB/g" ${top_dir}/cmake/install.inc - sed -i "s/taos\.exe/prodbc\.exe/g" ${top_dir}/cmake/install.inc - sed -i "s/taosdemo\.exe/prodemo\.exe/g" ${top_dir}/cmake/install.inc - # src/kit/shell/inc/shell.h - sed -i "s/taos_history/prodb_history/g" ${top_dir}/src/kit/shell/inc/shell.h - # src/inc/taosdef.h - sed -i "s/\"taosdata\"/\"prodb\"/g" ${top_dir}/src/inc/taosdef.h - # src/util/src/tconfig.c - sed -i "s/taos config/prodb config/g" ${top_dir}/src/util/src/tconfig.c - sed -i "s/taos\.cfg/prodb\.cfg/g" ${top_dir}/src/util/src/tconfig.c - sed -i "s/etc\/taos/etc\/ProDB/g" ${top_dir}/src/util/src/tconfig.c - # src/kit/taosdemo/taosdemo.c - sed -i "s/\"taosdata\"/\"prodb\"/g" ${top_dir}/src/kit/taosdemo/taosdemo.c - sed -i "s/support@taosdata.com/support@hanatech.com.cn/g" ${top_dir}/src/kit/taosdemo/taosdemo.c - # src/util/src/tlog.c - sed -i "s/log\/taos/log\/ProDB/g" ${top_dir}/src/util/src/tlog.c - # src/dnode/src/dnodeSystem.c - sed -i "s/TDengine/ProDB/g" ${top_dir}/src/dnode/src/dnodeSystem.c - sed -i "s/TDengine/ProDB/g" ${top_dir}/src/dnode/src/dnodeMain.c - sed -i "s/taosdlog/prodlog/g" ${top_dir}/src/dnode/src/dnodeMain.c - # src/client/src/tscSystem.c - sed -i "s/taoslog/prolog/g" ${top_dir}/src/client/src/tscSystem.c - # src/util/src/tnote.c - sed -i "s/taosinfo/proinfo/g" ${top_dir}/src/util/src/tnote.c - # src/dnode/CMakeLists.txt - sed -i "s/taos\.cfg/prodb\.cfg/g" ${top_dir}/src/dnode/CMakeLists.txt - # src/kit/taosdump/taosdump.c - sed -i "s/Default is taosdata/Default is prodb/g" ${top_dir}/src/kit/taosdump/taosdump.c - sed -i "s/taos\/taos\.cfg/ProDB\/prodb\.cfg/g" ${top_dir}/src/kit/taosdump/taosdump.c - sed -i "s/\"taosdata\"/\"prodb\"/g" ${top_dir}/src/kit/taosdump/taosdump.c - sed -i "s/TDengine/ProDB/g" ${top_dir}/src/kit/taosdump/taosdump.c - # src/os/src/linux/linuxEnv.c - sed -i "s/etc\/taos/etc\/ProDB/g" ${top_dir}/src/os/src/linux/linuxEnv.c - sed -i "s/lib\/taos/lib\/ProDB/g" ${top_dir}/src/os/src/linux/linuxEnv.c - sed -i "s/log\/taos/log\/ProDB/g" ${top_dir}/src/os/src/linux/linuxEnv.c - # src/os/src/windows/wEnv.c - sed -i "s/TDengine/ProDB/g" ${top_dir}/src/os/src/windows/wEnv.c - # src/kit/shell/src/shellEngine.c - sed -i "s/TDengine shell/ProDB shell/g" ${top_dir}/src/kit/shell/src/shellEngine.c - sed -i "s/2020 by TAOS Data, Inc/2020 by Hanatech, Inc/g" ${top_dir}/src/kit/shell/src/shellEngine.c - sed -i "s/\"taos> \"/\"ProDB> \"/g" ${top_dir}/src/kit/shell/src/shellEngine.c - sed -i "s/\" -> \"/\" -> \"/g" ${top_dir}/src/kit/shell/src/shellEngine.c - sed -i "s/prompt_size = 6/prompt_size = 7/g" ${top_dir}/src/kit/shell/src/shellEngine.c -fi - -# for KingHistorian -if [[ "$dbName" == "kh" ]]; then - # cmake/install.inc - sed -i "s/C:\/TDengine/C:\/KingHistorian/g" ${top_dir}/cmake/install.inc - sed -i "s/taos\.exe/khclient\.exe/g" ${top_dir}/cmake/install.inc - sed -i "s/taosdemo\.exe/khdemo\.exe/g" ${top_dir}/cmake/install.inc - # src/kit/shell/inc/shell.h - sed -i "s/taos_history/kh_history/g" ${top_dir}/src/kit/shell/inc/shell.h - # src/inc/taosdef.h - sed -i "s/\"taosdata\"/\"khroot\"/g" ${top_dir}/src/inc/taosdef.h - # src/util/src/tconfig.c - sed -i "s/taos config/kh config/g" ${top_dir}/src/util/src/tconfig.c - sed -i "s/taos\.cfg/kinghistorian\.cfg/g" ${top_dir}/src/util/src/tconfig.c - sed -i "s/etc\/taos/etc\/kinghistorian/g" ${top_dir}/src/util/src/tconfig.c - # src/kit/taosdemo/taosdemo.c - sed -i "s/taosdemo --help/khdemo --help/g" ${top_dir}/src/kit/taosdemo/taosdemo.c - sed -i "s/taosdemo --usage/khdemo --usage/g" ${top_dir}/src/kit/taosdemo/taosdemo.c - sed -i "s/Usage: taosdemo/Usage: khdemo/g" ${top_dir}/src/kit/taosdemo/taosdemo.c - sed -i "s/taosdemo is simulating/khdemo is simulating/g" ${top_dir}/src/kit/taosdemo/taosdemo.c - sed -i "s/taosdemo version/khdemo version/g" ${top_dir}/src/kit/taosdemo/taosdemo.c - sed -i "s/\"taosdata\"/\"khroot\"/g" ${top_dir}/src/kit/taosdemo/taosdemo.c - sed -i "s/support@taosdata.com/support@wellintech.com/g" ${top_dir}/src/kit/taosdemo/taosdemo.c - sed -i "s/taosc, rest, and stmt/khclient, rest, and stmt/g" ${top_dir}/src/kit/taosdemo/taosdemo.c - sed -i "s/taosdemo uses/khdemo uses/g" ${top_dir}/src/kit/taosdemo/taosdemo.c - sed -i "s/use 'taosc'/use 'khclient'/g" ${top_dir}/src/kit/taosdemo/taosdemo.c - # src/util/src/tlog.c - sed -i "s/log\/taos/log\/kinghistorian/g" ${top_dir}/src/util/src/tlog.c - # src/dnode/src/dnodeSystem.c - sed -i "s/TDengine/KingHistorian/g" ${top_dir}/src/dnode/src/dnodeSystem.c - sed -i "s/TDengine/KingHistorian/g" ${top_dir}/src/dnode/src/dnodeMain.c - sed -i "s/taosdlog/khserverlog/g" ${top_dir}/src/dnode/src/dnodeMain.c - # src/client/src/tscSystem.c - sed -i "s/taoslog/khclientlog/g" ${top_dir}/src/client/src/tscSystem.c - # src/util/src/tnote.c - sed -i "s/taosinfo/khinfo/g" ${top_dir}/src/util/src/tnote.c - # src/dnode/CMakeLists.txt - sed -i "s/taos\.cfg/kinghistorian\.cfg/g" ${top_dir}/src/dnode/CMakeLists.txt - # src/kit/taosdump/taosdump.c - sed -i "s/Default is taosdata/Default is khroot/g" ${top_dir}/src/kit/taosdump/taosdump.c - sed -i "s/\"taosdata\"/\"khroot\"/g" ${top_dir}/src/kit/taosdump/taosdump.c - sed -i "s/TDengine/KingHistorian/g" ${top_dir}/src/kit/taosdump/taosdump.c - sed -i "s/taos\/taos\.cfg/kinghistorian\/kinghistorian\.cfg/g" ${top_dir}/src/kit/taosdump/taosdump.c - # src/os/src/linux/linuxEnv.c - sed -i "s/etc\/taos/etc\/kinghistorian/g" ${top_dir}/src/os/src/linux/linuxEnv.c - sed -i "s/lib\/taos/lib\/kinghistorian/g" ${top_dir}/src/os/src/linux/linuxEnv.c - sed -i "s/log\/taos/log\/kinghistorian/g" ${top_dir}/src/os/src/linux/linuxEnv.c - # src/kit/shell/src/shellDarwin.c - sed -i "s/TDengine shell/KingHistorian shell/g" ${top_dir}/src/kit/shell/src/shellDarwin.c - sed -i "s/2020 by TAOS Data/2021 by Wellintech/g" ${top_dir}/src/kit/shell/src/shellDarwin.c - # src/kit/shell/src/shellLinux.c - sed -i "s/TDengine shell/KingHistorian shell/g" ${top_dir}/src/kit/shell/src/shellLinux.c - sed -i "s/2020 by TAOS Data/2021 by Wellintech/g" ${top_dir}/src/kit/shell/src/shellLinux.c - # src/os/src/windows/wEnv.c - sed -i "s/TDengine/KingHistorian/g" ${top_dir}/src/os/src/windows/wEnv.c - # src/kit/shell/src/shellEngine.c - sed -i "s/TDengine shell/KingHistorian shell/g" ${top_dir}/src/kit/shell/src/shellEngine.c - sed -i "s/2020 by TAOS Data, Inc/2021 by Wellintech, Inc/g" ${top_dir}/src/kit/shell/src/shellEngine.c - sed -i "s/taos connect failed/kh connect failed/g" ${top_dir}/src/kit/shell/src/shellEngine.c - sed -i "s/\"taos> \"/\"khclient> \"/g" ${top_dir}/src/kit/shell/src/shellEngine.c - sed -i "s/\" -> \"/\" -> \"/g" ${top_dir}/src/kit/shell/src/shellEngine.c - sed -i "s/prompt_size = 6/prompt_size = 4/g" ${top_dir}/src/kit/shell/src/shellEngine.c - # src/rpc/src/rpcMain.c - sed -i "s/taos connections/kh connections/g" ${top_dir}/src/rpc/src/rpcMain.c - # src/plugins/monitor/src/monMain.c - sed -i "s/taosd is quiting/khserver is quiting/g" ${top_dir}/src/plugins/monitor/src/monMain.c -fi - -# for jinheng -if [[ "$dbName" == "jh" ]]; then - # Following files to change: - # * src/client/src/tscSystem.c - # * src/inc/taosdef.h - # * src/kit/shell/CMakeLists.txt - # * src/kit/shell/inc/shell.h - # * src/kit/shell/src/shellEngine.c - # * src/kit/shell/src/shellWindows.c - # * src/kit/taosdemo/taosdemo.c - # * src/kit/taosdump/taosdump.c - # * src/os/src/linux/linuxEnv.c - # * src/os/src/windows/wEnv.c - # * src/util/src/tconfig.c - # * src/util/src/tlog.c - - # src/dnode/src/dnodeSystem.c - sed -i "s/TDengine/jh_iot/g" ${top_dir}/src/dnode/src/dnodeSystem.c - # src/dnode/src/dnodeMain.c - sed -i "s/TDengine/jh_iot/g" ${top_dir}/src/dnode/src/dnodeMain.c - # TODO: src/dnode/CMakeLists.txt +if [[ "$dbName" != "taos" ]]; then + replace_community_$dbName fi # check support cpu type if [[ "$cpuType" == "x64" ]] || [[ "$cpuType" == "aarch64" ]] || [[ "$cpuType" == "aarch32" ]] || [[ "$cpuType" == "mips64" ]] ; then if [ "$verMode" != "cluster" ]; then - # community-version compile cmake ../ -DCPUTYPE=${cpuType} -DOSTYPE=${osType} -DSOMODE=${soMode} -DDBNAME=${dbName} -DVERTYPE=${verType} -DVERDATE="${build_time}" -DGITINFO=${gitinfo} -DGITINFOI=${gitinfoOfInternal} -DVERNUMBER=${verNumber} -DVERCOMPATIBLE=${verNumberComp} -DPAGMODE=${pagMode} ${allocator_macro} else - # enterprise-version compile - if [[ "$dbName" == "power" ]]; then - # enterprise/src/kit/perfMonitor/perfMonitor.c - sed -i "s/\"taosdata\"/\"powerdb\"/g" ${top_dir}/../enterprise/src/kit/perfMonitor/perfMonitor.c - sed -i "s/TDengine/PowerDB/g" ${top_dir}/../enterprise/src/kit/perfMonitor/perfMonitor.c - # enterprise/src/plugins/admin/src/httpAdminHandle.c - sed -i "s/taos\.cfg/power\.cfg/g" ${top_dir}/../enterprise/src/plugins/admin/src/httpAdminHandle.c - # enterprise/src/plugins/grant/src/grantMain.c - sed -i "s/taos\.cfg/power\.cfg/g" ${top_dir}/../enterprise/src/plugins/grant/src/grantMain.c - # enterprise/src/plugins/module/src/moduleMain.c - sed -i "s/taos\.cfg/power\.cfg/g" ${top_dir}/../enterprise/src/plugins/module/src/moduleMain.c - fi - if [[ "$dbName" == "tq" ]]; then - # enterprise/src/kit/perfMonitor/perfMonitor.c - sed -i "s/\"taosdata\"/\"tqueue\"/g" ${top_dir}/../enterprise/src/kit/perfMonitor/perfMonitor.c - sed -i "s/TDengine/TQueue/g" ${top_dir}/../enterprise/src/kit/perfMonitor/perfMonitor.c - # enterprise/src/plugins/admin/src/httpAdminHandle.c - sed -i "s/taos\.cfg/tq\.cfg/g" ${top_dir}/../enterprise/src/plugins/admin/src/httpAdminHandle.c - # enterprise/src/plugins/grant/src/grantMain.c - sed -i "s/taos\.cfg/tq\.cfg/g" ${top_dir}/../enterprise/src/plugins/grant/src/grantMain.c - # enterprise/src/plugins/module/src/moduleMain.c - sed -i "s/taos\.cfg/tq\.cfg/g" ${top_dir}/../enterprise/src/plugins/module/src/moduleMain.c - fi - if [[ "$dbName" == "pro" ]]; then - # enterprise/src/kit/perfMonitor/perfMonitor.c - sed -i "s/\"taosdata\"/\"prodb\"/g" ${top_dir}/../enterprise/src/kit/perfMonitor/perfMonitor.c - sed -i "s/TDengine/ProDB/g" ${top_dir}/../enterprise/src/kit/perfMonitor/perfMonitor.c - # enterprise/src/plugins/admin/src/httpAdminHandle.c - sed -i "s/taos\.cfg/prodb\.cfg/g" ${top_dir}/../enterprise/src/plugins/admin/src/httpAdminHandle.c - # enterprise/src/plugins/grant/src/grantMain.c - sed -i "s/taos\.cfg/prodb\.cfg/g" ${top_dir}/../enterprise/src/plugins/grant/src/grantMain.c - # enterprise/src/plugins/module/src/moduleMain.c - sed -i "s/taos\.cfg/prodb\.cfg/g" ${top_dir}/../enterprise/src/plugins/module/src/moduleMain.c + if [[ "$dbName" != "taos" ]]; then + replace_enterprise_$dbName fi - if [[ "$dbName" == "kh" ]]; then - # enterprise/src/kit/perfMonitor/perfMonitor.c - sed -i "s/\"taosdata\"/\"khroot\"/g" ${top_dir}/../enterprise/src/kit/perfMonitor/perfMonitor.c - sed -i "s/TDengine/KingHistorian/g" ${top_dir}/../enterprise/src/kit/perfMonitor/perfMonitor.c - # enterprise/src/plugins/admin/src/httpAdminHandle.c - sed -i "s/taos\.cfg/kinghistorian\.cfg/g" ${top_dir}/../enterprise/src/plugins/admin/src/httpAdminHandle.c - # enterprise/src/plugins/grant/src/grantMain.c - sed -i "s/taos\.cfg/kinghistorian\.cfg/g" ${top_dir}/../enterprise/src/plugins/grant/src/grantMain.c - # enterprise/src/plugins/module/src/moduleMain.c - sed -i "s/taos\.cfg/kinghistorian\.cfg/g" ${top_dir}/../enterprise/src/plugins/module/src/moduleMain.c - fi - if [[ "$dbName" == "jh" ]]; then - # enterprise/src/kit/perfMonitor/perfMonitor.c - sed -i "s/\"taosdata\"/\"jhdata\"/g" ${top_dir}/../enterprise/src/kit/perfMonitor/perfMonitor.c - sed -i "s/TDengine/jh_iot/g" ${top_dir}/../enterprise/src/kit/perfMonitor/perfMonitor.c - # enterprise/src/plugins/admin/src/httpAdminHandle.c - #sed -i "s/taos\.cfg/taos\.cfg/g" ${top_dir}/../enterprise/src/plugins/admin/src/httpAdminHandle.c - # enterprise/src/plugins/grant/src/grantMain.c - #sed -i "s/taos\.cfg/taos\.cfg/g" ${top_dir}/../enterprise/src/plugins/grant/src/grantMain.c - # enterprise/src/plugins/module/src/moduleMain.c - #sed -i "s/taos\.cfg/taos\.cfg/g" ${top_dir}/../enterprise/src/plugins/module/src/moduleMain.c - fi - cmake ../../ -DCPUTYPE=${cpuType} -DOSTYPE=${osType} -DSOMODE=${soMode} -DDBNAME=${dbName} -DVERTYPE=${verType} -DVERDATE="${build_time}" -DGITINFO=${gitinfo} -DGITINFOI=${gitinfoOfInternal} -DVERNUMBER=${verNumber} -DVERCOMPATIBLE=${verNumberComp} ${allocator_macro} fi else @@ -538,26 +260,10 @@ if [ "$osType" != "Darwin" ]; then ${csudo} ./makepkg.sh ${compile_dir} ${verNumber} "${build_time}" ${cpuType} ${osType} ${verMode} ${verType} ${pagMode} ${verNumberComp} ${csudo} ./makeclient.sh ${compile_dir} ${verNumber} "${build_time}" ${cpuType} ${osType} ${verMode} ${verType} ${pagMode} ${csudo} ./makearbi.sh ${compile_dir} ${verNumber} "${build_time}" ${cpuType} ${osType} ${verMode} ${verType} ${pagMode} - elif [[ "$dbName" == "tq" ]]; then - ${csudo} ./makepkg_tq.sh ${compile_dir} ${verNumber} "${build_time}" ${cpuType} ${osType} ${verMode} ${verType} ${pagMode} ${dbName} ${verNumberComp} - ${csudo} ./makeclient_tq.sh ${compile_dir} ${verNumber} "${build_time}" ${cpuType} ${osType} ${verMode} ${verType} ${pagMode} ${dbName} - ${csudo} ./makearbi_tq.sh ${compile_dir} ${verNumber} "${build_time}" ${cpuType} ${osType} ${verMode} ${verType} ${pagMode} - elif [[ "$dbName" == "pro" ]]; then - ${csudo} ./makepkg_pro.sh ${compile_dir} ${verNumber} "${build_time}" ${cpuType} ${osType} ${verMode} ${verType} ${pagMode} ${dbName} ${verNumberComp} - ${csudo} ./makeclient_pro.sh ${compile_dir} ${verNumber} "${build_time}" ${cpuType} ${osType} ${verMode} ${verType} ${pagMode} ${dbName} - ${csudo} ./makearbi_pro.sh ${compile_dir} ${verNumber} "${build_time}" ${cpuType} ${osType} ${verMode} ${verType} ${pagMode} - elif [[ "$dbName" == "kh" ]]; then - ${csudo} ./makepkg_kh.sh ${compile_dir} ${verNumber} "${build_time}" ${cpuType} ${osType} ${verMode} ${verType} ${pagMode} ${dbName} ${verNumberComp} - ${csudo} ./makeclient_kh.sh ${compile_dir} ${verNumber} "${build_time}" ${cpuType} ${osType} ${verMode} ${verType} ${pagMode} ${dbName} - ${csudo} ./makearbi_kh.sh ${compile_dir} ${verNumber} "${build_time}" ${cpuType} ${osType} ${verMode} ${verType} ${pagMode} - elif [[ "$dbName" == "jh" ]]; then - ${csudo} ./makepkg_jh.sh ${compile_dir} ${verNumber} "${build_time}" ${cpuType} ${osType} ${verMode} ${verType} ${pagMode} ${dbName} ${verNumberComp} - ${csudo} ./makeclient_jh.sh ${compile_dir} ${verNumber} "${build_time}" ${cpuType} ${osType} ${verMode} ${verType} ${pagMode} ${dbName} - ${csudo} ./makearbi_jh.sh ${compile_dir} ${verNumber} "${build_time}" ${cpuType} ${osType} ${verMode} ${verType} ${pagMode} else - ${csudo} ./makepkg_power.sh ${compile_dir} ${verNumber} "${build_time}" ${cpuType} ${osType} ${verMode} ${verType} ${pagMode} ${dbName} ${verNumberComp} - ${csudo} ./makeclient_power.sh ${compile_dir} ${verNumber} "${build_time}" ${cpuType} ${osType} ${verMode} ${verType} ${pagMode} ${dbName} - ${csudo} ./makearbi_power.sh ${compile_dir} ${verNumber} "${build_time}" ${cpuType} ${osType} ${verMode} ${verType} ${pagMode} + ${csudo} ./makepkg_$dbName.sh ${compile_dir} ${verNumber} "${build_time}" ${cpuType} ${osType} ${verMode} ${verType} ${pagMode} ${dbName} ${verNumberComp} + ${csudo} ./makeclient_$dbName.sh ${compile_dir} ${verNumber} "${build_time}" ${cpuType} ${osType} ${verMode} ${verType} ${pagMode} ${dbName} + ${csudo} ./makearbi_$dbName.sh ${compile_dir} ${verNumber} "${build_time}" ${cpuType} ${osType} ${verMode} ${verType} ${pagMode} fi else # only make client for Darwin diff --git a/packaging/sed_jh.bat b/packaging/sed_jh.bat new file mode 100644 index 0000000000000000000000000000000000000000..f7ce46562c913f4a6043c872fdec0104d0153d46 --- /dev/null +++ b/packaging/sed_jh.bat @@ -0,0 +1,76 @@ +set sed="C:\Program Files\Git\usr\bin\sed.exe" +set community_dir=%1 + +::cmake\install.inc +%sed% -i "s/C:\/TDengine/C:\/jh_iot/g" %community_dir%\cmake\install.inc +%sed% -i "s/taos\.cfg/jh_taos\.cfg/g" %community_dir%\cmake\install.inc +%sed% -i "s/taos\.exe/jh_taos\.exe/g" %community_dir%\cmake\install.inc +%sed% -i "s/taosdemo\.exe/jhdemo\.exe/g" %community_dir%\cmake\install.inc +%sed% -i "/src\/connector/d" %community_dir%\cmake\install.inc +%sed% -i "/tests\/examples/d" %community_dir%\cmake\install.inc +::src\kit\shell\CMakeLists.txt +%sed% -i "s/OUTPUT_NAME taos/OUTPUT_NAME jh_taos/g" %community_dir%\src\kit\shell\CMakeLists.txt +::src\kit\shell\inc\shell.h +%sed% -i "s/taos_history/jh_taos_history/g" %community_dir%\src\kit\shell\inc\shell.h +::src\inc\taosdef.h +%sed% -i "s/\"taosdata\"/\"jhdata\"/g" %community_dir%\src\inc\taosdef.h +::src\util\src\tconfig.c +%sed% -i "s/taos\.cfg/jh_taos\.cfg/g" %community_dir%\src\util\src\tconfig.c +%sed% -i "s/etc\/taos/etc\/jh_taos/g" %community_dir%\src\util\src\tconfig.c +::src\kit\taosdemo\CMakeLists.txt +%sed% -i "s/ADD_EXECUTABLE(taosdemo/ADD_EXECUTABLE(jhdemo/g" %community_dir%\src\kit\taosdemo\CMakeLists.txt +%sed% -i "s/TARGET_LINK_LIBRARIES(taosdemo/TARGET_LINK_LIBRARIES(jhdemo/g" %community_dir%\src\kit\taosdemo\CMakeLists.txt +::src\kit\taosdemo\taosdemo.c +%sed% -i "s/taosdemo --help/jhdemo --help/g" %community_dir%\src\kit\taosdemo\taosdemo.c +%sed% -i "s/taosdemo --usage/jhdemo --usage/g" %community_dir%\src\kit\taosdemo\taosdemo.c +%sed% -i "s/Usage: taosdemo/Usage: jhdemo/g" %community_dir%\src\kit\taosdemo\taosdemo.c +%sed% -i "s/taosdemo is simulating/jhdemo is simulating/g" %community_dir%\src\kit\taosdemo\taosdemo.c +%sed% -i "s/taosdemo version/jhdemo version/g" %community_dir%\src\kit\taosdemo\taosdemo.c +%sed% -i "s/\"taosdata\"/\"jhdata\"/g" %community_dir%\src\kit\taosdemo\taosdemo.c +%sed% -i "s/support@taosdata\.com/jhkj@njsteel\.com\.cn/g" %community_dir%\src\kit\taosdemo\taosdemo.c +%sed% -i "s/taosc, rest, and stmt/jh_taos, rest, and stmt/g" %community_dir%\src\kit\taosdemo\taosdemo.c +%sed% -i "s/taosdemo uses/jhdemo uses/g" %community_dir%\src\kit\taosdemo\taosdemo.c +%sed% -i "s/use 'taosc'/use 'jh_taos'/g" %community_dir%\src\kit\taosdemo\taosdemo.c +::src\util\src\tlog.c +%sed% -i "s/log\/taos/log\/jh_taos/g" %community_dir%\src\util\src\tlog.c +::src\dnode\src\dnodeSystem.c +%sed% -i "s/TDengine/jh_iot/g" %community_dir%\src\dnode\src\dnodeSystem.c +::src\dnode\src\dnodeMain.c +%sed% -i "s/TDengine/jh_iot/g" %community_dir%\src\dnode\src\dnodeMain.c +%sed% -i "s/taosdlog/jh_taosdlog/g" %community_dir%\src\dnode\src\dnodeMain.c +::src\client\src\tscSystem.c +%sed% -i "s/taoslog/jh_taoslog/g" %community_dir%\src\client\src\tscSystem.c +::src\util\src\tnote.c +%sed% -i "s/taosinfo/jh_taosinfo/g" %community_dir%\src\util\src\tnote.c +::src\dnode\CMakeLists.txt +%sed% -i "s/taos\.cfg/jh_taos\.cfg/g" %community_dir%\src\dnode\CMakeLists.txt +::src\kit\taosdump\taosdump.c +%sed% -i "s/support@taosdata\.com/jhkj@njsteel\.com\.cn/g" %community_dir%\src\kit\taosdump\taosdump.c +%sed% -i "s/Default is taosdata/Default is jhdata/g" %community_dir%\src\kit\taosdump\taosdump.c +%sed% -i "s/\"taosdata\"/\"jhdata\"/g" %community_dir%\src\kit\taosdump\taosdump.c +%sed% -i "s/TDengine/jh_iot/g" %community_dir%\src\kit\taosdump\taosdump.c +%sed% -i "s/taos\/taos\.cfg/jh_taos\/jh_taos\.cfg/g" %community_dir%\src\kit\taosdump\taosdump.c +::src\os\src\linux\linuxEnv.c +%sed% -i "s/etc\/taos/etc\/jh_taos/g" %community_dir%\src\os\src\linux\linuxEnv.c +%sed% -i "s/lib\/taos/lib\/jh_taos/g" %community_dir%\src\os\src\linux\linuxEnv.c +%sed% -i "s/log\/taos/log\/jh_taos/g" %community_dir%\src\os\src\linux\linuxEnv.c +::src\kit\shell\src\shellDarwin.c +%sed% -i "s/TDengine shell/jh_iot shell/g" %community_dir%\src\kit\shell\src\shellDarwin.c +%sed% -i "s/2020 by TAOS Data/2021 by Jinheng Technology/g" %community_dir%\src\kit\shell\src\shellDarwin.c +::src\kit\shell\src\shellLinux.c +%sed% -i "s/support@taosdata\.com/jhkj@njsteel\.com\.cn/g" %community_dir%\src\kit\shell\src\shellLinux.c +%sed% -i "s/TDengine shell/jh_iot shell/g" %community_dir%\src\kit\shell\src\shellLinux.c +%sed% -i "s/2020 by TAOS Data/2021 by Jinheng Technology/g" %community_dir%\src\kit\shell\src\shellLinux.c +::src\os\src\windows\wEnv.c +%sed% -i "s/TDengine/jh_iot/g" %community_dir%\src\os\src\windows\wEnv.c +::src\kit\shell\src\shellEngine.c +%sed% -i "s/TDengine shell/jh_iot shell/g" %community_dir%\src\kit\shell\src\shellEngine.c +%sed% -i "s/2020 by TAOS Data, Inc/2021 by Jinheng Technology, Inc/g" %community_dir%\src\kit\shell\src\shellEngine.c +%sed% -i "s/taos connect failed/jh_taos connect failed/g" %community_dir%\src\kit\shell\src\shellEngine.c +%sed% -i "s/\"taos^> \"/\"jh_taos^> \"/g" %community_dir%\src\kit\shell\src\shellEngine.c +%sed% -i "s/\" -^> \"/\" -^> \"/g" %community_dir%\src\kit\shell\src\shellEngine.c +%sed% -i "s/prompt_size = 6/prompt_size = 9/g" %community_dir%\src\kit\shell\src\shellEngine.c +::src\rpc\src\rpcMain.c +%sed% -i "s/taos connections/jh_taos connections/g" %community_dir%\src\rpc\src\rpcMain.c +::src\plugins\monitor\src\monMain.c +%sed% -i "s/taosd is quiting/jh_taosd is quiting/g" %community_dir%\src\plugins\monitor\src\monMain.c diff --git a/packaging/sed_jh.sh b/packaging/sed_jh.sh new file mode 100755 index 0000000000000000000000000000000000000000..6916a44eb5c51c15c9dc46b84bde1a8f88f43aee --- /dev/null +++ b/packaging/sed_jh.sh @@ -0,0 +1,82 @@ +#!/bin/bash + +function replace_community_jh(){ + # cmake/install.inc + sed -i "s/C:\/TDengine/C:\/jh_iot/g" ${top_dir}/cmake/install.inc + sed -i "s/taos\.cfg/jh_taos\.cfg/g" ${top_dir}/cmake/install.inc + sed -i "s/taos\.exe/jh_taos\.exe/g" ${top_dir}/cmake/install.inc + sed -i "s/taosdemo\.exe/jhdemo\.exe/g" ${top_dir}/cmake/install.inc + # src/kit/shell/inc/shell.h + sed -i "s/taos_history/jh_taos_history/g" ${top_dir}/src/kit/shell/inc/shell.h + # src/inc/taosdef.h + sed -i "s/\"taosdata\"/\"jhdata\"/g" ${top_dir}/src/inc/taosdef.h + # src/util/src/tconfig.c + sed -i "s/taos\.cfg/jh_taos\.cfg/g" ${top_dir}/src/util/src/tconfig.c + sed -i "s/etc\/taos/etc\/jh_taos/g" ${top_dir}/src/util/src/tconfig.c + # src/kit/taosdemo/taosdemo.c + sed -i "s/taosdemo --help/jhdemo --help/g" ${top_dir}/src/kit/taosdemo/taosdemo.c + sed -i "s/taosdemo --usage/jhdemo --usage/g" ${top_dir}/src/kit/taosdemo/taosdemo.c + sed -i "s/Usage: taosdemo/Usage: jhdemo/g" ${top_dir}/src/kit/taosdemo/taosdemo.c + sed -i "s/taosdemo is simulating/jhdemo is simulating/g" ${top_dir}/src/kit/taosdemo/taosdemo.c + sed -i "s/taosdemo version/jhdemo version/g" ${top_dir}/src/kit/taosdemo/taosdemo.c + sed -i "s/\"taosdata\"/\"jhdata\"/g" ${top_dir}/src/kit/taosdemo/taosdemo.c + sed -i "s/support@taosdata\.com/jhkj@njsteel\.com\.cn/g" ${top_dir}/src/kit/taosdemo/taosdemo.c + sed -i "s/taosc, rest, and stmt/jh_taos, rest, and stmt/g" ${top_dir}/src/kit/taosdemo/taosdemo.c + sed -i "s/taosdemo uses/jhdemo uses/g" ${top_dir}/src/kit/taosdemo/taosdemo.c + sed -i "s/use 'taosc'/use 'jh_taos'/g" ${top_dir}/src/kit/taosdemo/taosdemo.c + # src/util/src/tlog.c + sed -i "s/log\/taos/log\/jh_taos/g" ${top_dir}/src/util/src/tlog.c + # src/dnode/src/dnodeSystem.c + sed -i "s/TDengine/jh_iot/g" ${top_dir}/src/dnode/src/dnodeSystem.c + # src/dnode/src/dnodeMain.c + sed -i "s/TDengine/jh_iot/g" ${top_dir}/src/dnode/src/dnodeMain.c + sed -i "s/taosdlog/jh_taosdlog/g" ${top_dir}/src/dnode/src/dnodeMain.c + # src/client/src/tscSystem.c + sed -i "s/taoslog/jh_taoslog/g" ${top_dir}/src/client/src/tscSystem.c + # src/util/src/tnote.c + sed -i "s/taosinfo/jh_taosinfo/g" ${top_dir}/src/util/src/tnote.c + # src/dnode/CMakeLists.txt + sed -i "s/taos\.cfg/jh_taos\.cfg/g" ${top_dir}/src/dnode/CMakeLists.txt + # src/kit/taosdump/taosdump.c + sed -i "s/support@taosdata\.com/jhkj@njsteel\.com\.cn/g" ${top_dir}/src/kit/taosdump/taosdump.c + sed -i "s/Default is taosdata/Default is jhdata/g" ${top_dir}/src/kit/taosdump/taosdump.c + sed -i "s/\"taosdata\"/\"jhdata\"/g" ${top_dir}/src/kit/taosdump/taosdump.c + sed -i "s/TDengine/jh_iot/g" ${top_dir}/src/kit/taosdump/taosdump.c + sed -i "s/taos\/taos\.cfg/jh_taos\/jh_taos\.cfg/g" ${top_dir}/src/kit/taosdump/taosdump.c + # src/os/src/linux/linuxEnv.c + sed -i "s/etc\/taos/etc\/jh_taos/g" ${top_dir}/src/os/src/linux/linuxEnv.c + sed -i "s/lib\/taos/lib\/jh_taos/g" ${top_dir}/src/os/src/linux/linuxEnv.c + sed -i "s/log\/taos/log\/jh_taos/g" ${top_dir}/src/os/src/linux/linuxEnv.c + # src/kit/shell/src/shellDarwin.c + sed -i "s/TDengine shell/jh_iot shell/g" ${top_dir}/src/kit/shell/src/shellDarwin.c + sed -i "s/2020 by TAOS Data/2021 by Jinheng Technology/g" ${top_dir}/src/kit/shell/src/shellDarwin.c + # src/kit/shell/src/shellLinux.c + sed -i "s/support@taosdata\.com/jhkj@njsteel\.com\.cn/g" ${top_dir}/src/kit/shell/src/shellLinux.c + sed -i "s/TDengine shell/jh_iot shell/g" ${top_dir}/src/kit/shell/src/shellLinux.c + sed -i "s/2020 by TAOS Data/2021 by Jinheng Technology/g" ${top_dir}/src/kit/shell/src/shellLinux.c + # src/os/src/windows/wEnv.c + sed -i "s/C:\/TDengine/C:\/jh_iot/g" ${top_dir}/src/os/src/windows/wEnv.c + # src/kit/shell/src/shellEngine.c + sed -i "s/TDengine shell/jh_iot shell/g" ${top_dir}/src/kit/shell/src/shellEngine.c + sed -i "s/2020 by TAOS Data, Inc/2021 by Jinheng Technology, Inc/g" ${top_dir}/src/kit/shell/src/shellEngine.c + sed -i "s/taos connect failed/jh_taos connect failed/g" ${top_dir}/src/kit/shell/src/shellEngine.c + sed -i "s/\"taos> \"/\"jh_taos> \"/g" ${top_dir}/src/kit/shell/src/shellEngine.c + sed -i "s/\" -> \"/\" -> \"/g" ${top_dir}/src/kit/shell/src/shellEngine.c + sed -i "s/prompt_size = 6/prompt_size = 9/g" ${top_dir}/src/kit/shell/src/shellEngine.c + # src/rpc/src/rpcMain.c + sed -i "s/taos connections/jh_taos connections/g" ${top_dir}/src/rpc/src/rpcMain.c + # src/plugins/monitor/src/monMain.c + sed -i "s/taosd is quiting/jh_taosd is quiting/g" ${top_dir}/src/plugins/monitor/src/monMain.c +} + +function replace_enterprise_jh(){ + # enterprise/src/kit/perfMonitor/perfMonitor.c + sed -i "s/\"taosdata\"/\"jhdata\"/g" ${top_dir}/../enterprise/src/kit/perfMonitor/perfMonitor.c + sed -i "s/TDengine/jh_iot/g" ${top_dir}/../enterprise/src/kit/perfMonitor/perfMonitor.c + # enterprise/src/plugins/admin/src/httpAdminHandle.c + sed -i "s/taos\.cfg/jh_taos\.cfg/g" ${top_dir}/../enterprise/src/plugins/admin/src/httpAdminHandle.c + # enterprise/src/plugins/grant/src/grantMain.c + sed -i "s/taos\.cfg/jh_taos\.cfg/g" ${top_dir}/../enterprise/src/plugins/grant/src/grantMain.c + # enterprise/src/plugins/module/src/moduleMain.c + sed -i "s/taos\.cfg/jh_taos\.cfg/g" ${top_dir}/../enterprise/src/plugins/module/src/moduleMain.c +} diff --git a/packaging/sed_kh.bat b/packaging/sed_kh.bat new file mode 100644 index 0000000000000000000000000000000000000000..975bdbbcc03d78f21b8b7532031d60f97a687d0a --- /dev/null +++ b/packaging/sed_kh.bat @@ -0,0 +1,76 @@ +set sed="C:\Program Files\Git\usr\bin\sed.exe" +set community_dir=%1 + +::cmake\install.inc +%sed% -i "s/C:\/TDengine/C:\/KingHistorian/g" %community_dir%\cmake\install.inc +%sed% -i "s/taos\.cfg/kinghistorian\.cfg/g" %community_dir%\cmake\install.inc +%sed% -i "s/taos\.exe/khclient\.exe/g" %community_dir%\cmake\install.inc +%sed% -i "s/taosdemo\.exe/khdemo\.exe/g" %community_dir%\cmake\install.inc +%sed% -i "/src\/connector/d" %community_dir%\cmake\install.inc +%sed% -i "/tests\/examples/d" %community_dir%\cmake\install.inc +::src\kit\shell\CMakeLists.txt +%sed% -i "s/OUTPUT_NAME taos/OUTPUT_NAME khclient/g" %community_dir%\src\kit\shell\CMakeLists.txt +::src\kit\shell\inc\shell.h +%sed% -i "s/taos_history/kh_history/g" %community_dir%\src\kit\shell\inc\shell.h +::src\inc\taosdef.h +%sed% -i "s/\"taosdata\"/\"khroot\"/g" %community_dir%\src\inc\taosdef.h +::src\util\src\tconfig.c +%sed% -i "s/taos\.cfg/kinghistorian\.cfg/g" %community_dir%\src\util\src\tconfig.c +%sed% -i "s/etc\/taos/etc\/kinghistorian/g" %community_dir%\src\util\src\tconfig.c +::src\kit\taosdemo\CMakeLists.txt +%sed% -i "s/ADD_EXECUTABLE(taosdemo/ADD_EXECUTABLE(khdemo/g" %community_dir%\src\kit\taosdemo\CMakeLists.txt +%sed% -i "s/TARGET_LINK_LIBRARIES(taosdemo/TARGET_LINK_LIBRARIES(khdemo/g" %community_dir%\src\kit\taosdemo\CMakeLists.txt +::src\kit\taosdemo\taosdemo.c +%sed% -i "s/taosdemo --help/khdemo --help/g" %community_dir%\src\kit\taosdemo\taosdemo.c +%sed% -i "s/taosdemo --usage/khdemo --usage/g" %community_dir%\src\kit\taosdemo\taosdemo.c +%sed% -i "s/Usage: taosdemo/Usage: khdemo/g" %community_dir%\src\kit\taosdemo\taosdemo.c +%sed% -i "s/taosdemo is simulating/khdemo is simulating/g" %community_dir%\src\kit\taosdemo\taosdemo.c +%sed% -i "s/taosdemo version/khdemo version/g" %community_dir%\src\kit\taosdemo\taosdemo.c +%sed% -i "s/\"taosdata\"/\"khroot\"/g" %community_dir%\src\kit\taosdemo\taosdemo.c +%sed% -i "s/support@taosdata\.com/support@wellintech\.com/g" %community_dir%\src\kit\taosdemo\taosdemo.c +%sed% -i "s/taosc, rest, and stmt/khclient, rest, and stmt/g" %community_dir%\src\kit\taosdemo\taosdemo.c +%sed% -i "s/taosdemo uses/khdemo uses/g" %community_dir%\src\kit\taosdemo\taosdemo.c +%sed% -i "s/use 'taosc'/use 'khclient'/g" %community_dir%\src\kit\taosdemo\taosdemo.c +::src\util\src\tlog.c +%sed% -i "s/log\/taos/log\/kinghistorian/g" %community_dir%\src\util\src\tlog.c +::src\dnode\src\dnodeSystem.c +%sed% -i "s/TDengine/KingHistorian/g" %community_dir%\src\dnode\src\dnodeSystem.c +::src\dnode\src\dnodeMain.c +%sed% -i "s/TDengine/KingHistorian/g" %community_dir%\src\dnode\src\dnodeMain.c +%sed% -i "s/taosdlog/khserverlog/g" %community_dir%\src\dnode\src\dnodeMain.c +::src\client\src\tscSystem.c +%sed% -i "s/taoslog/khclientlog/g" %community_dir%\src\client\src\tscSystem.c +::src\util\src\tnote.c +%sed% -i "s/taosinfo/khinfo/g" %community_dir%\src\util\src\tnote.c +::src\dnode\CMakeLists.txt +%sed% -i "s/taos\.cfg/kinghistorian\.cfg/g" %community_dir%\src\dnode\CMakeLists.txt +::src\kit\taosdump\taosdump.c +%sed% -i "s/support@taosdata\.com/support@wellintech\.com/g" %community_dir%\src\kit\taosdump\taosdump.c +%sed% -i "s/Default is taosdata/Default is khroot/g" %community_dir%\src\kit\taosdump\taosdump.c +%sed% -i "s/\"taosdata\"/\"khroot\"/g" %community_dir%\src\kit\taosdump\taosdump.c +%sed% -i "s/TDengine/KingHistorian/g" %community_dir%\src\kit\taosdump\taosdump.c +%sed% -i "s/taos\/taos\.cfg/kinghistorian\/kinghistorian\.cfg/g" %community_dir%\src\kit\taosdump\taosdump.c +::src\os\src\linux\linuxEnv.c +%sed% -i "s/etc\/taos/etc\/kinghistorian/g" %community_dir%\src\os\src\linux\linuxEnv.c +%sed% -i "s/lib\/taos/lib\/kinghistorian/g" %community_dir%\src\os\src\linux\linuxEnv.c +%sed% -i "s/log\/taos/log\/kinghistorian/g" %community_dir%\src\os\src\linux\linuxEnv.c +::src\kit\shell\src\shellDarwin.c +%sed% -i "s/TDengine shell/KingHistorian shell/g" %community_dir%\src\kit\shell\src\shellDarwin.c +%sed% -i "s/2020 by TAOS Data/2021 by Wellintech/g" %community_dir%\src\kit\shell\src\shellDarwin.c +::src\kit\shell\src\shellLinux.c +%sed% -i "s/support@taosdata\.com/support@wellintech\.com/g" %community_dir%\src\kit\shell\src\shellLinux.c +%sed% -i "s/TDengine shell/KingHistorian shell/g" %community_dir%\src\kit\shell\src\shellLinux.c +%sed% -i "s/2020 by TAOS Data/2021 by Wellintech/g" %community_dir%\src\kit\shell\src\shellLinux.c +::src\os\src\windows\wEnv.c +%sed% -i "s/TDengine/KingHistorian/g" %community_dir%\src\os\src\windows\wEnv.c +::src\kit\shell\src\shellEngine.c +%sed% -i "s/TDengine shell/KingHistorian shell/g" %community_dir%\src\kit\shell\src\shellEngine.c +%sed% -i "s/2020 by TAOS Data, Inc/2021 by Wellintech, Inc/g" %community_dir%\src\kit\shell\src\shellEngine.c +%sed% -i "s/taos connect failed/kh connect failed/g" %community_dir%\src\kit\shell\src\shellEngine.c +%sed% -i "s/\"taos^> \"/\"khclient^> \"/g" %community_dir%\src\kit\shell\src\shellEngine.c +%sed% -i "s/\" -^> \"/\" -^> \"/g" %community_dir%\src\kit\shell\src\shellEngine.c +%sed% -i "s/prompt_size = 6/prompt_size = 10/g" %community_dir%\src\kit\shell\src\shellEngine.c +::src\rpc\src\rpcMain.c +%sed% -i "s/taos connections/kh connections/g" %community_dir%\src\rpc\src\rpcMain.c +::src\plugins\monitor\src\monMain.c +%sed% -i "s/taosd is quiting/khserver is quiting/g" %community_dir%\src\plugins\monitor\src\monMain.c \ No newline at end of file diff --git a/packaging/sed_kh.sh b/packaging/sed_kh.sh new file mode 100755 index 0000000000000000000000000000000000000000..64fd57b3d5674cb4044a10ca4b43c547a6c78dbe --- /dev/null +++ b/packaging/sed_kh.sh @@ -0,0 +1,81 @@ +#!/bin/bash + +function replace_community_kh(){ + # cmake/install.inc + sed -i "s/C:\/TDengine/C:\/KingHistorian/g" ${top_dir}/cmake/install.inc + sed -i "s/taos\.cfg/kinghistorian\.cfg/g" ${top_dir}/cmake/install.inc + sed -i "s/taos\.exe/khclient\.exe/g" ${top_dir}/cmake/install.inc + sed -i "s/taosdemo\.exe/khdemo\.exe/g" ${top_dir}/cmake/install.inc + # src/kit/shell/inc/shell.h + sed -i "s/taos_history/kh_history/g" ${top_dir}/src/kit/shell/inc/shell.h + # src/inc/taosdef.h + sed -i "s/\"taosdata\"/\"khroot\"/g" ${top_dir}/src/inc/taosdef.h + # src/util/src/tconfig.c + sed -i "s/taos\.cfg/kinghistorian\.cfg/g" ${top_dir}/src/util/src/tconfig.c + sed -i "s/etc\/taos/etc\/kinghistorian/g" ${top_dir}/src/util/src/tconfig.c + # src/kit/taosdemo/taosdemo.c + sed -i "s/taosdemo --help/khdemo --help/g" ${top_dir}/src/kit/taosdemo/taosdemo.c + sed -i "s/taosdemo --usage/khdemo --usage/g" ${top_dir}/src/kit/taosdemo/taosdemo.c + sed -i "s/Usage: taosdemo/Usage: khdemo/g" ${top_dir}/src/kit/taosdemo/taosdemo.c + sed -i "s/taosdemo is simulating/khdemo is simulating/g" ${top_dir}/src/kit/taosdemo/taosdemo.c + sed -i "s/taosdemo version/khdemo version/g" ${top_dir}/src/kit/taosdemo/taosdemo.c + sed -i "s/\"taosdata\"/\"khroot\"/g" ${top_dir}/src/kit/taosdemo/taosdemo.c + sed -i "s/support@taosdata\.com/support@wellintech\.com/g" ${top_dir}/src/kit/taosdemo/taosdemo.c + sed -i "s/taosc, rest, and stmt/khclient, rest, and stmt/g" ${top_dir}/src/kit/taosdemo/taosdemo.c + sed -i "s/taosdemo uses/khdemo uses/g" ${top_dir}/src/kit/taosdemo/taosdemo.c + sed -i "s/use 'taosc'/use 'khclient'/g" ${top_dir}/src/kit/taosdemo/taosdemo.c + # src/util/src/tlog.c + sed -i "s/log\/taos/log\/kinghistorian/g" ${top_dir}/src/util/src/tlog.c + # src/dnode/src/dnodeSystem.c + sed -i "s/TDengine/KingHistorian/g" ${top_dir}/src/dnode/src/dnodeSystem.c + sed -i "s/TDengine/KingHistorian/g" ${top_dir}/src/dnode/src/dnodeMain.c + sed -i "s/taosdlog/khserverlog/g" ${top_dir}/src/dnode/src/dnodeMain.c + # src/client/src/tscSystem.c + sed -i "s/taoslog/khclientlog/g" ${top_dir}/src/client/src/tscSystem.c + # src/util/src/tnote.c + sed -i "s/taosinfo/khinfo/g" ${top_dir}/src/util/src/tnote.c + # src/dnode/CMakeLists.txt + sed -i "s/taos\.cfg/kinghistorian\.cfg/g" ${top_dir}/src/dnode/CMakeLists.txt + # src/kit/taosdump/taosdump.c + sed -i "s/support@taosdata\.com/support@wellintech\.com/g" ${top_dir}/src/kit/taosdump/taosdump.c + sed -i "s/Default is taosdata/Default is khroot/g" ${top_dir}/src/kit/taosdump/taosdump.c + sed -i "s/\"taosdata\"/\"khroot\"/g" ${top_dir}/src/kit/taosdump/taosdump.c + sed -i "s/TDengine/KingHistorian/g" ${top_dir}/src/kit/taosdump/taosdump.c + sed -i "s/taos\/taos\.cfg/kinghistorian\/kinghistorian\.cfg/g" ${top_dir}/src/kit/taosdump/taosdump.c + # src/os/src/linux/linuxEnv.c + sed -i "s/etc\/taos/etc\/kinghistorian/g" ${top_dir}/src/os/src/linux/linuxEnv.c + sed -i "s/lib\/taos/lib\/kinghistorian/g" ${top_dir}/src/os/src/linux/linuxEnv.c + sed -i "s/log\/taos/log\/kinghistorian/g" ${top_dir}/src/os/src/linux/linuxEnv.c + # src/kit/shell/src/shellDarwin.c + sed -i "s/TDengine shell/KingHistorian shell/g" ${top_dir}/src/kit/shell/src/shellDarwin.c + sed -i "s/2020 by TAOS Data/2021 by Wellintech/g" ${top_dir}/src/kit/shell/src/shellDarwin.c + # src/kit/shell/src/shellLinux.c + sed -i "s/support@taosdata\.com/support@wellintech\.com/g" ${top_dir}/src/kit/shell/src/shellLinux.c + sed -i "s/TDengine shell/KingHistorian shell/g" ${top_dir}/src/kit/shell/src/shellLinux.c + sed -i "s/2020 by TAOS Data/2021 by Wellintech/g" ${top_dir}/src/kit/shell/src/shellLinux.c + # src/os/src/windows/wEnv.c + sed -i "s/TDengine/KingHistorian/g" ${top_dir}/src/os/src/windows/wEnv.c + # src/kit/shell/src/shellEngine.c + sed -i "s/TDengine shell/KingHistorian shell/g" ${top_dir}/src/kit/shell/src/shellEngine.c + sed -i "s/2020 by TAOS Data, Inc/2021 by Wellintech, Inc/g" ${top_dir}/src/kit/shell/src/shellEngine.c + sed -i "s/taos connect failed/kh connect failed/g" ${top_dir}/src/kit/shell/src/shellEngine.c + sed -i "s/\"taos> \"/\"khclient> \"/g" ${top_dir}/src/kit/shell/src/shellEngine.c + sed -i "s/\" -> \"/\" -> \"/g" ${top_dir}/src/kit/shell/src/shellEngine.c + sed -i "s/prompt_size = 6/prompt_size = 10/g" ${top_dir}/src/kit/shell/src/shellEngine.c + # src/rpc/src/rpcMain.c + sed -i "s/taos connections/kh connections/g" ${top_dir}/src/rpc/src/rpcMain.c + # src/plugins/monitor/src/monMain.c + sed -i "s/taosd is quiting/khserver is quiting/g" ${top_dir}/src/plugins/monitor/src/monMain.c +} + +function replace_enterprise_kh(){ + # enterprise/src/kit/perfMonitor/perfMonitor.c + sed -i "s/\"taosdata\"/\"khroot\"/g" ${top_dir}/../enterprise/src/kit/perfMonitor/perfMonitor.c + sed -i "s/TDengine/KingHistorian/g" ${top_dir}/../enterprise/src/kit/perfMonitor/perfMonitor.c + # enterprise/src/plugins/admin/src/httpAdminHandle.c + sed -i "s/taos\.cfg/kinghistorian\.cfg/g" ${top_dir}/../enterprise/src/plugins/admin/src/httpAdminHandle.c + # enterprise/src/plugins/grant/src/grantMain.c + sed -i "s/taos\.cfg/kinghistorian\.cfg/g" ${top_dir}/../enterprise/src/plugins/grant/src/grantMain.c + # enterprise/src/plugins/module/src/moduleMain.c + sed -i "s/taos\.cfg/kinghistorian\.cfg/g" ${top_dir}/../enterprise/src/plugins/module/src/moduleMain.c +} diff --git a/packaging/sed_power.bat b/packaging/sed_power.bat new file mode 100644 index 0000000000000000000000000000000000000000..2b02504408e0f78335c1df1f15bf6fb25c97fc57 --- /dev/null +++ b/packaging/sed_power.bat @@ -0,0 +1,48 @@ +set sed="C:\Program Files\Git\usr\bin\sed.exe" +set community_dir=%1 + +::cmake\install.inc +%sed% -i "s/C:\/TDengine/C:\/Power/g" %community_dir%\cmake\install.inc +%sed% -i "s/taos\.cfg/power\.cfg/g" %community_dir%\cmake\install.inc +%sed% -i "s/taos\.exe/power\.exe/g" %community_dir%\cmake\install.inc +%sed% -i "/src\/connector/d" %community_dir%\cmake\install.inc +%sed% -i "/tests\/examples/d" %community_dir%\cmake\install.inc +::src\kit\shell\CMakeLists.txt +%sed% -i "s/OUTPUT_NAME taos/OUTPUT_NAME power/g" %community_dir%\src\kit\shell\CMakeLists.txt +::src\kit\shell\inc\shell.h +%sed% -i "s/taos_history/power_history/g" %community_dir%\src\kit\shell\inc\shell.h +::src\inc\taosdef.h +%sed% -i "s/\"taosdata\"/\"powerdb\"/g" %community_dir%\src\inc\taosdef.h +::src\util\src\tconfig.c +%sed% -i "s/taos\.cfg/power\.cfg/g" %community_dir%\src\util\src\tconfig.c +%sed% -i "s/etc\/taos/etc\/power/g" %community_dir%\src\util\src\tconfig.c +::src\util\src\tlog.c +%sed% -i "s/log\/taos/log\/power/g" %community_dir%\src\util\src\tlog.c +::src\dnode\src\dnodeSystem.c +%sed% -i "s/TDengine/Power/g" %community_dir%\src\dnode\src\dnodeSystem.c +::src\dnode\src\dnodeMain.c +%sed% -i "s/TDengine/Power/g" %community_dir%\src\dnode\src\dnodeMain.c +%sed% -i "s/taosdlog/powerdlog/g" %community_dir%\src\dnode\src\dnodeMain.c +::src\client\src\tscSystem.c +%sed% -i "s/taoslog/powerlog/g" %community_dir%\src\client\src\tscSystem.c +::src\util\src\tnote.c +%sed% -i "s/taosinfo/powerinfo/g" %community_dir%\src\util\src\tnote.c +::src\dnode\CMakeLists.txt +%sed% -i "s/taos\.cfg/power\.cfg/g" %community_dir%\src\dnode\CMakeLists.txt +::src\os\src\linux\linuxEnv.c +%sed% -i "s/etc\/taos/etc\/power/g" %community_dir%\src\os\src\linux\linuxEnv.c +%sed% -i "s/lib\/taos/lib\/power/g" %community_dir%\src\os\src\linux\linuxEnv.c +%sed% -i "s/log\/taos/log\/power/g" %community_dir%\src\os\src\linux\linuxEnv.c +::src\os\src\windows\wEnv.c +%sed% -i "s/TDengine/Power/g" %community_dir%\src\os\src\windows\wEnv.c +::src\kit\shell\src\shellEngine.c +%sed% -i "s/TDengine shell/Power shell/g" %community_dir%\src\kit\shell\src\shellEngine.c +%sed% -i "s/2020 by TAOS Data, Inc/2020 by PowerDB, Inc/g" %community_dir%\src\kit\shell\src\shellEngine.c +%sed% -i "s/taos connect failed/power connect failed/g" %community_dir%\src\kit\shell\src\shellEngine.c +%sed% -i "s/\"taos^> \"/\"power^> \"/g" %community_dir%\src\kit\shell\src\shellEngine.c +%sed% -i "s/\" -^> \"/\" -^> \"/g" %community_dir%\src\kit\shell\src\shellEngine.c +%sed% -i "s/prompt_size = 6/prompt_size = 7/g" %community_dir%\src\kit\shell\src\shellEngine.c +::src\rpc\src\rpcMain.c +%sed% -i "s/taos connections/power connections/g" %community_dir%\src\rpc\src\rpcMain.c +::src\plugins\monitor\src\monMain.c +%sed% -i "s/taosd is quiting/powerd is quiting/g" %community_dir%\src\plugins\monitor\src\monMain.c diff --git a/packaging/sed_power.sh b/packaging/sed_power.sh new file mode 100755 index 0000000000000000000000000000000000000000..0188a4645a6a40645177d63eccfe9af673b688d4 --- /dev/null +++ b/packaging/sed_power.sh @@ -0,0 +1,81 @@ +#!/bin/bash + +function replace_community_power(){ + # cmake/install.inc + sed -i "s/C:\/TDengine/C:\/Power/g" ${top_dir}/cmake/install.inc + sed -i "s/taos\.cfg/power\.cfg/g" ${top_dir}/cmake/install.inc + sed -i "s/taos\.exe/power\.exe/g" ${top_dir}/cmake/install.inc + sed -i "s/taosdemo\.exe/powerdemo\.exe/g" ${top_dir}/cmake/install.inc + # src/kit/shell/inc/shell.h + sed -i "s/taos_history/power_history/g" ${top_dir}/src/kit/shell/inc/shell.h + # src/inc/taosdef.h + sed -i "s/\"taosdata\"/\"powerdb\"/g" ${top_dir}/src/inc/taosdef.h + # src/util/src/tconfig.c + sed -i "s/taos\.cfg/power\.cfg/g" ${top_dir}/src/util/src/tconfig.c + sed -i "s/etc\/taos/etc\/power/g" ${top_dir}/src/util/src/tconfig.c + + + + + + + + + + + + # src/util/src/tlog.c + sed -i "s/log\/taos/log\/power/g" ${top_dir}/src/util/src/tlog.c + # src/dnode/src/dnodeSystem.c + sed -i "s/TDengine/Power/g" ${top_dir}/src/dnode/src/dnodeSystem.c + sed -i "s/TDengine/Power/g" ${top_dir}/src/dnode/src/dnodeMain.c + sed -i "s/taosdlog/powerdlog/g" ${top_dir}/src/dnode/src/dnodeMain.c + # src/client/src/tscSystem.c + sed -i "s/taoslog/powerlog/g" ${top_dir}/src/client/src/tscSystem.c + # src/util/src/tnote.c + sed -i "s/taosinfo/powerinfo/g" ${top_dir}/src/util/src/tnote.c + # src/dnode/CMakeLists.txt + sed -i "s/taos\.cfg/power\.cfg/g" ${top_dir}/src/dnode/CMakeLists.txt + + + + + + + # src/os/src/linux/linuxEnv.c + sed -i "s/etc\/taos/etc\/power/g" ${top_dir}/src/os/src/linux/linuxEnv.c + sed -i "s/lib\/taos/lib\/power/g" ${top_dir}/src/os/src/linux/linuxEnv.c + sed -i "s/log\/taos/log\/power/g" ${top_dir}/src/os/src/linux/linuxEnv.c + + + + # src/kit/shell/src/shellLinux.c + sed -i "s/TDengine shell/Power shell/g" ${top_dir}/src/kit/shell/src/shellLinux.c + + + # src/os/src/windows/wEnv.c + sed -i "s/C:\/TDengine/C:\/Power/g" ${top_dir}/src/os/src/windows/wEnv.c + # src/kit/shell/src/shellEngine.c + sed -i "s/TDengine shell/PowerDB shell/g" ${top_dir}/src/kit/shell/src/shellEngine.c + sed -i "s/2020 by TAOS Data, Inc/2020 by PowerDB, Inc/g" ${top_dir}/src/kit/shell/src/shellEngine.c + + sed -i "s/\"taos> \"/\"power> \"/g" ${top_dir}/src/kit/shell/src/shellEngine.c + sed -i "s/\" -> \"/\" -> \"/g" ${top_dir}/src/kit/shell/src/shellEngine.c + sed -i "s/prompt_size = 6/prompt_size = 7/g" ${top_dir}/src/kit/shell/src/shellEngine.c + # src/rpc/src/rpcMain.c + sed -i "s/taos connections/power connections/g" ${top_dir}/src/rpc/src/rpcMain.c + # src/plugins/monitor/src/monMain.c + sed -i "s/taosd is quiting/powerd is quiting/g" ${top_dir}/src/plugins/monitor/src/monMain.c +} + +function replace_enterprise_power(){ + # enterprise/src/kit/perfMonitor/perfMonitor.c + sed -i "s/\"taosdata\"/\"powerdb\"/g" ${top_dir}/../enterprise/src/kit/perfMonitor/perfMonitor.c + sed -i "s/TDengine/PowerDB/g" ${top_dir}/../enterprise/src/kit/perfMonitor/perfMonitor.c + # enterprise/src/plugins/admin/src/httpAdminHandle.c + sed -i "s/taos\.cfg/power\.cfg/g" ${top_dir}/../enterprise/src/plugins/admin/src/httpAdminHandle.c + # enterprise/src/plugins/grant/src/grantMain.c + sed -i "s/taos\.cfg/power\.cfg/g" ${top_dir}/../enterprise/src/plugins/grant/src/grantMain.c + # enterprise/src/plugins/module/src/moduleMain.c + sed -i "s/taos\.cfg/power\.cfg/g" ${top_dir}/../enterprise/src/plugins/module/src/moduleMain.c +} diff --git a/packaging/sed_pro.bat b/packaging/sed_pro.bat new file mode 100644 index 0000000000000000000000000000000000000000..02c2084e406fc21e4b67ddd98951aa5bfcd698ab --- /dev/null +++ b/packaging/sed_pro.bat @@ -0,0 +1,76 @@ +set sed="C:\Program Files\Git\usr\bin\sed.exe" +set community_dir=%1 + +::cmake\install.inc +%sed% -i "s/C:\/TDengine/C:\/ProDB/g" %community_dir%\cmake\install.inc +%sed% -i "s/taos\.cfg/prodb\.cfg/g" %community_dir%\cmake\install.inc +%sed% -i "s/taos\.exe/prodbc\.exe/g" %community_dir%\cmake\install.inc +%sed% -i "s/taosdemo\.exe/prodemo\.exe/g" %community_dir%\cmake\install.inc +%sed% -i "/src\/connector/d" %community_dir%\cmake\install.inc +%sed% -i "/tests\/examples/d" %community_dir%\cmake\install.inc +::src\kit\shell\CMakeLists.txt +%sed% -i "s/OUTPUT_NAME taos/OUTPUT_NAME prodbc/g" %community_dir%\src\kit\shell\CMakeLists.txt +::src\kit\shell\inc\shell.h +%sed% -i "s/taos_history/prodb_history/g" %community_dir%\src\kit\shell\inc\shell.h +::src\inc\taosdef.h +%sed% -i "s/\"taosdata\"/\"prodb\"/g" %community_dir%\src\inc\taosdef.h +::src\util\src\tconfig.c +%sed% -i "s/taos\.cfg/prodb\.cfg/g" %community_dir%\src\util\src\tconfig.c +%sed% -i "s/etc\/taos/etc\/ProDB/g" %community_dir%\src\util\src\tconfig.c +::src\kit\taosdemo\CMakeLists.txt +%sed% -i "s/ADD_EXECUTABLE(taosdemo/ADD_EXECUTABLE(prodemo/g" %community_dir%\src\kit\taosdemo\CMakeLists.txt +%sed% -i "s/TARGET_LINK_LIBRARIES(taosdemo/TARGET_LINK_LIBRARIES(prodemo/g" %community_dir%\src\kit\taosdemo\CMakeLists.txt +::src\kit\taosdemo\taosdemo.c +%sed% -i "s/taosdemo --help/prodemo --help/g" %community_dir%\src\kit\taosdemo\taosdemo.c +%sed% -i "s/taosdemo --usage/prodemo --usage/g" %community_dir%\src\kit\taosdemo\taosdemo.c +%sed% -i "s/Usage: taosdemo/Usage: prodemo/g" %community_dir%\src\kit\taosdemo\taosdemo.c +%sed% -i "s/taosdemo is simulating/prodemo is simulating/g" %community_dir%\src\kit\taosdemo\taosdemo.c +%sed% -i "s/taosdemo version/prodemo version/g" %community_dir%\src\kit\taosdemo\taosdemo.c +%sed% -i "s/\"taosdata\"/\"prodb\"/g" %community_dir%\src\kit\taosdemo\taosdemo.c +%sed% -i "s/support@taosdata\.com/support@hanatech\.com\.cn/g" %community_dir%\src\kit\taosdemo\taosdemo.c +%sed% -i "s/taosc, rest, and stmt/prodbc, rest, and stmt/g" %community_dir%\src\kit\taosdemo\taosdemo.c +%sed% -i "s/taosdemo uses/prodemo uses/g" %community_dir%\src\kit\taosdemo\taosdemo.c +%sed% -i "s/use 'taosc'/use 'prodbc'/g" %community_dir%\src\kit\taosdemo\taosdemo.c +::src\util\src\tlog.c +%sed% -i "s/log\/taos/log\/ProDB/g" %community_dir%\src\util\src\tlog.c +::src\dnode\src\dnodeSystem.c +%sed% -i "s/TDengine/ProDB/g" %community_dir%\src\dnode\src\dnodeSystem.c +::src\dnode\src\dnodeMain.c +%sed% -i "s/TDengine/ProDB/g" %community_dir%\src\dnode\src\dnodeMain.c +%sed% -i "s/taosdlog/prodlog/g" %community_dir%\src\dnode\src\dnodeMain.c +::src\client\src\tscSystem.c +%sed% -i "s/taoslog/prolog/g" %community_dir%\src\client\src\tscSystem.c +::src\util\src\tnote.c +%sed% -i "s/taosinfo/proinfo/g" %community_dir%\src\util\src\tnote.c +::src\dnode\CMakeLists.txt +%sed% -i "s/taos\.cfg/prodb\.cfg/g" %community_dir%\src\dnode\CMakeLists.txt +::src\kit\taosdump\taosdump.c +%sed% -i "s/support@taosdata\.com/support@hanatech\.com\.cn/g" %community_dir%\src\kit\taosdump\taosdump.c +%sed% -i "s/Default is taosdata/Default is prodb/g" %community_dir%\src\kit\taosdump\taosdump.c +%sed% -i "s/\"taosdata\"/\"prodb\"/g" %community_dir%\src\kit\taosdump\taosdump.c +%sed% -i "s/TDengine/ProDB/g" %community_dir%\src\kit\taosdump\taosdump.c +%sed% -i "s/taos\/taos\.cfg/ProDB\/prodb\.cfg/g" %community_dir%\src\kit\taosdump\taosdump.c +::src\os\src\linux\linuxEnv.c +%sed% -i "s/etc\/taos/etc\/ProDB/g" %community_dir%\src\os\src\linux\linuxEnv.c +%sed% -i "s/lib\/taos/lib\/ProDB/g" %community_dir%\src\os\src\linux\linuxEnv.c +%sed% -i "s/log\/taos/log\/ProDB/g" %community_dir%\src\os\src\linux\linuxEnv.c +::src\kit\shell\src\shellDarwin.c +%sed% -i "s/TDengine shell/ProDB shell/g" %community_dir%\src\kit\shell\src\shellDarwin.c +%sed% -i "s/2020 by TAOS Data/2021 by HanaTech/g" %community_dir%\src\kit\shell\src\shellDarwin.c +::src\kit\shell\src\shellLinux.c +%sed% -i "s/support@taosdata\.com/support@hanatech\.com\.cn/g" %community_dir%\src\kit\shell\src\shellLinux.c +%sed% -i "s/TDengine shell/ProDB shell/g" %community_dir%\src\kit\shell\src\shellLinux.c +%sed% -i "s/2020 by TAOS Data/2021 by HanaTech/g" %community_dir%\src\kit\shell\src\shellLinux.c +::src\os\src\windows\wEnv.c +%sed% -i "s/TDengine/ProDB/g" %community_dir%\src\os\src\windows\wEnv.c +::src\kit\shell\src\shellEngine.c +%sed% -i "s/TDengine shell/ProDB shell/g" %community_dir%\src\kit\shell\src\shellEngine.c +%sed% -i "s/2020 by TAOS Data, Inc/2021 by HanaTech, Inc/g" %community_dir%\src\kit\shell\src\shellEngine.c +%sed% -i "s/taos connect failed/prodbc connect failed/g" %community_dir%\src\kit\shell\src\shellEngine.c +%sed% -i "s/\"taos^> \"/\"ProDB^> \"/g" %community_dir%\src\kit\shell\src\shellEngine.c +%sed% -i "s/\" -^> \"/\" -^> \"/g" %community_dir%\src\kit\shell\src\shellEngine.c +%sed% -i "s/prompt_size = 6/prompt_size = 7/g" %community_dir%\src\kit\shell\src\shellEngine.c +::src\rpc\src\rpcMain.c +%sed% -i "s/taos connections/prodbc connections/g" %community_dir%\src\rpc\src\rpcMain.c +::src\plugins\monitor\src\monMain.c +%sed% -i "s/taosd is quiting/prodbs is quiting/g" %community_dir%\src\plugins\monitor\src\monMain.c diff --git a/packaging/sed_pro.sh b/packaging/sed_pro.sh new file mode 100755 index 0000000000000000000000000000000000000000..65d64b696227b007574651512cc236c7373cec01 --- /dev/null +++ b/packaging/sed_pro.sh @@ -0,0 +1,81 @@ +#!/bin/bash + +function replace_community_pro(){ + # cmake/install.inc + sed -i "s/C:\/TDengine/C:\/ProDB/g" ${top_dir}/cmake/install.inc + sed -i "s/taos\.cfg/prodb\.cfg/g" ${top_dir}/cmake/install.inc + sed -i "s/taos\.exe/prodbc\.exe/g" ${top_dir}/cmake/install.inc + sed -i "s/taosdemo\.exe/prodemo\.exe/g" ${top_dir}/cmake/install.inc + # src/kit/shell/inc/shell.h + sed -i "s/taos_history/prodb_history/g" ${top_dir}/src/kit/shell/inc/shell.h + # src/inc/taosdef.h + sed -i "s/\"taosdata\"/\"prodb\"/g" ${top_dir}/src/inc/taosdef.h + # src/util/src/tconfig.c + sed -i "s/taos\.cfg/prodb\.cfg/g" ${top_dir}/src/util/src/tconfig.c + sed -i "s/etc\/taos/etc\/ProDB/g" ${top_dir}/src/util/src/tconfig.c + # src/kit/taosdemo/taosdemo.c + sed -i "s/taosdemo --help/prodemo --help/g" ${top_dir}/src/kit/taosdemo/taosdemo.c + sed -i "s/taosdemo --usage/prodemo --usage/g" ${top_dir}/src/kit/taosdemo/taosdemo.c + sed -i "s/Usage: taosdemo/Usage: prodemo/g" ${top_dir}/src/kit/taosdemo/taosdemo.c + sed -i "s/taosdemo is simulating/prodemo is simulating/g" ${top_dir}/src/kit/taosdemo/taosdemo.c + sed -i "s/taosdemo version/prodemo version/g" ${top_dir}/src/kit/taosdemo/taosdemo.c + sed -i "s/\"taosdata\"/\"prodb\"/g" ${top_dir}/src/kit/taosdemo/taosdemo.c + sed -i "s/support@taosdata\.com/support@hanatech\.com\.cn/g" ${top_dir}/src/kit/taosdemo/taosdemo.c + sed -i "s/taosc, rest, and stmt/prodbc, rest, and stmt/g" ${top_dir}/src/kit/taosdemo/taosdemo.c + sed -i "s/taosdemo uses/prodemo uses/g" ${top_dir}/src/kit/taosdemo/taosdemo.c + sed -i "s/use 'taosc'/use 'prodbc'/g" ${top_dir}/src/kit/taosdemo/taosdemo.c + # src/util/src/tlog.c + sed -i "s/log\/taos/log\/ProDB/g" ${top_dir}/src/util/src/tlog.c + # src/dnode/src/dnodeSystem.c + sed -i "s/TDengine/ProDB/g" ${top_dir}/src/dnode/src/dnodeSystem.c + sed -i "s/TDengine/ProDB/g" ${top_dir}/src/dnode/src/dnodeMain.c + sed -i "s/taosdlog/prodlog/g" ${top_dir}/src/dnode/src/dnodeMain.c + # src/client/src/tscSystem.c + sed -i "s/taoslog/prolog/g" ${top_dir}/src/client/src/tscSystem.c + # src/util/src/tnote.c + sed -i "s/taosinfo/proinfo/g" ${top_dir}/src/util/src/tnote.c + # src/dnode/CMakeLists.txt + sed -i "s/taos\.cfg/prodb\.cfg/g" ${top_dir}/src/dnode/CMakeLists.txt + # src/kit/taosdump/taosdump.c + sed -i "s/support@taosdata\.com/support@hanatech\.com\.cn/g" ${top_dir}/src/kit/taosdump/taosdump.c + sed -i "s/Default is taosdata/Default is prodb/g" ${top_dir}/src/kit/taosdump/taosdump.c + sed -i "s/\"taosdata\"/\"prodb\"/g" ${top_dir}/src/kit/taosdump/taosdump.c + sed -i "s/TDengine/ProDB/g" ${top_dir}/src/kit/taosdump/taosdump.c + sed -i "s/taos\/taos\.cfg/ProDB\/prodb\.cfg/g" ${top_dir}/src/kit/taosdump/taosdump.c + # src/os/src/linux/linuxEnv.c + sed -i "s/etc\/taos/etc\/ProDB/g" ${top_dir}/src/os/src/linux/linuxEnv.c + sed -i "s/lib\/taos/lib\/ProDB/g" ${top_dir}/src/os/src/linux/linuxEnv.c + sed -i "s/log\/taos/log\/ProDB/g" ${top_dir}/src/os/src/linux/linuxEnv.c + # src/kit/shell/src/shellDarwin.c + sed -i "s/TDengine shell/ProDB shell/g" ${top_dir}/src/kit/shell/src/shellDarwin.c + sed -i "s/2020 by TAOS Data/2021 by HanaTech/g" ${top_dir}/src/kit/shell/src/shellDarwin.c + # src/kit/shell/src/shellLinux.c + sed -i "s/support@taosdata\.com/support@hanatech\.com\.cn/g" ${top_dir}/src/kit/shell/src/shellLinux.c + sed -i "s/TDengine shell/ProDB shell/g" ${top_dir}/src/kit/shell/src/shellLinux.c + sed -i "s/2020 by TAOS Data/2021 by HanaTech/g" ${top_dir}/src/kit/shell/src/shellLinux.c + # src/os/src/windows/wEnv.c + sed -i "s/C:\/TDengine/C:\/ProDB/g" ${top_dir}/src/os/src/windows/wEnv.c + # src/kit/shell/src/shellEngine.c + sed -i "s/TDengine shell/ProDB shell/g" ${top_dir}/src/kit/shell/src/shellEngine.c + sed -i "s/2020 by TAOS Data, Inc/2021 by Hanatech, Inc/g" ${top_dir}/src/kit/shell/src/shellEngine.c + sed -i "s/taos connect failed/prodbc connect failed/g" ${top_dir}/src/kit/shell/src/shellEngine.c + sed -i "s/\"taos> \"/\"ProDB> \"/g" ${top_dir}/src/kit/shell/src/shellEngine.c + sed -i "s/\" -> \"/\" -> \"/g" ${top_dir}/src/kit/shell/src/shellEngine.c + sed -i "s/prompt_size = 6/prompt_size = 7/g" ${top_dir}/src/kit/shell/src/shellEngine.c + # src/rpc/src/rpcMain.c + sed -i "s/taos connections/prodbc connections/g" ${top_dir}/src/rpc/src/rpcMain.c + # src/plugins/monitor/src/monMain.c + sed -i "s/taosd is quiting/prodbs is quiting/g" ${top_dir}/src/plugins/monitor/src/monMain.c +} + +function replace_enterprise_pro(){ + # enterprise/src/kit/perfMonitor/perfMonitor.c + sed -i "s/\"taosdata\"/\"prodb\"/g" ${top_dir}/../enterprise/src/kit/perfMonitor/perfMonitor.c + sed -i "s/TDengine/ProDB/g" ${top_dir}/../enterprise/src/kit/perfMonitor/perfMonitor.c + # enterprise/src/plugins/admin/src/httpAdminHandle.c + sed -i "s/taos\.cfg/prodb\.cfg/g" ${top_dir}/../enterprise/src/plugins/admin/src/httpAdminHandle.c + # enterprise/src/plugins/grant/src/grantMain.c + sed -i "s/taos\.cfg/prodb\.cfg/g" ${top_dir}/../enterprise/src/plugins/grant/src/grantMain.c + # enterprise/src/plugins/module/src/moduleMain.c + sed -i "s/taos\.cfg/prodb\.cfg/g" ${top_dir}/../enterprise/src/plugins/module/src/moduleMain.c +} diff --git a/packaging/sed_tq.bat b/packaging/sed_tq.bat new file mode 100644 index 0000000000000000000000000000000000000000..f8131eac3055e65dfe5289b58f2ac044cd79bd99 --- /dev/null +++ b/packaging/sed_tq.bat @@ -0,0 +1,46 @@ +set sed="C:\Program Files\Git\usr\bin\sed.exe" +set community_dir=%1 + +::cmake\install.inc +%sed% -i "s/C:\/TDengine/C:\/TQ/g" %community_dir%\cmake\install.inc +%sed% -i "s/taos\.cfg/tq\.cfg/g" %community_dir%\cmake\install.inc +%sed% -i "s/taos\.exe/tq\.exe/g" %community_dir%\cmake\install.inc +%sed% -i "/src\/connector/d" %community_dir%\cmake\install.inc +%sed% -i "/tests\/examples/d" %community_dir%\cmake\install.inc +::src\kit\shell\CMakeLists.txt +%sed% -i "s/OUTPUT_NAME taos/OUTPUT_NAME tq/g" %community_dir%\src\kit\shell\CMakeLists.txt +::src\kit\shell\inc\shell.h +%sed% -i "s/taos_history/tq_history/g" %community_dir%\src\kit\shell\inc\shell.h +::src\inc\taosdef.h +%sed% -i "s/\"taosdata\"/\"tqueue\"/g" %community_dir%\src\inc\taosdef.h +::src\util\src\tconfig.c +%sed% -i "s/taos\.cfg/tq\.cfg/g" %community_dir%\src\util\src\tconfig.c +%sed% -i "s/etc\/taos/etc\/tq/g" %community_dir%\src\util\src\tconfig.c +::src\util\src\tlog.c +%sed% -i "s/log\/taos/log\/tq/g" %community_dir%\src\util\src\tlog.c +::src\dnode\src\dnodeSystem.c +%sed% -i "s/TDengine/TQ/g" %community_dir%\src\dnode\src\dnodeSystem.c +::src\dnode\src\dnodeMain.c +%sed% -i "s/TDengine/TQ/g" %community_dir%\src\dnode\src\dnodeMain.c +%sed% -i "s/taosdlog/tqdlog/g" %community_dir%\src\dnode\src\dnodeMain.c +::src\client\src\tscSystem.c +%sed% -i "s/taoslog/tqlog/g" %community_dir%\src\client\src\tscSystem.c +::src\util\src\tnote.c +%sed% -i "s/taosinfo/tqinfo/g" %community_dir%\src\util\src\tnote.c +::src\dnode\CMakeLists.txt +%sed% -i "s/taos\.cfg/tq\.cfg/g" %community_dir%\src\dnode\CMakeLists.txt +::src\os\src\linux\linuxEnv.c +%sed% -i "s/etc\/taos/etc\/tq/g" %community_dir%\src\os\src\linux\linuxEnv.c +%sed% -i "s/lib\/taos/lib\/tq/g" %community_dir%\src\os\src\linux\linuxEnv.c +%sed% -i "s/log\/taos/log\/tq/g" %community_dir%\src\os\src\linux\linuxEnv.c +::src\os\src\windows\wEnv.c +%sed% -i "s/TDengine/TQ/g" %community_dir%\src\os\src\windows\wEnv.c +::src\kit\shell\src\shellEngine.c +%sed% -i "s/TDengine shell/TQ shell/g" %community_dir%\src\kit\shell\src\shellEngine.c +%sed% -i "s/\"taos^> \"/\"tq^> \"/g" %community_dir%\src\kit\shell\src\shellEngine.c +%sed% -i "s/\" -^> \"/\" -^> \"/g" %community_dir%\src\kit\shell\src\shellEngine.c +%sed% -i "s/prompt_size = 6/prompt_size = 4/g" %community_dir%\src\kit\shell\src\shellEngine.c +::src\rpc\src\rpcMain.c +%sed% -i "s/taos connections/tq connections/g" %community_dir%\src\rpc\src\rpcMain.c +::src\plugins\monitor\src\monMain.c +%sed% -i "s/taosd is quiting/tqd is quiting/g" %community_dir%\src\plugins\monitor\src\monMain.c diff --git a/packaging/sed_tq.sh b/packaging/sed_tq.sh new file mode 100755 index 0000000000000000000000000000000000000000..24b1a4726ef6a800778b59003b0327e1c7a6517c --- /dev/null +++ b/packaging/sed_tq.sh @@ -0,0 +1,81 @@ +#!/bin/bash + +function replace_community_tq(){ + # cmake/install.inc + sed -i "s/C:\/TDengine/C:\/TQ/g" ${top_dir}/cmake/install.inc + sed -i "s/taos\.cfg/tq\.cfg/g" ${top_dir}/cmake/install.inc + sed -i "s/taos\.exe/tq\.exe/g" ${top_dir}/cmake/install.inc + sed -i "s/taosdemo\.exe/tqdemo\.exe/g" ${top_dir}/cmake/install.inc + # src/kit/shell/inc/shell.h + sed -i "s/taos_history/tq_history/g" ${top_dir}/src/kit/shell/inc/shell.h + # src/inc/taosdef.h + sed -i "s/\"taosdata\"/\"tqueue\"/g" ${top_dir}/src/inc/taosdef.h + # src/util/src/tconfig.c + sed -i "s/taos\.cfg/tq\.cfg/g" ${top_dir}/src/util/src/tconfig.c + sed -i "s/etc\/taos/etc\/tq/g" ${top_dir}/src/util/src/tconfig.c + + + + + + + + + + + + # src/util/src/tlog.c + sed -i "s/log\/taos/log\/tq/g" ${top_dir}/src/util/src/tlog.c + # src/dnode/src/dnodeSystem.c + sed -i "s/TDengine/TQ/g" ${top_dir}/src/dnode/src/dnodeSystem.c + sed -i "s/TDengine/TQ/g" ${top_dir}/src/dnode/src/dnodeMain.c + sed -i "s/taosdlog/tqdlog/g" ${top_dir}/src/dnode/src/dnodeMain.c + # src/client/src/tscSystem.c + sed -i "s/taoslog/tqlog/g" ${top_dir}/src/client/src/tscSystem.c + # src/util/src/tnote.c + sed -i "s/taosinfo/tqinfo/g" ${top_dir}/src/util/src/tnote.c + # src/dnode/CMakeLists.txt + sed -i "s/taos\.cfg/tq\.cfg/g" ${top_dir}/src/dnode/CMakeLists.txt + # src/kit/taosdump/taosdump.c + + sed -i "s/Default is taosdata/Default is tqueue/g" ${top_dir}/src/kit/taosdump/taosdump.c + sed -i "s/\"taosdata\"/\"tqueue\"/g" ${top_dir}/src/kit/taosdump/taosdump.c + sed -i "s/TDengine/TQ/g" ${top_dir}/src/kit/taosdump/taosdump.c + sed -i "s/taos\/taos\.cfg/tq\/tq\.cfg/g" ${top_dir}/src/kit/taosdump/taosdump.c + # src/os/src/linux/linuxEnv.c + sed -i "s/etc\/taos/etc\/tq/g" ${top_dir}/src/os/src/linux/linuxEnv.c + sed -i "s/lib\/taos/lib\/tq/g" ${top_dir}/src/os/src/linux/linuxEnv.c + sed -i "s/log\/taos/log\/tq/g" ${top_dir}/src/os/src/linux/linuxEnv.c + # src/kit/shell/src/shellDarwin.c + sed -i "s/TDengine shell/TQ shell/g" ${top_dir}/src/kit/shell/src/shellDarwin.c + + # src/kit/shell/src/shellLinux.c + + sed -i "s/TDengine shell/TQ shell/g" ${top_dir}/src/kit/shell/src/shellLinux.c + + # src/os/src/windows/wEnv.c + sed -i "s/C:\/TDengine/C:\/TQ/g" ${top_dir}/src/os/src/windows/wEnv.c + # src/kit/shell/src/shellEngine.c + sed -i "s/TDengine shell/TQ shell/g" ${top_dir}/src/kit/shell/src/shellEngine.c + + + sed -i "s/\"taos> \"/\"tq> \"/g" ${top_dir}/src/kit/shell/src/shellEngine.c + sed -i "s/\" -> \"/\" -> \"/g" ${top_dir}/src/kit/shell/src/shellEngine.c + sed -i "s/prompt_size = 6/prompt_size = 4/g" ${top_dir}/src/kit/shell/src/shellEngine.c + # src/rpc/src/rpcMain.c + sed -i "s/taos connections/tq connections/g" ${top_dir}/src/rpc/src/rpcMain.c + # src/plugins/monitor/src/monMain.c + sed -i "s/taosd is quiting/tqd is quiting/g" ${top_dir}/src/plugins/monitor/src/monMain.c +} + +function replace_enterprise_tq(){ + # enterprise/src/kit/perfMonitor/perfMonitor.c + sed -i "s/\"taosdata\"/\"tqueue\"/g" ${top_dir}/../enterprise/src/kit/perfMonitor/perfMonitor.c + sed -i "s/TDengine/TQ/g" ${top_dir}/../enterprise/src/kit/perfMonitor/perfMonitor.c + # enterprise/src/plugins/admin/src/httpAdminHandle.c + sed -i "s/taos\.cfg/tq\.cfg/g" ${top_dir}/../enterprise/src/plugins/admin/src/httpAdminHandle.c + # enterprise/src/plugins/grant/src/grantMain.c + sed -i "s/taos\.cfg/tq\.cfg/g" ${top_dir}/../enterprise/src/plugins/grant/src/grantMain.c + # enterprise/src/plugins/module/src/moduleMain.c + sed -i "s/taos\.cfg/tq\.cfg/g" ${top_dir}/../enterprise/src/plugins/module/src/moduleMain.c +} diff --git a/packaging/tools/install_client_jh.sh b/packaging/tools/install_client_jh.sh index a8599812feaea06120aa3391771e7c94523a53c2..a25e102c9fca78b142f17a6e15c3990bc4e04ff9 100755 --- a/packaging/tools/install_client_jh.sh +++ b/packaging/tools/install_client_jh.sh @@ -136,14 +136,14 @@ function install_header() { } function install_config() { - if [ ! -f ${cfg_install_dir}/taos.cfg ]; then + if [ ! -f ${cfg_install_dir}/jh_taos.cfg ]; then ${csudo} mkdir -p ${cfg_install_dir} - [ -f ${script_dir}/cfg/taos.cfg ] && ${csudo} cp ${script_dir}/cfg/taos.cfg ${cfg_install_dir} + [ -f ${script_dir}/cfg/jh_taos.cfg ] && ${csudo} cp ${script_dir}/cfg/jh_taos.cfg ${cfg_install_dir} ${csudo} chmod 644 ${cfg_install_dir}/* fi - ${csudo} cp -f ${script_dir}/cfg/taos.cfg ${install_main_dir}/cfg/taos.cfg.org - ${csudo} ln -s ${cfg_install_dir}/taos.cfg ${install_main_dir}/cfg + ${csudo} cp -f ${script_dir}/cfg/jh_taos.cfg ${install_main_dir}/cfg/jh_taos.cfg.org + ${csudo} ln -s ${cfg_install_dir}/jh_taos.cfg ${install_main_dir}/cfg } diff --git a/packaging/tools/install_jh.sh b/packaging/tools/install_jh.sh index 867c5c93b647b788f5ef48c8ea3e6172747cacab..2ef7d97df69e1a38c6cf396313f6397cd674c504 100755 --- a/packaging/tools/install_jh.sh +++ b/packaging/tools/install_jh.sh @@ -316,7 +316,7 @@ function set_hostname() { ${csudo} sed -i -r "s/#*\s*(HOSTNAME=\s*).*/\1$newHostname/" /etc/sysconfig/network ||: fi - ${csudo} sed -i -r "s/#*\s*(fqdn\s*).*/\1$newHostname/" ${cfg_install_dir}/taos.cfg + ${csudo} sed -i -r "s/#*\s*(fqdn\s*).*/\1$newHostname/" ${cfg_install_dir}/jh_taos.cfg serverFqdn=$newHostname if [[ -e /etc/hosts ]]; then @@ -351,7 +351,7 @@ function set_ipAsFqdn() { echo -e -n "${GREEN}Unable to get local ip, use 127.0.0.1${NC}" localFqdn="127.0.0.1" # Write the local FQDN to configuration file - ${csudo} sed -i -r "s/#*\s*(fqdn\s*).*/\1$localFqdn/" ${cfg_install_dir}/taos.cfg + ${csudo} sed -i -r "s/#*\s*(fqdn\s*).*/\1$localFqdn/" ${cfg_install_dir}/jh_taos.cfg serverFqdn=$localFqdn echo return @@ -373,7 +373,7 @@ function set_ipAsFqdn() { read -p "Please choose an IP from local IP list:" localFqdn else # Write the local FQDN to configuration file - ${csudo} sed -i -r "s/#*\s*(fqdn\s*).*/\1$localFqdn/" ${cfg_install_dir}/taos.cfg + ${csudo} sed -i -r "s/#*\s*(fqdn\s*).*/\1$localFqdn/" ${cfg_install_dir}/jh_taos.cfg serverFqdn=$localFqdn break fi @@ -420,14 +420,14 @@ function local_fqdn_check() { } function install_config() { - if [ ! -f ${cfg_install_dir}/taos.cfg ]; then + if [ ! -f ${cfg_install_dir}/jh_taos.cfg ]; then ${csudo} mkdir -p ${cfg_install_dir} - [ -f ${script_dir}/cfg/taos.cfg ] && ${csudo} cp ${script_dir}/cfg/taos.cfg ${cfg_install_dir} + [ -f ${script_dir}/cfg/jh_taos.cfg ] && ${csudo} cp ${script_dir}/cfg/jh_taos.cfg ${cfg_install_dir} ${csudo} chmod 644 ${cfg_install_dir}/* fi - ${csudo} cp -f ${script_dir}/cfg/taos.cfg ${install_main_dir}/cfg/taos.cfg.org - ${csudo} ln -s ${cfg_install_dir}/taos.cfg ${install_main_dir}/cfg + ${csudo} cp -f ${script_dir}/cfg/jh_taos.cfg ${install_main_dir}/cfg/jh_taos.cfg.org + ${csudo} ln -s ${cfg_install_dir}/jh_taos.cfg ${install_main_dir}/cfg [ ! -z $1 ] && return 0 || : # only install client @@ -457,7 +457,7 @@ function install_config() { # check the format of the firstEp #if [[ $firstEp == $FQDN_PATTERN ]]; then # Write the first FQDN to configuration file - ${csudo} sed -i -r "s/#*\s*(firstEp\s*).*/\1$firstEp/" ${cfg_install_dir}/taos.cfg + ${csudo} sed -i -r "s/#*\s*(firstEp\s*).*/\1$firstEp/" ${cfg_install_dir}/jh_taos.cfg break #else # read -p "Please enter the correct FQDN:port: " firstEp @@ -805,7 +805,7 @@ function update() { #echo #echo -e "\033[44;32;1mjh_iot is updated successfully!${NC}" echo - echo -e "${GREEN_DARK}To configure jh_iot ${NC}: edit /etc/jh_taos/taos.cfg" + echo -e "${GREEN_DARK}To configure jh_iot ${NC}: edit /etc/jh_taos/jh_taos.cfg" if ((${service_mod}==0)); then echo -e "${GREEN_DARK}To start jh_iot ${NC}: ${csudo} systemctl start jh_taosd${NC}" elif ((${service_mod}==1)); then @@ -882,7 +882,7 @@ function install() { #echo #echo -e "\033[44;32;1mjh_iot is installed successfully!${NC}" echo - echo -e "${GREEN_DARK}To configure jh_iot ${NC}: edit /etc/jh_taos/taos.cfg" + echo -e "${GREEN_DARK}To configure jh_iot ${NC}: edit /etc/jh_taos/jh_taos.cfg" if ((${service_mod}==0)); then echo -e "${GREEN_DARK}To start jh_iot ${NC}: ${csudo} systemctl start jh_taosd${NC}" elif ((${service_mod}==1)); then diff --git a/packaging/tools/makeclient_jh.sh b/packaging/tools/makeclient_jh.sh index bfbdcfc578bc7f8dfb15fef302d9817014ff3bef..450f01b19f6b513f2a7615b3435c7f07af6d89cb 100755 --- a/packaging/tools/makeclient_jh.sh +++ b/packaging/tools/makeclient_jh.sh @@ -30,7 +30,6 @@ code_dir="${top_dir}/src" release_dir="${top_dir}/release" #package_name='linux' - if [ "$verMode" == "cluster" ]; then install_dir="${release_dir}/jh_iot-enterprise-client-${version}" else @@ -38,7 +37,6 @@ else fi # Directories and files. - if [ "$osType" != "Darwin" ]; then lib_files="${build_dir}/lib/libtaos.so.${version}" else @@ -58,27 +56,19 @@ install_files="${script_dir}/install_client_jh.sh" # make directories. mkdir -p ${install_dir} mkdir -p ${install_dir}/inc && cp ${header_files} ${install_dir}/inc -mkdir -p ${install_dir}/cfg && cp ${cfg_dir}/taos.cfg ${install_dir}/cfg/taos.cfg - -sed -i '/dataDir/ {s/taos/jh_taos/g}' ${install_dir}/cfg/taos.cfg -sed -i '/logDir/ {s/taos/jh_taos/g}' ${install_dir}/cfg/taos.cfg -sed -i "s/TDengine/jh_iot/g" ${install_dir}/cfg/taos.cfg +mkdir -p ${install_dir}/cfg && cp ${cfg_dir}/jh_taos.cfg ${install_dir}/cfg/jh_taos.cfg mkdir -p ${install_dir}/bin if [ "$osType" != "Darwin" ]; then - if [ "$pagMode" == "lite" ]; then - strip ${build_dir}/bin/taos - cp ${build_dir}/bin/taos ${install_dir}/bin/jh_taos - cp ${script_dir}/remove_client_jh.sh ${install_dir}/bin - else - cp ${build_dir}/bin/taos ${install_dir}/bin/jh_taos - cp ${script_dir}/remove_client_jh.sh ${install_dir}/bin + if [ "$pagMode" != "lite" ]; then cp ${build_dir}/bin/taosdemo ${install_dir}/bin/jhdemo cp ${build_dir}/bin/taosdump ${install_dir}/bin/jh_taosdump cp ${script_dir}/set_core.sh ${install_dir}/bin cp ${script_dir}/get_client.sh ${install_dir}/bin - #cp ${script_dir}/taosd-dump-cfg.gdb ${install_dir}/bin fi + strip ${build_dir}/bin/taos + cp ${build_dir}/bin/taos ${install_dir}/bin/jh_taos + cp ${script_dir}/remove_client_jh.sh ${install_dir}/bin else cp ${bin_files} ${install_dir}/bin fi diff --git a/packaging/tools/makeclient_kh.sh b/packaging/tools/makeclient_kh.sh index 015de87e0f26d738490e8045ba21a08511d9a62b..7dbbb391bd5716fa992cfb6de3cfc30d77583590 100755 --- a/packaging/tools/makeclient_kh.sh +++ b/packaging/tools/makeclient_kh.sh @@ -58,7 +58,7 @@ install_files="${script_dir}/install_client_kh.sh" # make directories. mkdir -p ${install_dir} mkdir -p ${install_dir}/inc && cp ${header_files} ${install_dir}/inc -mkdir -p ${install_dir}/cfg && cp ${cfg_dir}/taos.cfg ${install_dir}/cfg/kinghistorian.cfg +mkdir -p ${install_dir}/cfg && cp ${cfg_dir}/kinghistorian.cfg ${install_dir}/cfg/kinghistorian.cfg sed -i '/dataDir/ {s/taos/kinghistorian/g}' ${install_dir}/cfg/kinghistorian.cfg sed -i '/logDir/ {s/taos/kinghistorian/g}' ${install_dir}/cfg/kinghistorian.cfg diff --git a/packaging/tools/makeclient_power.sh b/packaging/tools/makeclient_power.sh index a0a0070a97be4938b64b17a34ab7ec49d606edc6..ba5cc38de2fc4b8b3f331d0de5f647bd7874850d 100755 --- a/packaging/tools/makeclient_power.sh +++ b/packaging/tools/makeclient_power.sh @@ -65,7 +65,7 @@ install_files="${script_dir}/install_client_power.sh" # make directories. mkdir -p ${install_dir} mkdir -p ${install_dir}/inc && cp ${header_files} ${install_dir}/inc -mkdir -p ${install_dir}/cfg && cp ${cfg_dir}/taos.cfg ${install_dir}/cfg/taos.cfg +mkdir -p ${install_dir}/cfg && cp ${cfg_dir}/power.cfg ${install_dir}/cfg/power.cfg if [ -f ${build_dir}/bin/jemalloc-config ]; then mkdir -p ${install_dir}/jemalloc/{bin,lib,lib/pkgconfig,include/jemalloc,share/doc/jemalloc,share/man/man3} @@ -100,10 +100,6 @@ if [ -f ${build_dir}/bin/jemalloc-config ]; then fi fi -sed -i '/dataDir/ {s/taos/power/g}' ${install_dir}/cfg/taos.cfg -sed -i '/logDir/ {s/taos/power/g}' ${install_dir}/cfg/taos.cfg -sed -i "s/TDengine/PowerDB/g" ${install_dir}/cfg/taos.cfg - mkdir -p ${install_dir}/bin if [ "$osType" != "Darwin" ]; then if [ "$pagMode" == "lite" ]; then diff --git a/packaging/tools/makeclient_pro.sh b/packaging/tools/makeclient_pro.sh index 31de91263dd33cd930a0a30784a226f68a98768d..f783b5c6aa15fce54a5dcbfba5f3ba9d36db6069 100755 --- a/packaging/tools/makeclient_pro.sh +++ b/packaging/tools/makeclient_pro.sh @@ -58,7 +58,7 @@ install_files="${script_dir}/install_client_pro.sh" # make directories. mkdir -p ${install_dir} mkdir -p ${install_dir}/inc && cp ${header_files} ${install_dir}/inc -mkdir -p ${install_dir}/cfg && cp ${cfg_dir}/taos.cfg ${install_dir}/cfg/prodb.cfg +mkdir -p ${install_dir}/cfg && cp ${cfg_dir}/prodb.cfg ${install_dir}/cfg/prodb.cfg sed -i '/dataDir/ {s/taos/ProDB/g}' ${install_dir}/cfg/prodb.cfg sed -i '/logDir/ {s/taos/ProDB/g}' ${install_dir}/cfg/prodb.cfg diff --git a/packaging/tools/makeclient_tq.sh b/packaging/tools/makeclient_tq.sh index 52293ff47e15bf888f7e9963e1f02aacd718a607..33978292039c2988a8224d24c71d902a1c52ffb6 100755 --- a/packaging/tools/makeclient_tq.sh +++ b/packaging/tools/makeclient_tq.sh @@ -58,7 +58,7 @@ install_files="${script_dir}/install_client_tq.sh" # make directories. mkdir -p ${install_dir} mkdir -p ${install_dir}/inc && cp ${header_files} ${install_dir}/inc -mkdir -p ${install_dir}/cfg && cp ${cfg_dir}/taos.cfg ${install_dir}/cfg/tq.cfg +mkdir -p ${install_dir}/cfg && cp ${cfg_dir}/tq.cfg ${install_dir}/cfg/tq.cfg sed -i '/dataDir/ {s/taos/tq/g}' ${install_dir}/cfg/tq.cfg sed -i '/logDir/ {s/taos/tq/g}' ${install_dir}/cfg/tq.cfg diff --git a/packaging/tools/makepkg_jh.sh b/packaging/tools/makepkg_jh.sh index d7b7746849578b0e2774ddf442566196102ea561..03078d37f0856f166bbec31d15cba509e97c4775 100755 --- a/packaging/tools/makepkg_jh.sh +++ b/packaging/tools/makepkg_jh.sh @@ -44,7 +44,7 @@ nginx_dir="${code_dir}/../../enterprise/src/plugins/web" # make directories. mkdir -p ${install_dir} mkdir -p ${install_dir}/inc && cp ${header_files} ${install_dir}/inc -mkdir -p ${install_dir}/cfg && cp ${cfg_dir}/taos.cfg ${install_dir}/cfg/taos.cfg +mkdir -p ${install_dir}/cfg && cp ${cfg_dir}/jh_taos.cfg ${install_dir}/cfg/jh_taos.cfg mkdir -p ${install_dir}/bin # bin @@ -93,13 +93,6 @@ if [ "$verMode" == "cluster" ]; then rm -rf ${install_dir}/nginxd/sbin/arm fi -sed -i '/dataDir/ {s/taos/jh_taos/g}' ${install_dir}/cfg/taos.cfg -sed -i '/logDir/ {s/taos/jh_taos/g}' ${install_dir}/cfg/taos.cfg -sed -i "s/TDengine/jh_iot/g" ${install_dir}/cfg/taos.cfg -sed -i "s/support@taosdata.com/jhkj@njsteel.com.cn/g" ${install_dir}/cfg/taos.cfg -sed -i "s/taos client/client/g" ${install_dir}/cfg/taos.cfg -sed -i "s/taosd/server/g" ${install_dir}/cfg/taos.cfg - cd ${install_dir} tar -zcv -f jh_taos.tar.gz * --remove-files || : exitcode=$? diff --git a/packaging/tools/makepkg_kh.sh b/packaging/tools/makepkg_kh.sh index 16b5b1a50817aadc1d078814f5db9137aeaa4415..fd5045fb08101e00fb7bd92c611d8b589d6d1242 100755 --- a/packaging/tools/makepkg_kh.sh +++ b/packaging/tools/makepkg_kh.sh @@ -44,7 +44,7 @@ nginx_dir="${code_dir}/../../enterprise/src/plugins/web" # make directories. mkdir -p ${install_dir} mkdir -p ${install_dir}/inc && cp ${header_files} ${install_dir}/inc -mkdir -p ${install_dir}/cfg && cp ${cfg_dir}/taos.cfg ${install_dir}/cfg/kinghistorian.cfg +mkdir -p ${install_dir}/cfg && cp ${cfg_dir}/kinghistorian.cfg ${install_dir}/cfg/kinghistorian.cfg mkdir -p ${install_dir}/bin # bin diff --git a/packaging/tools/makepkg_power.sh b/packaging/tools/makepkg_power.sh index e5c3c91ebf298e156c331ff2d1d37240b726d460..f7008cb6127d362bd3c0cbc6af70584915c5d1e8 100755 --- a/packaging/tools/makepkg_power.sh +++ b/packaging/tools/makepkg_power.sh @@ -49,7 +49,7 @@ init_file_tarbitrator_rpm=${script_dir}/../rpm/tarbitratord # make directories. mkdir -p ${install_dir} mkdir -p ${install_dir}/inc && cp ${header_files} ${install_dir}/inc -mkdir -p ${install_dir}/cfg && cp ${cfg_dir}/taos.cfg ${install_dir}/cfg/power.cfg +mkdir -p ${install_dir}/cfg && cp ${cfg_dir}/power.cfg ${install_dir}/cfg/power.cfg #mkdir -p ${install_dir}/bin && cp ${bin_files} ${install_dir}/bin && chmod a+x ${install_dir}/bin/* || : mkdir -p ${install_dir}/bin @@ -91,10 +91,6 @@ if [ "$verMode" == "cluster" ]; then sed -i "s/TDengine/PowerDB/g" ${install_dir}/nginxd/admin/*.html sed -i "s/TDengine/PowerDB/g" ${install_dir}/nginxd/admin/js/*.js - sed -i '/dataDir/ {s/taos/power/g}' ${install_dir}/cfg/power.cfg - sed -i '/logDir/ {s/taos/power/g}' ${install_dir}/cfg/power.cfg - sed -i "s/TDengine/PowerDB/g" ${install_dir}/cfg/power.cfg - if [ "$cpuType" == "aarch64" ]; then cp -f ${install_dir}/nginxd/sbin/arm/64bit/nginx ${install_dir}/nginxd/sbin/ elif [ "$cpuType" == "aarch32" ]; then diff --git a/packaging/tools/makepkg_pro.sh b/packaging/tools/makepkg_pro.sh index a03b306810caf2368f94721a90efb9bafa57d665..de319db2bcce274f981f931ecd39758d200bf756 100755 --- a/packaging/tools/makepkg_pro.sh +++ b/packaging/tools/makepkg_pro.sh @@ -44,7 +44,7 @@ nginx_dir="${code_dir}/../../enterprise/src/plugins/web" # make directories. mkdir -p ${install_dir} mkdir -p ${install_dir}/inc && cp ${header_files} ${install_dir}/inc -mkdir -p ${install_dir}/cfg && cp ${cfg_dir}/taos.cfg ${install_dir}/cfg/prodb.cfg +mkdir -p ${install_dir}/cfg && cp ${cfg_dir}/prodb.cfg ${install_dir}/cfg/prodb.cfg mkdir -p ${install_dir}/bin # bin @@ -74,7 +74,6 @@ if [ "$verMode" == "cluster" ]; then cp ${nginx_dir}/png/taos.png ${install_dir}/nginxd/admin/images/taos.png rm -rf ${install_dir}/nginxd/png - # replace the OEM name, add by yangzy@2021-09-22 sed -i -e 's/www.taosdata.com/www.hanatech.com.cn/g' $(grep -r 'www.taosdata.com' ${install_dir}/nginxd | sed -r "s/(.*\.html):\s*(.*)/\1/g") sed -i -e 's/TAOS Data/Hanatech/g' $(grep -r 'TAOS Data' ${install_dir}/nginxd | sed -r "s/(.*\.html):\s*(.*)/\1/g") sed -i -e 's/taosd/prodbs/g' `grep -r 'taosd' ${install_dir}/nginxd | grep -E '*\.js\s*.*' | sed -r -e 's/(.*\.js):\s*(.*)/\1/g' | sort | uniq` diff --git a/packaging/tools/makepkg_tq.sh b/packaging/tools/makepkg_tq.sh index 8abdfc2f7237ef465eac79907ad2b2a4c35c0463..3bca10b3284960312998b2283ab5ed84d7aeada8 100755 --- a/packaging/tools/makepkg_tq.sh +++ b/packaging/tools/makepkg_tq.sh @@ -44,7 +44,7 @@ nginx_dir="${code_dir}/../../enterprise/src/plugins/web" # make directories. mkdir -p ${install_dir} mkdir -p ${install_dir}/inc && cp ${header_files} ${install_dir}/inc -mkdir -p ${install_dir}/cfg && cp ${cfg_dir}/taos.cfg ${install_dir}/cfg/tq.cfg +mkdir -p ${install_dir}/cfg && cp ${cfg_dir}/tq.cfg ${install_dir}/cfg/tq.cfg mkdir -p ${install_dir}/bin if [ "$pagMode" == "lite" ]; then diff --git a/src/client/src/tscSystem.c b/src/client/src/tscSystem.c index 6c08524faa44a7a39e868a705510f2fc2f8275aa..b373095f9571229e001b09500af6da84f2e5086e 100644 --- a/src/client/src/tscSystem.c +++ b/src/client/src/tscSystem.c @@ -45,17 +45,7 @@ int32_t tscNumOfObj = 0; // number of sqlObj in current process. static void *tscCheckDiskUsageTmr; void *tscRpcCache; // cache to keep rpc obj int32_t tscNumOfThreads = 1; // num of rpc threads -#ifdef _TD_POWER_ -char tscLogFileName[12] = "powerlog"; -#elif (_TD_TQ_ == true) -char tscLogFileName[12] = "tqlog"; -#elif (_TD_PRO_ == true) -char tscLogFileName[12] = "prolog"; -#elif (_TD_KH_ == true) -char tscLogFileName[12] = "khclientlog"; -#else char tscLogFileName[12] = "taoslog"; -#endif int tscLogFileNum = 10; static pthread_mutex_t rpcObjMutex; // mutex to protect open the rpc obj concurrently diff --git a/src/inc/taosdef.h b/src/inc/taosdef.h index b026e0d0118cf0c202c162e47307a32513780387..1c835e0b3ec36dc604b766ee48b1929b11d4ea98 100644 --- a/src/inc/taosdef.h +++ b/src/inc/taosdef.h @@ -79,20 +79,7 @@ extern const int32_t TYPE_BYTES[15]; #define TSDB_DATA_NULL_STR_L "null" #define TSDB_DEFAULT_USER "root" - -#ifdef _TD_POWER_ -#define TSDB_DEFAULT_PASS "powerdb" -#elif (_TD_TQ_ == true) -#define TSDB_DEFAULT_PASS "tqueue" -#elif (_TD_PRO_ == true) -#define TSDB_DEFAULT_PASS "prodb" -#elif (_TD_KH_ == true) -#define TSDB_DEFAULT_PASS "khroot" -#elif (_TD_JH_ == true) -#define TSDB_DEFAULT_PASS "jhdata" -#else #define TSDB_DEFAULT_PASS "taosdata" -#endif #define SHELL_MAX_PASSWORD_LEN 20 diff --git a/src/kit/shell/CMakeLists.txt b/src/kit/shell/CMakeLists.txt index 3d112415e5d80327b1529604ac0443b6628af2ef..c2a1d3838e49ecf5c2d220aa26bf5e1489c0d3ef 100644 --- a/src/kit/shell/CMakeLists.txt +++ b/src/kit/shell/CMakeLists.txt @@ -34,19 +34,7 @@ ELSEIF (TD_WINDOWS) ADD_EXECUTABLE(shell ${SRC}) TARGET_LINK_LIBRARIES(shell taos_static) - IF (TD_POWER) - SET_TARGET_PROPERTIES(shell PROPERTIES OUTPUT_NAME power) - ELSEIF (TD_TQ) - SET_TARGET_PROPERTIES(shell PROPERTIES OUTPUT_NAME tq) - ELSEIF (TD_PRO) - SET_TARGET_PROPERTIES(shell PROPERTIES OUTPUT_NAME prodbc) - ELSEIF (TD_KH) - SET_TARGET_PROPERTIES(shell PROPERTIES OUTPUT_NAME khclient) - ELSEIF (TD_JH) - SET_TARGET_PROPERTIES(shell PROPERTIES OUTPUT_NAME jh_taos) - ELSE () - SET_TARGET_PROPERTIES(shell PROPERTIES OUTPUT_NAME taos) - ENDIF () + SET_TARGET_PROPERTIES(shell PROPERTIES OUTPUT_NAME taos) ELSEIF (TD_DARWIN) LIST(APPEND SRC ./src/shellEngine.c) LIST(APPEND SRC ./src/shellMain.c) diff --git a/src/kit/shell/inc/shell.h b/src/kit/shell/inc/shell.h index 9c5794278c5bd9545fb6260e4f8442d8c9e8cad9..7b22f89351a1247abebcd1b33cb8e2d394967dba 100644 --- a/src/kit/shell/inc/shell.h +++ b/src/kit/shell/inc/shell.h @@ -27,21 +27,7 @@ #define MAX_IP_SIZE 20 #define MAX_HISTORY_SIZE 1000 #define MAX_COMMAND_SIZE 1048586 - -#ifdef _TD_POWER_ - #define HISTORY_FILE ".power_history" -#elif (_TD_TQ_ == true) - #define HISTORY_FILE ".tq_history" -#elif (_TD_PRO_ == true) - #define HISTORY_FILE ".prodb_history" -#elif (_TD_KH_ == true) - #define HISTORY_FILE ".kh_history" -#elif (_TD_JH_ == true) - #define HISTORY_FILE ".jh_taos_history" -#else - #define HISTORY_FILE ".taos_history" -#endif - +#define HISTORY_FILE ".taos_history" #define DEFAULT_RES_SHOW_NUM 100 typedef struct SShellHistory { diff --git a/src/kit/shell/src/shellEngine.c b/src/kit/shell/src/shellEngine.c index 1863a8c408f14f6eb2de6ee3196df8230ed91a5c..37e98199aa31e45c842aaa8cf2ba39918b32dcdb 100644 --- a/src/kit/shell/src/shellEngine.c +++ b/src/kit/shell/src/shellEngine.c @@ -30,44 +30,11 @@ #include /**************** Global variables ****************/ -#ifdef _TD_POWER_ -char CLIENT_VERSION[] = "Welcome to the PowerDB shell from %s, Client Version:%s\n" - "Copyright (c) 2020 by PowerDB, Inc. All rights reserved.\n\n"; -char PROMPT_HEADER[] = "power> "; -char CONTINUE_PROMPT[] = " -> "; -int prompt_size = 7; -#elif (_TD_TQ_ == true) -char CLIENT_VERSION[] = "Welcome to the TQ shell from %s, Client Version:%s\n" - "Copyright (c) 2020 by TQ, Inc. All rights reserved.\n\n"; -char PROMPT_HEADER[] = "tq> "; -char CONTINUE_PROMPT[] = " -> "; -int prompt_size = 4; -#elif (_TD_PRO_ == true) -char CLIENT_VERSION[] = "Welcome to the ProDB shell from %s, Client Version:%s\n" - "Copyright (c) 2020 by Hanatech, Inc. All rights reserved.\n\n"; -char PROMPT_HEADER[] = "ProDB> "; -char CONTINUE_PROMPT[] = " -> "; -int prompt_size = 7; -#elif (_TD_KH_ == true) -char CLIENT_VERSION[] = "Welcome to the KingHistorian shell from %s, Client Version:%s\n" - "Copyright (c) 2021 by Wellintech, Inc. All rights reserved.\n\n"; -char PROMPT_HEADER[] = "khclient> "; - -char CONTINUE_PROMPT[] = " -> "; -int prompt_size = 10; -#elif (_TD_JH_ == true) -char CLIENT_VERSION[] = "Welcome to the jh_iot shell from %s, Client Version:%s\n" - "Copyright (c) 2021 by jinheng, Inc. All rights reserved.\n\n"; -char PROMPT_HEADER[] = "jh_taos> "; -char CONTINUE_PROMPT[] = " -> "; -int prompt_size = 9; -#else char CLIENT_VERSION[] = "Welcome to the TDengine shell from %s, Client Version:%s\n" "Copyright (c) 2020 by TAOS Data, Inc. All rights reserved.\n\n"; char PROMPT_HEADER[] = "taos> "; char CONTINUE_PROMPT[] = " -> "; int prompt_size = 6; -#endif int64_t result = 0; SShellHistory history; @@ -120,11 +87,7 @@ TAOS *shellInit(SShellArguments *_args) { } if (con == NULL) { -#ifdef _TD_KH_ - printf("kh connect failed, reason: %s.\n\n", tstrerror(terrno)); -#else printf("taos connect failed, reason: %s.\n\n", tstrerror(terrno)); -#endif fflush(stdout); return con; } diff --git a/src/kit/shell/src/shellLinux.c b/src/kit/shell/src/shellLinux.c index 8d36e1cc6b785c17d90c409a412df2b288d0a620..1ddaed2e1120fd99d98ce76a9c6719983f707a34 100644 --- a/src/kit/shell/src/shellLinux.c +++ b/src/kit/shell/src/shellLinux.c @@ -29,11 +29,7 @@ struct termios oldtio; extern int wcwidth(wchar_t c); void insertChar(Command *cmd, char *c, int size); const char *argp_program_version = version; -#ifdef _TD_KH_ -const char *argp_program_bug_address = ""; -#else const char *argp_program_bug_address = ""; -#endif static char doc[] = ""; static char args_doc[] = ""; static struct argp_option options[] = { diff --git a/src/kit/shell/src/shellWindows.c b/src/kit/shell/src/shellWindows.c index f693ae0b56cea2da12e01a0c82e32ac739e5ca4d..74a5317412016be1849dabaaaa1851aee75c57d6 100644 --- a/src/kit/shell/src/shellWindows.c +++ b/src/kit/shell/src/shellWindows.c @@ -20,27 +20,8 @@ #define SHELL_INPUT_MAX_COMMAND_SIZE 10000 extern char configDir[]; - -#ifdef _TD_POWER_ -char WINCLIENT_VERSION[] = "Welcome to the PowerDB shell from %s, Client Version:%s\n" - "Copyright (c) 2020 by PowerDB, Inc. All rights reserved.\n\n"; -#elif (_TD_TQ_ == true) -char WINCLIENT_VERSION[] = "Welcome to the TQ shell from %s, Client Version:%s\n" - "Copyright (c) 2020 by TAOS Data, Inc. All rights reserved.\n\n"; -#elif (_TD_PRO_ == true) -char WINCLIENT_VERSION[] = "Welcome to the ProDB shell from %s, Client Version:%s\n" - "Copyright (c) 2020 by Hanatech, Inc. All rights reserved.\n\n"; -#elif (_TD_KH_ == true) -char WINCLIENT_VERSION[] = "Welcome to the KingHistorian shell from %s, Client Version:%s\n" - "Copyright (c) 2021 by Wellintech, Inc. All rights reserved.\n\n"; -#elif (_TD_JH_ == true) -char WINCLIENT_VERSION[] = "Welcome to the jh_iot shell from %s, Client Version:%s\n" - "Copyright (c) 2021 by jinheng, Inc. All rights reserved.\n\n"; -#else char WINCLIENT_VERSION[] = "Welcome to the TDengine shell from %s, Client Version:%s\n" "Copyright (c) 2020 by TAOS Data, Inc. All rights reserved.\n\n"; -#endif - void printVersion() { printf("version: %s\n", version); @@ -335,19 +316,7 @@ void *shellLoopQuery(void *arg) { } void get_history_path(char *history) { -#ifdef _TD_POWER_ - sprintf(history, "C:/PowerDB/%s", HISTORY_FILE); -#elif (_TD_TQ_ == true) - sprintf(history, "C:/TQueue/%s", HISTORY_FILE); -#elif (_TD_PRO_ == true) - sprintf(history, "C:/ProDB/%s", HISTORY_FILE); -#elif (_TD_KH_ == true) - sprintf(history, "C:/KingHistorian/%s", HISTORY_FILE); -#elif (_TD_JH_ == true) - sprintf(history, "C:/jh_iot/%s", HISTORY_FILE); -#else sprintf(history, "C:/TDengine/%s", HISTORY_FILE); -#endif } void exitShell() { exit(EXIT_SUCCESS); } diff --git a/src/kit/taosdemo/taosdemo.c b/src/kit/taosdemo/taosdemo.c index 3a0f3a7f61b52f85da1809edd7120b6babe93169..96f70657ec6a6a0bbc88fea2ebc16e30cf80fb84 100644 --- a/src/kit/taosdemo/taosdemo.c +++ b/src/kit/taosdemo/taosdemo.c @@ -627,17 +627,7 @@ SArguments g_args = { 6030, // port INTERFACE_BUT, // iface "root", // user -#ifdef _TD_POWER_ - "powerdb", // password -#elif (_TD_TQ_ == true) - "tqueue", // password -#elif (_TD_PRO_ == true) - "prodb", // password -#elif (_TD_KH_ == true) - "khroot", // password -#else "taosdata", // password -#endif "test", // database 1, // replica "d", // tb_prefix @@ -841,17 +831,10 @@ static void printHelp() { /* printf("%s%s%s%s\n", indent, "-D", indent, "Delete database if exists. 0: no, 1: yes, default is 1"); */ -#ifdef _TD_KH_ - printf("\nMandatory or optional arguments to long options are also mandatory or optional\n\ -for any corresponding short options.\n\ -\n\ -Report bugs to .\n"); -#else printf("\nMandatory or optional arguments to long options are also mandatory or optional\n\ for any corresponding short options.\n\ \n\ Report bugs to .\n"); -#endif } static bool isStringNumber(char *input) diff --git a/src/kit/taosdump/taosdump.c b/src/kit/taosdump/taosdump.c index d593f1c4bb5d939432ebdea83b5f461f5201a52e..abf94766639fb8cc64c6a5185d7018df5e57b054 100644 --- a/src/kit/taosdump/taosdump.c +++ b/src/kit/taosdump/taosdump.c @@ -231,12 +231,7 @@ SDbInfo **g_dbInfos = NULL; TableInfo *g_tablesList = NULL; const char *argp_program_version = version; -#ifdef _TD_KH_ -const char *argp_program_bug_address = ""; -#else const char *argp_program_bug_address = ""; -#endif - /* Program documentation. */ static char doc[] = ""; @@ -359,17 +354,7 @@ struct arguments g_args = { // connection option NULL, "root", -#ifdef _TD_POWER_ - "powerdb", -#elif (_TD_TQ_ == true) - "tqueue", -#elif (_TD_PRO_ == true) - "prodb", -#elif (_TD_KH_ == true) - "khroot", -#else "taosdata", -#endif 0, 0, // outpath and inpath diff --git a/src/os/src/linux/linuxEnv.c b/src/os/src/linux/linuxEnv.c index 84c873202b685e690252890e347632e096a4b39e..e31364e2224e82bcc36e8e72a70b44620172be3f 100644 --- a/src/os/src/linux/linuxEnv.c +++ b/src/os/src/linux/linuxEnv.c @@ -18,49 +18,12 @@ #include "tglobal.h" void osInit() { -#ifdef _TD_POWER_ - if (configDir[0] == 0) { - strcpy(configDir, "/etc/power"); - } - strcpy(tsDataDir, "/var/lib/power"); - strcpy(tsLogDir, "/var/log/power"); - strcpy(tsScriptDir, "/etc/power"); -#elif (_TD_TQ_ == true) - if (configDir[0] == 0) { - strcpy(configDir, "/etc/tq"); - } - strcpy(tsDataDir, "/var/lib/tq"); - strcpy(tsLogDir, "/var/log/tq"); - strcpy(tsScriptDir, "/etc/tq"); -#elif (_TD_PRO_ == true) - if (configDir[0] == 0) { - strcpy(configDir, "/etc/ProDB"); - } - strcpy(tsDataDir, "/var/lib/ProDB"); - strcpy(tsLogDir, "/var/log/ProDB"); - strcpy(tsScriptDir, "/etc/ProDB"); -#elif (_TD_KH_ == true) - if (configDir[0] == 0) { - strcpy(configDir, "/etc/kinghistorian"); - } - strcpy(tsDataDir, "/var/lib/kinghistorian"); - strcpy(tsLogDir, "/var/log/kinghistorian"); - strcpy(tsScriptDir, "/etc/kinghistorian"); -#elif (_TD_JH_ == true) - if (configDir[0] == 0) { - strcpy(configDir, "/etc/jh_taos"); - } - strcpy(tsDataDir, "/var/lib/jh_taos"); - strcpy(tsLogDir, "/var/log/jh_taos"); - strcpy(tsScriptDir, "/etc/jh_taos"); -#else if (configDir[0] == 0) { strcpy(configDir, "/etc/taos"); } strcpy(tsDataDir, "/var/lib/taos"); strcpy(tsLogDir, "/var/log/taos"); strcpy(tsScriptDir, "/etc/taos"); -#endif strcpy(tsVnodeDir, ""); strcpy(tsDnodeDir, ""); diff --git a/src/os/src/windows/wEnv.c b/src/os/src/windows/wEnv.c index 6e087c9b29d7468b7c5a4e82c0f69b38f2c01223..e1ce390a6f716573abbecbb561db01dfa3a1e507 100644 --- a/src/os/src/windows/wEnv.c +++ b/src/os/src/windows/wEnv.c @@ -22,48 +22,6 @@ extern void taosWinSocketInit(); void osInit() { taosSetCoreDump(); -#ifdef _TD_POWER_ - if (configDir[0] == 0) { - strcpy(configDir, "C:/PowerDB/cfg"); - } - - strcpy(tsVnodeDir, "C:/PowerDB/data"); - strcpy(tsDataDir, "C:/PowerDB/data"); - strcpy(tsLogDir, "C:/PowerDB/log"); - strcpy(tsScriptDir, "C:/PowerDB/script"); -#elif (_TD_TQ_ == true) - if (configDir[0] == 0) { - strcpy(configDir, "C:/TQueue/cfg"); - } - strcpy(tsVnodeDir, "C:/TQueue/data"); - strcpy(tsDataDir, "C:/TQueue/data"); - strcpy(tsLogDir, "C:/TQueue/log"); - strcpy(tsScriptDir, "C:/TQueue/script"); -#elif (_TD_PRO_ == true) - if (configDir[0] == 0) { - strcpy(configDir, "C:/ProDB/cfg"); - } - strcpy(tsVnodeDir, "C:/ProDB/data"); - strcpy(tsDataDir, "C:/ProDB/data"); - strcpy(tsLogDir, "C:/ProDB/log"); - strcpy(tsScriptDir, "C:/ProDB/script"); -#elif (_TD_KH_ == true) - if (configDir[0] == 0) { - strcpy(configDir, "C:/KingHistorian/cfg"); - } - strcpy(tsVnodeDir, "C:/KingHistorian/data"); - strcpy(tsDataDir, "C:/KingHistorian/data"); - strcpy(tsLogDir, "C:/KingHistorian/log"); - strcpy(tsScriptDir, "C:/KingHistorian/script"); -#elif (_TD_JH_ == true) - if (configDir[0] == 0) { - strcpy(configDir, "C:/jh_iot/cfg"); - } - strcpy(tsVnodeDir, "C:/jh_iot/data"); - strcpy(tsDataDir, "C:/jh_iot/data"); - strcpy(tsLogDir, "C:/jh_iot/log"); - strcpy(tsScriptDir, "C:/jh_iot/script"); -#else if (configDir[0] == 0) { strcpy(configDir, "C:/TDengine/cfg"); } @@ -72,7 +30,6 @@ void osInit() { strcpy(tsDataDir, "C:/TDengine/data"); strcpy(tsLogDir, "C:/TDengine/log"); strcpy(tsScriptDir, "C:/TDengine/script"); -#endif strcpy(tsDnodeDir, ""); strcpy(tsMnodeDir, ""); diff --git a/src/plugins/monitor/src/monMain.c b/src/plugins/monitor/src/monMain.c index 5677fff71cc56197e9075c286d565d77ce3169c1..fea793fa860fd17ff30bcecae1436180bc6b34bf 100644 --- a/src/plugins/monitor/src/monMain.c +++ b/src/plugins/monitor/src/monMain.c @@ -123,11 +123,7 @@ static void *monThreadFunc(void *param) { if (tsMonitor.quiting) { tsMonitor.state = MON_STATE_NOT_INIT; -#ifdef _TD_KH_ - monInfo("monitor thread will quit, for khserver is quiting"); -#else monInfo("monitor thread will quit, for taosd is quiting"); -#endif break; } else { taosGetDisk(); diff --git a/src/util/src/tconfig.c b/src/util/src/tconfig.c index ff076522cade7b096cf01085e73f7509d2cf9ba8..7f968b4bfdb6fe43a31a84a74901c627309001b5 100644 --- a/src/util/src/tconfig.c +++ b/src/util/src/tconfig.c @@ -330,34 +330,13 @@ void taosReadGlobalLogCfg() { } strcpy(configDir, full_path.we_wordv[0]); } else { -#ifdef _TD_POWER_ - printf("configDir:%s not there, use default value: /etc/power", configDir); - strcpy(configDir, "/etc/power"); -#elif (_TD_TQ_ == true) - printf("configDir:%s not there, use default value: /etc/tq", configDir); - strcpy(configDir, "/etc/tq"); -#elif (_TD_PRO_ == true) - printf("configDir:%s not there, use default value: /etc/ProDB", configDir); - strcpy(configDir, "/etc/ProDB"); -#elif (_TD_KH_ == true) - printf("configDir:%s not there, use default value: /etc/kinghistorian", configDir); - strcpy(configDir, "/etc/kinghistorian"); -#elif (_TD_JH_ == true) - printf("configDir:%s not there, use default value: /etc/jh_taos", configDir); - strcpy(configDir, "/etc/jh_taos"); -#else printf("configDir:%s not there, use default value: /etc/taos", configDir); strcpy(configDir, "/etc/taos"); -#endif } wordfree(&full_path); taosReadLogOption("logDir", tsLogDir); -#ifdef _TD_KH_ - sprintf(fileName, "%s/kinghistorian.cfg", configDir); -#else sprintf(fileName, "%s/taos.cfg", configDir); -#endif fp = fopen(fileName, "r"); if (fp == NULL) { printf("\nconfig file:%s not found, all variables are set to default\n", fileName); @@ -401,11 +380,7 @@ bool taosReadGlobalCfg() { char * line, *option, *value, *value2, *value3; int olen, vlen, vlen2, vlen3; char fileName[PATH_MAX] = {0}; -#ifdef _TD_KH_ - sprintf(fileName, "%s/kinghistorian.cfg", configDir); -#else sprintf(fileName, "%s/taos.cfg", configDir); -#endif FILE* fp = fopen(fileName, "r"); if (fp == NULL) { struct stat s; diff --git a/src/util/src/tlog.c b/src/util/src/tlog.c index 232d10a7d07594c9c62cd13767c320da27af2a73..567402f3ed621a67654133ce43907c64a609dedd 100644 --- a/src/util/src/tlog.c +++ b/src/util/src/tlog.c @@ -81,19 +81,7 @@ int64_t dbgSmallWN = 0; int64_t dbgBigWN = 0; int64_t dbgWSize = 0; -#ifdef _TD_POWER_ -char tsLogDir[TSDB_FILENAME_LEN] = "/var/log/power"; -#elif (_TD_TQ_ == true) -char tsLogDir[TSDB_FILENAME_LEN] = "/var/log/tq"; -#elif (_TD_PRO_ == true) -char tsLogDir[TSDB_FILENAME_LEN] = "/var/log/ProDB"; -#elif (_TD_KH_ == true) -char tsLogDir[TSDB_FILENAME_LEN] = "/var/log/kinghistorian"; -#elif (_TD_JH_ == true) -char tsLogDir[TSDB_FILENAME_LEN] = "/var/log/jh_taos"; -#else char tsLogDir[PATH_MAX] = "/var/log/taos"; -#endif static SLogObj tsLogObj = { .fileNum = 1 }; static void * taosAsyncOutputLog(void *param);