diff --git a/packaging/tools/install.sh b/packaging/tools/install.sh index dfdbaa6fdd634679d45b1fa3eeaa5aabdea36a23..5aeff0e2fac3cde9e381a33719f5ab25722e16f5 100755 --- a/packaging/tools/install.sh +++ b/packaging/tools/install.sh @@ -35,6 +35,20 @@ dumpName="taosdump" demoName="taosdemo" xname="taosx" +clientName2="taos" +serverName2="taosd" +productName2="TDengine" +emailName2="taosdata.com" + +benchmarkName2="${clientName2}Benchmark" +dumpName2="${clientName2}dump" +uninstallScript2="rm${clientName2}" + +historyFile="${clientName2}_history" +logDir="/var/log/${clientName2}" +configDir="/etc/${clientName2}" +installDir="/usr/local/${clientName}" + data_dir=${dataDir} log_dir=${logDir} cfg_install_dir=${configDir} @@ -217,6 +231,13 @@ function install_bin() { [ -x ${install_main_dir}/bin/TDinsight.sh ] && ${csudo}ln -s ${install_main_dir}/bin/TDinsight.sh ${bin_link_dir}/TDinsight.sh || : [ -x ${install_main_dir}/bin/remove.sh ] && ${csudo}ln -s ${install_main_dir}/bin/remove.sh ${bin_link_dir}/${uninstallScript} || : [ -x ${install_main_dir}/bin/set_core.sh ] && ${csudo}ln -s ${install_main_dir}/bin/set_core.sh ${bin_link_dir}/set_core || : + + if [ "$verMode" == "cluster" ] && [ "$clientName" != "$clientName2" ]; then + [ -x ${install_main_dir}/bin/${clientName} ] && ${csudo}ln -s ${install_main_dir}/bin/${clientName} ${bin_link_dir}/${clientName2} || : + [ -x ${install_main_dir}/bin/${benchmarkName} ] && ${csudo}ln -s ${install_main_dir}/bin/${benchmarkName} ${bin_link_dir}/${benchmarkName2} || : + [ -x ${install_main_dir}/bin/${dumpName} ] && ${csudo}ln -s ${install_main_dir}/bin/${dumpName} ${bin_link_dir}/${dumpName2} || : + [ -x ${install_main_dir}/bin/remove.sh ] && ${csudo}ln -s ${install_main_dir}/bin/remove.sh ${bin_link_dir}/${uninstallScript2} || : + fi } function install_lib() { @@ -518,7 +539,7 @@ function install_config() { local_fqdn_check echo - echo -e -n "${GREEN}Enter FQDN:port (like h1.${emailName}:6030) of an existing ${productName} cluster node to join${NC}" + echo -e -n "${GREEN}Enter FQDN:port (like h1.${emailName2}:6030) of an existing ${productName2} cluster node to join${NC}" echo echo -e -n "${GREEN}OR leave it blank to build one${NC}:" read firstEp @@ -655,6 +676,9 @@ function clean_service_on_systemd() { fi ${csudo}systemctl disable tarbitratord &>/dev/null || echo &>/dev/null ${csudo}rm -f ${tarbitratord_service_config} + # if [ "$verMode" == "cluster" ] && [ "$clientName" != "$clientName2" ]; then + # ${csudo}rm -f ${service_config_dir}/${serverName2}.service + # fi } function install_service_on_systemd() { @@ -663,6 +687,13 @@ function install_service_on_systemd() { [ -f ${script_dir}/cfg/${serverName}.service ] && ${csudo}cp ${script_dir}/cfg/${serverName}.service \ ${service_config_dir}/ || : + + # if [ "$verMode" == "cluster" ] && [ "$clientName" != "$clientName2" ]; then + # [ -f ${script_dir}/cfg/${serverName}.service ] && + # ${csudo}cp ${script_dir}/cfg/${serverName}.service \ + # ${service_config_dir}/${serverName2}.service || : + # fi + ${csudo}systemctl daemon-reload ${csudo}systemctl enable ${serverName} @@ -793,7 +824,7 @@ function updateProduct() { tar -zxf ${tarName} install_jemalloc - echo -e "${GREEN}Start to update ${productName}...${NC}" + echo -e "${GREEN}Start to update ${productName2}...${NC}" # Stop the service if running if ps aux | grep -v grep | grep ${serverName} &>/dev/null; then if ((${service_mod} == 0)); then @@ -830,25 +861,25 @@ function updateProduct() { echo echo -e "${GREEN_DARK}To configure ${productName} ${NC}: edit ${cfg_install_dir}/${configFile}" [ -f ${configDir}/taosadapter.toml ] && [ -f ${installDir}/bin/taosadapter ] && \ - echo -e "${GREEN_DARK}To configure Taos Adapter ${NC}: edit ${configDir}/taosadapter.toml" + echo -e "${GREEN_DARK}To configure Adapter ${NC}: edit ${configDir}/taosadapter.toml" if ((${service_mod} == 0)); then echo -e "${GREEN_DARK}To start ${productName} ${NC}: ${csudo}systemctl start ${serverName}${NC}" [ -f ${service_config_dir}/taosadapter.service ] && [ -f ${installDir}/bin/taosadapter ] && \ - echo -e "${GREEN_DARK}To start Taos Adatper ${NC}: ${csudo}systemctl start taosadapter ${NC}" + echo -e "${GREEN_DARK}To start Adatper ${NC}: ${csudo}systemctl start taosadapter ${NC}" elif ((${service_mod} == 1)); then echo -e "${GREEN_DARK}To start ${productName} ${NC}: ${csudo}service ${serverName} start${NC}" [ -f ${service_config_dir}/taosadapter.service ] && [ -f ${installDir}/bin/taosadapter ] && \ - echo -e "${GREEN_DARK}To start Taos Adapter ${NC}: ${csudo}service taosadapter start${NC}" + echo -e "${GREEN_DARK}To start Adapter ${NC}: ${csudo}service taosadapter start${NC}" else echo -e "${GREEN_DARK}To start ${productName} ${NC}: ./${serverName}${NC}" [ -f ${installDir}/bin/taosadapter ] && \ - echo -e "${GREEN_DARK}To start Taos Adapter ${NC}: taosadapter &${NC}" + echo -e "${GREEN_DARK}To start ${clientName} Adapter ${NC}: taosadapter &${NC}" fi if [ ${openresty_work} = 'true' ]; then - echo -e "${GREEN_DARK}To access ${productName} ${NC}: use ${GREEN_UNDERLINE}${clientName} -h $serverFqdn${NC} in shell OR from ${GREEN_UNDERLINE}http://127.0.0.1:${web_port}${NC}" + echo -e "${GREEN_DARK}To access ${productName2} ${NC}: use ${GREEN_UNDERLINE}${clientName2} -h $serverFqdn${NC} in shell OR from ${GREEN_UNDERLINE}http://127.0.0.1:${web_port}${NC}" else - echo -e "${GREEN_DARK}To access ${productName} ${NC}: use ${GREEN_UNDERLINE}${clientName} -h $serverFqdn${NC} in shell${NC}" + echo -e "${GREEN_DARK}To access ${productName2} ${NC}: use ${GREEN_UNDERLINE}${clientName2} -h $serverFqdn${NC} in shell${NC}" fi if ((${prompt_force} == 1)); then @@ -856,13 +887,13 @@ function updateProduct() { echo -e "${RED}Please run '${serverName} --force-keep-file' at first time for the exist ${productName} $exist_version!${NC}" fi echo - echo -e "\033[44;32;1m${productName} is updated successfully!${NC}" + echo -e "\033[44;32;1m${productName2} is updated successfully!${NC}" else install_bin install_config echo - echo -e "\033[44;32;1m${productName} client is updated successfully!${NC}" + echo -e "\033[44;32;1m${productName2} client is updated successfully!${NC}" fi rm -rf $(tar -tf ${tarName} | grep -v "^\./$") @@ -876,7 +907,7 @@ function installProduct() { fi tar -zxf ${tarName} - echo -e "${GREEN}Start to install ${productName}...${NC}" + echo -e "${GREEN}Start to install ${productName2}...${NC}" install_main_path @@ -965,7 +996,7 @@ serverFqdn=$(hostname) if [ "$verType" == "server" ]; then # Check default 2.x data file. if [ -x ${data_dir}/dnode/dnodeCfg.json ]; then - echo -e "\033[44;31;5mThe default data directory ${data_dir} contains old data of tdengine 2.x, please clear it before installing!\033[0m" + echo -e "\033[44;31;5mThe default data directory ${data_dir} contains old data of ${productName2} 2.x, please clear it before installing!\033[0m" else # Install server and client if [ -x ${bin_dir}/${serverName} ]; then diff --git a/packaging/tools/install_client.sh b/packaging/tools/install_client.sh index f7d677c9821ed685750dcd50e2823f9abda4ef42..1543c59297d663f0579d53f5c9778385cbef3ba8 100755 --- a/packaging/tools/install_client.sh +++ b/packaging/tools/install_client.sh @@ -23,6 +23,16 @@ osType=Linux pagMode=full verMode=edge +clientName2="taos" +serverName2="taosd" +productName2="TDengine" +emailName2="taosdata.com" + +benchmarkName2="${clientName2}Benchmark" +dumpName2="${clientName2}dump" +demoName2="${clientName2}demo" +uninstallScript2="rm${clientName2}" + if [ "$osType" != "Darwin" ]; then script_dir=$(dirname $(readlink -f "$0")) # Dynamic directory @@ -112,6 +122,15 @@ function install_bin() { fi [ -x ${install_main_dir}/bin/remove_client.sh ] && ${csudo}ln -s ${install_main_dir}/bin/remove_client.sh ${bin_link_dir}/${uninstallScript} || : [ -x ${install_main_dir}/bin/set_core.sh ] && ${csudo}ln -s ${install_main_dir}/bin/set_core.sh ${bin_link_dir}/set_core || : + + if [ "$verMode" == "cluster" ] && [ "$clientName" != "$clientName2" ]; then + #Make link + [ -x ${install_main_dir}/bin/${clientName} ] && ${csudo}ln -s ${install_main_dir}/bin/${clientName} ${bin_link_dir}/${clientName2} || : + if [ "$osType" != "Darwin" ]; then + [ -x ${install_main_dir}/bin/taosdemo ] && ${csudo}ln -s ${install_main_dir}/bin/taosdemo ${bin_link_dir}/${demoName2} || : + fi + [ -x ${install_main_dir}/bin/remove_client.sh ] && ${csudo}ln -s ${install_main_dir}/bin/remove_client.sh ${bin_link_dir}/${uninstallScript2} || : + fi } function clean_lib() { @@ -263,9 +282,9 @@ function update_TDengine() { exit 1 fi tar -zxf ${tarName} - echo -e "${GREEN}Start to update ${productName} client...${NC}" + echo -e "${GREEN}Start to update ${productName2} client...${NC}" # Stop the client shell if running - if ps aux | grep -v grep | grep ${clientName} &> /dev/null; then + if ps aux | grep -v grep | grep ${clientName2} &> /dev/null; then kill_client sleep 1 fi @@ -284,7 +303,7 @@ function update_TDengine() { install_config echo - echo -e "\033[44;32;1m${productName} client is updated successfully!${NC}" + echo -e "\033[44;32;1m${productName2} client is updated successfully!${NC}" rm -rf $(tar -tf ${tarName}) } @@ -296,7 +315,7 @@ function install_TDengine() { exit 1 fi tar -zxf ${tarName} - echo -e "${GREEN}Start to install ${productName} client...${NC}" + echo -e "${GREEN}Start to install ${productName2} client...${NC}" install_main_path install_log @@ -311,7 +330,7 @@ function install_TDengine() { install_config echo - echo -e "\033[44;32;1m${productName} client is installed successfully!${NC}" + echo -e "\033[44;32;1m${productName2} client is installed successfully!${NC}" rm -rf $(tar -tf ${tarName}) } @@ -321,7 +340,7 @@ function install_TDengine() { # Install or updata client and client # if server is already install, don't install client if [ -e ${bin_dir}/${serverName} ]; then - echo -e "\033[44;32;1mThere are already installed ${productName} server, so don't need install client!${NC}" + echo -e "\033[44;32;1mThere are already installed ${productName2} server, so don't need install client!${NC}" exit 0 fi diff --git a/packaging/tools/makeclient.sh b/packaging/tools/makeclient.sh index db28de8decada6593abf5600bd8cf86cfe7d0984..208bfc183c91bba96be689fe6a475a5ae6e38649 100755 --- a/packaging/tools/makeclient.sh +++ b/packaging/tools/makeclient.sh @@ -13,7 +13,13 @@ osType=$5 verMode=$6 verType=$7 pagMode=$8 -dbName=$9 +#comVersion=$9 +dbName=$10 + +productName2="${11}" +#serverName2="${12}d" +clientName2="${12}" +# cusEmail2=${13} productName="TDengine" clientName="taos" @@ -38,15 +44,21 @@ release_dir="${top_dir}/release" #package_name='linux' if [ "$verMode" == "cluster" ]; then - install_dir="${release_dir}/${productName}-enterprise-client-${version}" + install_dir="${release_dir}/${productName2}-enterprise-client-${version}" elif [ "$verMode" == "cloud" ]; then - install_dir="${release_dir}/${productName}-cloud-client-${version}" + install_dir="${release_dir}/${productName2}-cloud-client-${version}" else - install_dir="${release_dir}/${productName}-client-${version}" + install_dir="${release_dir}/${productName2}-client-${version}" fi # Directories and files. +if [ "$verMode" == "cluster" ]; then + sed -i 's/verMode=edge/verMode=cluster/g' ${script_dir}/remove_client.sh + sed -i "s/clientName2=\"taos\"/clientName2=\"${clientName2}\"/g" ${script_dir}/remove_client.sh + sed -i "s/productName2=\"TDengine\"/productName2=\"${productName2}\"/g" ${script_dir}/remove_client.sh +fi + if [ "$osType" != "Darwin" ]; then if [ "$pagMode" == "lite" ]; then strip ${build_dir}/bin/${clientName} @@ -131,22 +143,28 @@ fi cd ${curr_dir} cp ${install_files} ${install_dir} +cp ${install_dir}/install_client.sh install_client_temp.sh if [ "$osType" == "Darwin" ]; then - sed 's/osType=Linux/osType=Darwin/g' ${install_dir}/install_client.sh >>install_client_temp.sh + sed -i 's/osType=Linux/osType=Darwin/g' install_client_temp.sh mv install_client_temp.sh ${install_dir}/install_client.sh fi if [ "$verMode" == "cluster" ]; then - sed 's/verMode=edge/verMode=cluster/g' ${install_dir}/install_client.sh >>install_client_temp.sh + sed -i 's/verMode=edge/verMode=cluster/g' install_client_temp.sh + sed -i "s/serverName2=\"taosd\"/serverName2=\"${serverName2}\"/g" install_client_temp.sh + sed -i "s/clientName2=\"taos\"/clientName2=\"${clientName2}\"/g" install_client_temp.sh + sed -i "s/productName2=\"TDengine\"/productName2=\"${productName2}\"/g" install_client_temp.sh + sed -i "s/emailName2=\"taosdata.com\"/emailName2=\"${cusEmail2}\"/g" install_client_temp.sh + mv install_client_temp.sh ${install_dir}/install_client.sh fi if [ "$verMode" == "cloud" ]; then - sed 's/verMode=edge/verMode=cloud/g' ${install_dir}/install_client.sh >>install_client_temp.sh + sed -i 's/verMode=edge/verMode=cloud/g' install_client_temp.sh mv install_client_temp.sh ${install_dir}/install_client.sh fi if [ "$pagMode" == "lite" ]; then - sed 's/pagMode=full/pagMode=lite/g' ${install_dir}/install_client.sh >>install_client_temp.sh + sed -i 's/pagMode=full/pagMode=lite/g' install_client_temp.sh mv install_client_temp.sh ${install_dir}/install_client.sh fi chmod a+x ${install_dir}/install_client.sh diff --git a/packaging/tools/makepkg.sh b/packaging/tools/makepkg.sh index 0ee548242f2a69b025dddb46381d8d8c1d30d799..0a34d81b7fa0000ad8924c3968ae897a6f7f43f3 100755 --- a/packaging/tools/makepkg.sh +++ b/packaging/tools/makepkg.sh @@ -16,6 +16,10 @@ verType=$7 pagMode=$8 versionComp=$9 dbName=${10} +productName2="${11}" +serverName2="${12}d" +clientName2="${12}" +cusEmail2="${13}" script_dir="$(dirname $(readlink -f $0))" top_dir="$(readlink -f ${script_dir}/../..)" @@ -38,11 +42,11 @@ release_dir="${top_dir}/release" #package_name='linux' if [ "$verMode" == "cluster" ]; then - install_dir="${release_dir}/${productName}-enterprise-server-${version}" + install_dir="${release_dir}/${productName2}-enterprise-server-${version}" elif [ "$verMode" == "cloud" ]; then - install_dir="${release_dir}/${productName}-cloud-server-${version}" + install_dir="${release_dir}/${productName2}-cloud-server-${version}" else - install_dir="${release_dir}/${productName}-server-${version}" + install_dir="${release_dir}/${productName2}-server-${version}" fi if [ -d ${top_dir}/tools/taos-tools/packaging/deb ]; then @@ -50,11 +54,11 @@ if [ -d ${top_dir}/tools/taos-tools/packaging/deb ]; then [ -z "$taos_tools_ver" ] && taos_tools_ver="0.1.0" taostools_ver=$(git tag |grep -v taos | sort | tail -1) - taostools_install_dir="${release_dir}/${clientName}Tools-${taostools_ver}" + taostools_install_dir="${release_dir}/${clientName2}Tools-${taostools_ver}" cd ${curr_dir} else - taostools_install_dir="${release_dir}/${clientName}Tools-${version}" + taostools_install_dir="${release_dir}/${clientName2}Tools-${version}" fi # Directories and files @@ -225,6 +229,10 @@ fi if [ "$verMode" == "cluster" ]; then sed 's/verMode=edge/verMode=cluster/g' ${install_dir}/bin/remove.sh >>remove_temp.sh + sed -i "s/serverName2=\"taosd\"/serverName2=\"${serverName2}\"/g" remove_temp.sh + sed -i "s/clientName2=\"taos\"/clientName2=\"${clientName2}\"/g" remove_temp.sh + sed -i "s/productName2=\"TDengine\"/productName2=\"${productName2}\"/g" remove_temp.sh + sed -i "s/emailName2=\"taosdata.com\"/emailName2=\"${cusEmail2}\"/g" remove_temp.sh mv remove_temp.sh ${install_dir}/bin/remove.sh fi if [ "$verMode" == "cloud" ]; then @@ -247,16 +255,21 @@ fi cd ${curr_dir} cp ${install_files} ${install_dir} +cp ${install_dir}/install.sh install_temp.sh if [ "$verMode" == "cluster" ]; then - sed 's/verMode=edge/verMode=cluster/g' ${install_dir}/install.sh >>install_temp.sh + sed -i 's/verMode=edge/verMode=cluster/g' install_temp.sh + sed -i "s/serverName2=\"taosd\"/serverName2=\"${serverName2}\"/g" install_temp.sh + sed -i "s/clientName2=\"taos\"/clientName2=\"${clientName2}\"/g" install_temp.sh + sed -i "s/productName2=\"TDengine\"/productName2=\"${productName2}\"/g" install_temp.sh + sed -i "s/emailName2=\"taosdata.com\"/emailName2=\"${cusEmail2}\"/g" install_temp.sh mv install_temp.sh ${install_dir}/install.sh fi if [ "$verMode" == "cloud" ]; then - sed 's/verMode=edge/verMode=cloud/g' ${install_dir}/install.sh >>install_temp.sh + sed -i 's/verMode=edge/verMode=cloud/g' install_temp.sh mv install_temp.sh ${install_dir}/install.sh fi if [ "$pagMode" == "lite" ]; then - sed 's/pagMode=full/pagMode=lite/g' ${install_dir}/install.sh >>install_temp.sh + sed -i 's/pagMode=full/pagMode=lite/g' install_temp.sh mv install_temp.sh ${install_dir}/install.sh fi chmod a+x ${install_dir}/install.sh diff --git a/packaging/tools/remove.sh b/packaging/tools/remove.sh index 8e5630ec2f7bc89d739486efdec7fc55acb2b046..9c50c4582db01fab94bb82f1556c3a94df741b1d 100755 --- a/packaging/tools/remove.sh +++ b/packaging/tools/remove.sh @@ -36,6 +36,16 @@ clientName="taos" uninstallScript="rmtaos" productName="TDengine" +serverName2="taosd" +clientName2="taos" +productName2="TDengine" + +benchmarkName2="${clientName2}Benchmark" +dumpName2="${clientName2}dump" +uninstallScript2="rm${clientName2}" + +installDir="/usr/local/${clientName}" + #install main path install_main_dir=${installDir} data_link_dir=${installDir}/data @@ -107,6 +117,15 @@ function clean_bin() { ${csudo}rm -f ${bin_link_dir}/tarbitrator || : ${csudo}rm -f ${bin_link_dir}/set_core || : ${csudo}rm -f ${bin_link_dir}/TDinsight.sh || : + ${csudo}rm -f ${bin_link_dir}/taoskeeper || : + ${csudo}rm -f ${bin_link_dir}/taosx || : + + if [ "$verMode" == "cluster" ] && [ "$clientName" != "$clientName2" ]; then + ${csudo}rm -f ${bin_link_dir}/${clientName2} || : + ${csudo}rm -f ${bin_link_dir}/${benchmarkName2} || : + ${csudo}rm -f ${bin_link_dir}/${dumpName2} || : + ${csudo}rm -f ${bin_link_dir}/${uninstallScript2} || : + fi } function clean_local_bin() { @@ -147,7 +166,7 @@ function clean_log() { function clean_service_on_systemd() { taosd_service_config="${service_config_dir}/${taos_service_name}.service" if systemctl is-active --quiet ${taos_service_name}; then - echo "${productName} ${serverName} is running, stopping it..." + echo "${productName2} ${serverName2} is running, stopping it..." ${csudo}systemctl stop ${taos_service_name} &>/dev/null || echo &>/dev/null fi ${csudo}systemctl disable ${taos_service_name} &>/dev/null || echo &>/dev/null @@ -155,7 +174,7 @@ function clean_service_on_systemd() { taosadapter_service_config="${service_config_dir}/taosadapter.service" if systemctl is-active --quiet ${taosadapter_service_name}; then - echo "${productName} taosAdapter is running, stopping it..." + echo "${productName2} ${clientName2}Adapter is running, stopping it..." ${csudo}systemctl stop ${taosadapter_service_name} &>/dev/null || echo &>/dev/null fi ${csudo}systemctl disable ${taosadapter_service_name} &>/dev/null || echo &>/dev/null @@ -163,7 +182,7 @@ function clean_service_on_systemd() { tarbitratord_service_config="${service_config_dir}/${tarbitrator_service_name}.service" if systemctl is-active --quiet ${tarbitrator_service_name}; then - echo "${productName} tarbitrator is running, stopping it..." + echo "${productName2} tarbitrator is running, stopping it..." ${csudo}systemctl stop ${tarbitrator_service_name} &>/dev/null || echo &>/dev/null fi ${csudo}systemctl disable ${tarbitrator_service_name} &>/dev/null || echo &>/dev/null @@ -172,12 +191,12 @@ function clean_service_on_systemd() { function clean_service_on_sysvinit() { if ps aux | grep -v grep | grep ${serverName} &>/dev/null; then - echo "${productName} ${serverName} is running, stopping it..." + echo "${productName2} ${serverName2} is running, stopping it..." ${csudo}service ${serverName} stop || : fi if ps aux | grep -v grep | grep tarbitrator &>/dev/null; then - echo "${productName} tarbitrator is running, stopping it..." + echo "${productName2} tarbitrator is running, stopping it..." ${csudo}service tarbitratord stop || : fi @@ -272,5 +291,5 @@ if [ "$osType" = "Darwin" ]; then ${csudo}rm -rf /Applications/TDengine.app fi -echo -e "${GREEN}${productName} is removed successfully!${NC}" +echo -e "${GREEN}${productName2} is removed successfully!${NC}" echo diff --git a/packaging/tools/remove_client.sh b/packaging/tools/remove_client.sh index 7ab7fa85998284e0dcb4cd158eb8599806fd7470..10a0fb5e02a7fbc10b05765d4036e76b0bd1e4c8 100755 --- a/packaging/tools/remove_client.sh +++ b/packaging/tools/remove_client.sh @@ -12,6 +12,15 @@ installDir="/usr/local/taos" clientName="taos" uninstallScript="rmtaos" +clientName2="taos" +productName2="TDengine" + +benchmarkName2="${clientName}Benchmark" +dumpName2="${clientName}dump" +uninstallScript2="rm${clientName}" + +installDir="/usr/local/${clientName}" + #install main path install_main_dir=${installDir} @@ -40,6 +49,12 @@ function clean_bin() { ${csudo}rm -f ${bin_link_dir}/taosdump || : ${csudo}rm -f ${bin_link_dir}/${uninstallScript} || : ${csudo}rm -f ${bin_link_dir}/set_core || : + + if [ "$verMode" == "cluster" ] && [ "$clientName" != "$clientName2" ]; then + ${csudo}rm -f ${bin_link_dir}/${clientName2} || : + ${csudo}rm -f ${bin_link_dir}/${dumpName2} || : + ${csudo}rm -f ${bin_link_dir}/${uninstallScript2} || : + fi } function clean_lib() { @@ -82,5 +97,5 @@ clean_config ${csudo}rm -rf ${install_main_dir} -echo -e "${GREEN}TDengine client is removed successfully!${NC}" +echo -e "${GREEN}${productName2} client is removed successfully!${NC}" echo diff --git a/packaging/tools/tdengine.iss b/packaging/tools/tdengine.iss index 3a22c737743872528887616b83b3ec58329e8795..b2dac600ab12a440c1e2b0333cd2a20122a457d4 100644 --- a/packaging/tools/tdengine.iss +++ b/packaging/tools/tdengine.iss @@ -3,7 +3,7 @@ #define MyAppURL "http://www.taosdata.com/" #define MyAppBeforeInstallTxt "windows_before_install.txt" #define MyAppIco "favicon.ico" -#define MyAppInstallDir "C:\TDengine" +#define MyAppInstallDir "C:\{#CusName}" #define MyAppOutputDir "./" #define MyAppSourceDir "C:\TDengine" ;#define MyAppAllFile "\*" @@ -18,7 +18,6 @@ #define MyAppDLLName "\driver\*.dll" ;#define MyAppVersion "3.0" ;#define MyAppInstallName "TDengine" -;#define MyAppInstallName "TDengine" [Setup] VersionInfoVersion={#MyAppVersion} AppId={{A0F7A93C-79C4-485D-B2B8-F0D03DF42FAB} @@ -59,11 +58,14 @@ Source: {#MyAppSourceDir}{#MyAppDriverName}; DestDir: "{app}\driver"; Flags: igN Source: {#MyAppSourceDir}{#MyAppIncludeName}; DestDir: "{app}\include"; Flags: igNoreversion recursesubdirs createallsubdirs Source: {#MyAppSourceDir}{#MyAppExeName}; DestDir: "{app}"; Excludes: {#MyAppExcludeSource} ; Flags: igNoreversion recursesubdirs createallsubdirs Source: {#MyAppSourceDir}{#MyAppTaosdemoExeName}; DestDir: "{app}"; Flags: igNoreversion recursesubdirs createallsubdirs +Source: {#MyAppSourceDir}\taos.exe; DestDir: "{app}"; DestName: "{#CusPrompt}.EXE"; Flags: igNoreversion recursesubdirs createallsubdirs +Source: {#MyAppSourceDir}\taosBenchmark.exe; DestDir: "{app}"; DestName: "{#CusPrompt}Benchmark.EXE"; Flags: igNoreversion recursesubdirs createallsubdirs +Source: {#MyAppSourceDir}\taosdump.exe; DestDir: "{app}"; DestName: "{#CusPrompt}dump.EXE"; Flags: igNoreversion recursesubdirs createallsubdirs [run] -Filename: {sys}\sc.exe; Parameters: "create taosd start= DEMAND binPath= ""C:\\TDengine\\taosd.exe --win_service""" ; Flags: runhidden -Filename: {sys}\sc.exe; Parameters: "create taosadapter start= DEMAND binPath= ""C:\\TDengine\\taosadapter.exe""" ; Flags: runhidden +Filename: {sys}\sc.exe; Parameters: "create taosd start= DEMAND binPath= ""C:\\{#CusName}\\taosd.exe --win_service""" ; Flags: runhidden +Filename: {sys}\sc.exe; Parameters: "create taosadapter start= DEMAND binPath= ""C:\\{#CusName}\\taosadapter.exe""" ; Flags: runhidden [UninstallRun] RunOnceId: "stoptaosd"; Filename: {sys}\sc.exe; Parameters: "stop taosd" ; Flags: runhidden @@ -73,8 +75,8 @@ RunOnceId: "deltaosadapter"; Filename: {sys}\sc.exe; Parameters: "delete taosada [Registry] Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; \ - ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};C:\TDengine"; \ - Check: NeedsAddPath('C:\TDengine') + ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};C:\{#CusName}"; \ + Check: NeedsAddPath('C:\{#CusName}') [Code] function NeedsAddPath(Param: string): boolean; @@ -104,11 +106,11 @@ Name: "desktopicon";Description: "{cm:CreateDesktopIcon}"; GroupDescription:"{cm [Icons] Name:"{group}\Taos Shell"; Filename: "{app}\include\{#MyAppTaosExeName}" ; Parameters: "taos.exe" ; IconFilename: "{app}\include\{#MyAppIco}" -Name:"{group}\Open TDengine Directory"; Filename: "{app}\" +Name:"{group}\Open {#CusName} Directory"; Filename: "{app}\" Name:"{group}\Taosdemo"; Filename: "{app}\include\{#MyAppTaosExeName}" ; Parameters: "taosdemo.exe" ; IconFilename: "{app}\include\{#MyAppIco}" Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" ; IconFilename: "{app}\include\{#MyAppIco}" Name:"{commondesktop}\Taos Shell"; Filename: "{app}\include\{#MyAppTaosExeName}" ; Parameters: "taos.exe" ; Tasks: desktopicon; WorkingDir: "{app}" ; IconFilename: "{app}\include\{#MyAppIco}" [Messages] -ConfirmUninstall=Do you really want to uninstall TDengine from your computer?%n%nPress [Y] to completely delete %1 and all its components;%nPress [N] to keep the software on your computer. +ConfirmUninstall=Do you really want to uninstall {#CusName} from your computer?%n%nPress [Y] to completely delete %1 and all its components;%nPress [N] to keep the software on your computer.