初始化提交,已经整合了数据库转发和opc修改的相关功能

This commit is contained in:
shi_jq 2025-03-12 10:03:16 +08:00
parent 4653e033b4
commit cb50626859
22038 changed files with 5355349 additions and 0 deletions

113
.gitignore vendored Normal file
View File

@ -0,0 +1,113 @@
# Prerequisites
*.d
# Compiled Object files
*.obj
# Precompiled Headers
*.gch
*.pch
# Fortran module files
*.mod
*.smod
# Compiled Static libraries
*.lai
*.la
# Executables
*.out
*.app
/products/ISCS6000_HOME/support/InfluxDB.zip
/products/ISCS6000_HOME/support/mysql.zip
/products/ISCS6000_HOME/support/npp.8.5.2.portable.x64.7z
/products/ISCS6000_HOME/web/windows10/EMS_NEW-0.0.1-SNAPSHOT.7z.001
/products/ISCS6000_HOME/web/windows10/EMS_NEW-0.0.1-SNAPSHOT.7z.002
/products/ISCS6000_HOME/web/windows10/nginx.7z
*.pro.user
*.vcxproj
*.vcxproj.*
**/translations/*
**/platform/**/resources/*
**/platform/**/*.manifest
*.pro.autosave
*.rc
#编译的临时文件
**/build-*-Debug/
**/src/temp/
*.tlog
vc140.pdb
vc140.idb
**/x64/Debug/
.qmake.stash
**/.vs/
*.VC.db
*.VC.VC.opendb
*.sln
*.pro.user.*
*.pdb
*.ilk
*.exp
*.vcxproj
**/src/**/Makefile
**/src/**/Makefile.*
Makefile
Makefile.*
#产品目录下的平台代码和配置
**/products/ISCS6000_HOME/platform/
!**/product/**/*.manifest
#工程配置文件
/data/
**/log/
/products/
backup/
web/windows10/nginx/html/
product/common/license/*
#暂时忽略
product/common/resource/zh/gui/translate/icon_zh.ts
platform/windows10_debug/*
product/windows10_debug/*
platform/windows10_release/*
product/windows10_release/*
platform/centos7_debug/*
product/centos7_debug/*
platform/centos7_release/*
product/centos7_release/*
platform/kylin10d_debug/*
product/kylin10d_debug/*
platform/kylin10d_release/*
product/kylin10d_release/*
platform/oe2203_aarch64_debug/*
product/oe2203_aarch64_debug/*
platform/oe2203_aarch64_release/*
product/oe2203_aarch64_release/*
platform/oe2203_debug/*
product/oe2203_debug/*
platform/oe2203_release/*
product/oe2203_release/*
#忽略代码目录生成qm文件
platform/src/**/*.qm
product/src/**/*.qm
/product/windows10_release_setup
/product/windows10_debug_setup
/product/kylin10d_release_setup
/product/kylin10d_debug_setup
/product/oe2203_release_setup
/product/oe2203_debug_setup
/product/oe2203_aarch64_release_setup
/product/oe2203_aarch64_debug_setup
/product/centos7_release_setup
/product/centos7_debug_setup

View File

@ -0,0 +1,9 @@
polkit.addRule(function(action, subject) {
// 输出 action.id 和 user 信息
//polkit.log('Checking action: ' + action.id);
//polkit.log('User: ' + subject.user);
if (action.id == "org.freedesktop.policykit.exec" &&
/^\/(usr\/)?bin\/(systemctl|bash|influx_inspect|influx|influxd)$/.test(action.lookup("program"))) {
return polkit.Result.YES; // 直接允许
}
});

View File

@ -0,0 +1,51 @@
@echo off
set "scriptPath=%~dp0"
echo 脚本所在目录:%scriptPath%
::获取操作平台以及版本
if defined RQEH6000_OS (
set OS_DEFINE=%RQEH6000_OS%
)
if defined ISCS6000_OS (
set OS_DEFINE=%ISCS6000_OS%
)
if exist "%scriptPath%\..\product\%OS_DEFINE%_debug\" (
set SETUP_DEBUG_RELEASE=debug
) else (
set SETUP_DEBUG_RELEASE=release
)
echo SETUP_DEBUG_RELEASE=%SETUP_DEBUG_RELEASE%
echo OS_DEFINE=%OS_DEFINE%
::注册
cd /d "%scriptPath%"
call registry_software.bat
::启动influxdb
cd /d "%scriptPath%"
cd "..\database\InfluxDB"
call InstallService.bat
.\influx.exe -host localhost -port 8086 -database rqeh6000 -execute "create user rqeh6000 with password 'relyez@2019' with all privileges"
::启动MySQL
cd /d "%scriptPath%"
cd "..\database\mysql"
call Install.bat
::启动Nginx
cd /d "%scriptPath%"
cd "..\nginx"
call install_nginx.bat
::数据库升级
cd /d "%scriptPath%"
cd "..\product\%OS_DEFINE%_%SETUP_DEBUG_RELEASE%"
start db_installer.exe
cd /d "%scriptPath%"
cd "..\platform\%OS_DEFINE%_%SETUP_DEBUG_RELEASE%"
.\net_keepalived.exe -r
net start net_keepalived
pause

28
installer/StopService.bat Normal file
View File

@ -0,0 +1,28 @@
@echo off
::保存当前脚本所在目录
set "scriptPath=%~dp0"
echo 脚本所在目录:%scriptPath%
cd /d "%scriptPath%"
::关闭influxdb
cd "..\database\InfluxDB"
call RemoveService.bat
::关闭MySQL
cd /d "%scriptPath%"
cd "..\database\mysql"
call uninstall.bat
cd /d "%scriptPath%"
::关闭Nginx
cd "..\nginx"
call uninstall_nginx.bat
net stop net_keepalived
sc delete net_keepalived
echo %CD%
echo Uninstall Success!
pause

View File

@ -0,0 +1,79 @@
[Allow Systemctl Execution]
Identity=unix-user:*
Action=org.freedesktop.policykit.exec
ResultAny=yes
ResultInactive=yes
ResultActive=yes
ConditionExecutable=/usr/bin/systemctl
[Allow Systemctl Execution 2]
Identity=unix-user:*
Action=org.freedesktop.policykit.exec
ResultAny=yes
ResultInactive=yes
ResultActive=yes
ConditionExecutable=/bin/systemctl
[Allow Bash Execution]
Identity=unix-user:*
Action=org.freedesktop.policykit.exec
ResultAny=yes
ResultInactive=yes
ResultActive=yes
ConditionExecutable=/usr/bin/bash
[Allow Bash Execution 2]
Identity=unix-user:*
Action=org.freedesktop.policykit.exec
ResultAny=yes
ResultInactive=yes
ResultActive=yes
ConditionExecutable=/bin/bash
[Allow influx_inspect Execution]
Identity=unix-user:*
Action=org.freedesktop.policykit.exec
ResultAny=yes
ResultInactive=yes
ResultActive=yes
ConditionExecutable=/usr/bin/influx_inspect
[Allow influx_inspect Execution 2]
Identity=unix-user:*
Action=org.freedesktop.policykit.exec
ResultAny=yes
ResultInactive=yes
ResultActive=yes
ConditionExecutable=/bin/influx_inspect
[Allow Influx Execution]
Identity=unix-user:*
Action=org.freedesktop.policykit.exec
ResultAny=yes
ResultInactive=yes
ResultActive=yes
ConditionExecutable=/usr/bin/influx
[Allow Influx Execution 2]
Identity=unix-user:*
Action=org.freedesktop.policykit.exec
ResultAny=yes
ResultInactive=yes
ResultActive=yes
ConditionExecutable=/bin/influx
[Allow Influxd Execution]
Identity=unix-user:*
Action=org.freedesktop.policykit.exec
ResultAny=yes
ResultInactive=yes
ResultActive=yes
ConditionExecutable=/usr/bin/influxd
[Allow Influxd Execution 2]
Identity=unix-user:*
Action=org.freedesktop.policykit.exec
ResultAny=yes
ResultInactive=yes
ResultActive=yes
ConditionExecutable=/bin/influxd

View File

@ -0,0 +1,27 @@
#!/bin/bash
# 指定要检查的服务名
SERVICE="opengauss.service"
RETRY_COUNT=3 # 最大尝试次数
SLEEP_TIME=3 # 每次检查间隔(秒)
for ((i=1; i<=RETRY_COUNT; i++)); do
sleep $SLEEP_TIME
status=$(systemctl is-active $SERVICE)
if [ "$status" == "active" ]; then
echo "$SERVICE 服务正在运行。"
exit 0 # 成功退出
else
echo "$i 次检查:$SERVICE 服务未运行,状态:$status"
if [ "$i" -lt "$RETRY_COUNT" ]; then
echo "等待 $SLEEP_TIME 秒后重试..."
sleep $SLEEP_TIME
fi
fi
done
echo "$SERVICE 服务未能成功启动,请检查日志!"
exit 1 # 失败退出

1
installer/customCmd.sh Normal file
View File

@ -0,0 +1 @@
ulimit -c unlimited

View File

@ -0,0 +1,402 @@
#!/bin/bash
#判断是否管理员权限
if [ $(id -u) -ne 0 ]; then
echo "ERROR:当前用户没有管理员权限,非管理员请用 sudo ./installer_linux.sh 命令执行"
exit
fi
#variable
#当前的安装包运行目录
initfile=$(dirname "$(dirname "$(readlink -f "$0")")")
#安装目录
INSTALL_DIR="/opt/EnergyHub"
#debug or release
SETUP_DEBUG_RELEASE=debug
#安装平台 centos 、openeuler
OS_DEFINE=""
#nginx 定制系统配置目录 以及服务名称
NGINX_CONFIGDIR=""
NGINX_SERVICE_NAME=""
#polkit 权限规则处理
polkit_rule_path=""
custom_rule_file=""
#系统设置开机执行文件路径
custom_cmd_file=""
#加载宏定义,用来判断平台
if [ -f "/etc/profile.d/iscs6000.sh" ]; then
source /etc/profile.d/iscs6000.sh
fi
if [ -f "/etc/profile.d/iscs6000env.sh" ]; then
source /etc/profile.d/iscs6000env.sh
fi
if [ -f "/etc/profile.d/rqeh6000.sh" ]; then
source /etc/profile.d/rqeh6000.sh
fi
if [ -f "/etc/profile.d/rqeh6000env.sh" ]; then
source /etc/profile.d/rqeh6000env.sh
fi
#variable
#script_path="$(cd "$(dirname "$0")" && pwd)"
script_path="${INSTALL_DIR}/installer"
echo "INFO:当前脚本执行目录: $script_path"
if [ -n "$RQEH6000_OS" ]; then
OS_DEFINE=$RQEH6000_OS
echo "INFO:安装操作系统平台:" $RQEH6000_OS
fi
if [ -n "$ISCS6000_OS" ]; then
OS_DEFINE=$ISCS6000_OS
echo "INFO:安装操作系统平台:" $ISCS6000_OS
fi
if [ ! -n "$OS_DEFINE" ]; then
echo "ERROR:没有找到操作系统平台定义"
exit 1
fi
echo "INFO:安装目录为: ${INSTALL_DIR} "
#判断原来目录下有文件,则删除
if [ -d "$INSTALL_DIR" ]; then
echo "WARNING:安装目录 $INSTALL_DIR 不为空!"
# 询问用户是否删除这些文件
read -p "INFO:是否删除这些文件或者取消安装?注意:安装前需要保证原系统停止运行!(y/c): " answer
case $answer in
[Yy]* )
rm -rf $INSTALL_DIR
;;
[Cc]* )
echo "INFO:安装操作已取消。"
exit 1
;;
* )
echo "INFO:无效的输入,安装操作已取消。"
exit 1
;;
esac
fi
mkdir $INSTALL_DIR
cp -r $initfile/* $INSTALL_DIR
#开启配置数据库服务
if [ "kylin10d" = "$OS_DEFINE" ]; then
echo "INFO:kylin need to select db-service"
valid_input=false
while [ "$valid_input" = false ]; do
echo "请选择数据库服务名:"
echo "1) kingbase"
echo "2) mariadb"
read -p "请输入数字选择(默认: 1: " choice
case "$choice" in
1 | "") # 输入 1 或直接回车
DB_SERVICE_NAME="kingbase"
valid_input=true
;;
2)
DB_SERVICE_NAME="mariadb"
valid_input=true
;;
*)
echo "无效选择,请重新输入!"
;;
esac
done
echo "INFO: 选择的数据库服务为 ${DB_SERVICE_NAME}"
if [ "kingbase" = "$DB_SERVICE_NAME" ]; then
if sudo systemctl is-active --quiet "$DB_SERVICE_NAME"; then
echo "INFO:${DB_SERVICE_NAME} 服务已开启。"
else
chmod +x /opt/Kingbase/ES/V8/Scripts/root.sh
/opt/Kingbase/ES/V8/Scripts/root.sh
echo "INFO:${DB_SERVICE_NAME} 服务已开启。"
fi
fi
if [ "mariadb" = "$DB_SERVICE_NAME" ]; then
if sudo systemctl is-active --quiet "$DB_SERVICE_NAME"; then
echo "INFO:${DB_SERVICE_NAME} 服务已开启。"
else
systemctl enable mariadb.service
systemctl start mariadb.service
echo "INFO:${DB_SERVICE_NAME} 服务已开启。"
fi
fi
elif [ "oe2203" = "$OS_DEFINE" ]; then
echo "INFO:openEuler need to select db-service"
valid_input=false
while [ "$valid_input" = false ]; do
echo "请选择数据库服务名:"
echo "1) opengauss"
echo "2) mysqld"
read -p "请输入数字选择(默认: 1: " choice
case "$choice" in
1 | "") # 输入 1 或直接回车
DB_SERVICE_NAME="opengauss"
valid_input=true
;;
2)
DB_SERVICE_NAME="mysql"
valid_input=true
;;
*)
echo "无效选择,请重新输入!"
;;
esac
done
echo "INFO: 选择的数据库服务为 ${DB_SERVICE_NAME}"
if [ "mysql" = "$DB_SERVICE_NAME" ]; then
if sudo systemctl is-active --quiet "$DB_SERVICE_NAME"; then
echo "INFO:${DB_SERVICE_NAME} 服务已开启。"
else
systemctl enable mysqld.service
systemctl start mysqld.service
echo "INFO:${DB_SERVICE_NAME} 服务已开启。"
fi
fi
if [ "opengauss" = "$DB_SERVICE_NAME" ]; then
if sudo systemctl is-active --quiet "$DB_SERVICE_NAME"; then
echo "INFO:${DB_SERVICE_NAME} 服务已开启。"
else
chown -R ${SUDO_USER}:${SUDO_USER} /usr/local/opengauss
chown -R ${SUDO_USER}:${SUDO_USER} /var/lib/opengauss
echo "INFO:opengauss dir owner has changed "
sed -i "s/^User=.*/User=$SUDO_USER/" /usr/lib/systemd/system/opengauss.service
systemctl daemon-reload
systemctl restart opengauss.service
systemctl enable opengauss.service
check_service_path=${script_path}/checkOpengauss.sh
chmod +x ${check_service_path}
${check_service_path}
if [ $? -eq 0 ]; then
echo "INFO:${DB_SERVICE_NAME} 服务已开启。"
else
echo "INFO:${DB_SERVICE_NAME} 服务开启失败。"
fi
fi
fi
else
echo "INFO:数据库使用mariadb服务"
DB_SERVICE_NAME="mariadb"
if sudo systemctl is-active --quiet "$DB_SERVICE_NAME"; then
echo "INFO:${DB_SERVICE_NAME} 服务已开启。"
else
systemctl enable mariadb.service
systemctl start mariadb.service
echo "INFO:${DB_SERVICE_NAME} 服务已开启。"
fi
fi
#开启历史数据库服务
HISDB_SERVICE_NAME="influxdb"
if sudo systemctl is-active --quiet "$HISDB_SERVICE_NAME"; then
echo "INFO:${HISDB_SERVICE_NAME} 服务已开启。"
else
systemctl enable influxdb
systemctl start influxdb
echo "INFO:${HISDB_SERVICE_NAME} 服务已开启。"
fi
#nginx配置文件以及polkit规则文件
if [ "oe2203" = "$OS_DEFINE" ] || [ "kylin10d" = "$OS_DEFINE" ]; then
#nginx 配置文件
NGINX_CONFIGDIR="/etc/nginx/nginx.conf"
NGINX_SERVICE_NAME="nginx"
echo "INFO:nginx配置文件"$NGINX_CONFIGDIR "服务名称" $NGINX_SERVICE_NAME
#polkit-auth
polkit_rule_path="/etc/polkit-1/rules.d"
custom_rule_file="51-custom-authentication.rules" #注意数字排序别被规则覆盖
if [ "kylin10d" = "$OS_DEFINE" ]; then
polkit_rule_path="/etc/polkit-1/localauthority/50-local.d"
custom_rule_file="allow-program-kylin.pkla"
fi
echo "INFO:polkit配置文件"$polkit_rule_path "自定义文件名称" $custom_rule_file
custom_rule_file_path=${script_path}/${custom_rule_file}
cp ${custom_rule_file_path} ${polkit_rule_path}/
chmod 644 ${polkit_rule_path}/${custom_rule_file}
systemctl restart polkit.service
echo "INFO:规则文件已拷贝并且polkit服务已重启"
#auth
chown ${SUDO_USER}:${SUDO_USER} ${INSTALL_DIR}
echo "INFO: change auth to user- ${SUDO_USER} dir-${INSTALL_DIR}"
else
NGINX_CONFIGDIR="/etc/opt/rh/rh-nginx116/nginx/nginx.conf"
NGINX_SERVICE_NAME="rh-nginx116-nginx"
echo "INFO:nginx配置文件"$NGINX_CONFIGDIR "服务名称" $NGINX_SERVICE_NAME
fi
#开启Nginx服务
nginx_path="${INSTALL_DIR}/nginx/nginx.conf"
if [ -e "$nginx_path" ]; then
echo "copy nginx config"
cp "$nginx_path" "$NGINX_CONFIGDIR"
rm "$nginx_path"
else
echo "cannot find nginx config in ${INSTALL_DIR}"
fi
ln -s "$NGINX_CONFIGDIR" "$nginx_path"
chmod -R 775 "$nginx_path"
if [ -L "$nginx_path" ]; then
echo "nginx symbolic link create success!"
else
echo "nginx symbolic link create failure!"
fi
if sudo systemctl is-active --quiet "$NGINX_SERVICE_NAME"; then
echo "INFO:${NGINX_SERVICE_NAME} 服务已开启。"
else
systemctl enable ${NGINX_SERVICE_NAME}
systemctl start ${NGINX_SERVICE_NAME}
echo "INFO:${NGINX_SERVICE_NAME} 服务已开启。"
fi
if [ -d "$(dirname "$script_path")/product/${OS_DEFINE}_debug/" ]; then
SETUP_DEBUG_RELEASE=debug
else
SETUP_DEBUG_RELEASE=release
fi
echo "INFO:安装版本:" $SETUP_DEBUG_RELEASE
export BIN_DIR_VER=${OS_DEFINE}_${SETUP_DEBUG_RELEASE}
#进行配置数据库初始化操作
$(dirname "$script_path")/product/$BIN_DIR_VER/db_installer
echo "INFO:开始进行附文件权限"
sh_path="$(dirname "$script_path")/product/$BIN_DIR_VER/"
sh_files=$(find "$sh_path" -maxdepth 1 -type f -name "*.sh")
#sh_files=$(find "$script_path" -maxdepth 1 -type f -name "*.sh")
if [ -n "$sh_files" ]; then
echo "INFO:找到以下 .sh 文件:"
echo "$sh_files"
echo "INFO:为这些文件添加执行权限..."
for file in $sh_files; do
chmod +x "$file"
done
fi
app_name="EnergyHub"
exec_command="$(dirname "$script_path")/product/$BIN_DIR_VER/workBench"
# 创建.desktop文件
sudo -k
DESKTOP_DIR=/root/桌面
if [ -n "$SUDO_USER" ]; then
DESKTOP_DIR=/home/$SUDO_USER/桌面
fi
if [ ! -d "${DESKTOP_DIR}" ]; then
echo "ERROR:目录不存在:${DESKTOP_DIR}"
exit
fi
echo "INFO:start-创建快捷方式成功"
cat > ${DESKTOP_DIR}/$app_name.desktop <<EOL
[Desktop Entry]
Name=$app_name
Exec=$exec_command
Type=Application
Terminal=false
Icon=$(dirname "$script_path")/installer/rqeh6000.ico
StartupNotify=true
EOL
echo "INFO:end-创建EMS.desktop快捷方式成功"
#赋权限
#net Permission
echo 'net.ipv4.ping_group_range = 0 2147483647' > /etc/sysctl.d/z5-ping.conf
sysctl -p /etc/sysctl.d/z5-ping.conf
# 赋予.desktop文件执行权限
chmod u+x ${DESKTOP_DIR}/$app_name.desktop
if [ -n "$SUDO_USER" ]; then
chown $SUDO_USER ${DESKTOP_DIR}/$app_name.desktop
chown -R $SUDO_USER ${INSTALL_DIR}/*
fi
cp ${DESKTOP_DIR}/$app_name.desktop /usr/share/applications/
#net_keepalived config
config_keepalived_cmd="$(dirname "$script_path")/platform/$BIN_DIR_VER/net_keepalived"
KEEPALIVE_SERVICE_NAME="net_keepalived"
if sudo systemctl is-active --quiet "$KEEPALIVE_SERVICE_NAME"; then
systemctl stop net_keepalived
systemctl disable net_keepalived
fi
$config_keepalived_cmd -r
if [ $? -ne 0 ]; then
echo "WARNING: Command '$config_keepalived_cmd -r' failed."
fi
systemctl start net_keepalived
systemctl enable net_keepalived
if sudo systemctl is-active --quiet "$KEEPALIVE_SERVICE_NAME"; then
echo "INFO:${KEEPALIVE_SERVICE_NAME} 服务已开启。"
else
echo "INFO:${KEEPALIVE_SERVICE_NAME} 服务开启失败。"
fi
INFLUXD_PROGRAM_PATH=$(which influxd)
ln -sf "${INFLUXD_PROGRAM_PATH}" "${INSTALL_DIR}/product/$BIN_DIR_VER/"
if [ "oe2203" = "$OS_DEFINE" ]; then
# 设置core_pattern
echo '/corefiles/core-%e-%p-%s-%t' >/proc/sys/kernel/core_pattern
# 检查操作是否成功
if [ $? -eq 0 ]; then
echo "core_pattern has been set successfully."
else
echo "Failed to set core_pattern."
fi
fi
if [ "kylin10d" = "$OS_DEFINE" ]; then
profile_path="/etc/profile.d"
custom_cmd_file="customCmd.sh"
cp ${custom_cmd_file} ${profile_path}/
chmod +x ${profile_path}/${custom_cmd_file}
echo "**********************"
echo "由于更改了系统设置,需要重启电脑或者注销用户然后重新登录才能生效!!!!!"
echo "**********************"
fi
echo "INFO安装成功$app_name"

View File

@ -0,0 +1,12 @@
::需要管理员权限执行
::start server
echo %CD%
set "INSTALLPATH=%cd%"
cd %INSTALLPATH%\..\database\mysql\
call Install.bat
cd %INSTALLPATH%\..\database\InfluxDB\
call InstallService.bat
set INFLUXDB_PATH= %INSTALLPATH%\..\database\InfluxDB
%INFLUXDB_PATH%\influx.exe -host localhost -port 8086 -database rqeh6000 -execute "create user rqeh6000 with password 'relyez@2019' with all privileges"

9
installer/readme.txt Normal file
View File

@ -0,0 +1,9 @@
window环境下的安装卸载脚本StartService.bat 和 StopService.bat
非window环境下的安装卸载脚本installer_linux.sh 和uninst_linux.sh
在麒麟环境下自动切换数据库服务脚本switch_dataBase_kylin.sh
在麒麟环境下由于定制化的操作系统中polkit版本较低只支持 .plka文件机制管理权限而非js的规则文件allow-program-kylin.pkla
针对欧拉以非root权限登入polkit .js的规则文档51-custom-authentication.rules

View File

@ -0,0 +1,32 @@
@echo off
setlocal
REM 获取脚本所在目录
set "scriptPath=%~dp0"
REM 返回到上一级目录
for %%i in ("%scriptPath:~0,-1%") do set "parentDir=%%~dpi"
REM 定义软件路径
set "softwarePath=%parentDir%"
REM 定义注册表项路径
set "REG_PATH=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\EnergyHub"
REM 删除现有的注册表项(如果存在)
reg query "%REG_PATH%" >nul 2>&1
if %errorlevel%==0 (
echo 删除现有的注册表项...
reg delete "%REG_PATH%" /f
)
REM 添加注册表项和值
reg add "%REG_PATH%" /v DisplayName /t REG_SZ /d "EnergyHub" /f
reg add "%REG_PATH%" /v UninstallString /t REG_SZ /d "%softwarePath%\uninst.exe" /f
reg add "%REG_PATH%" /v DisplayIcon /t REG_SZ /d "%scriptPath%\rqeh6000.ico" /f
reg add "%REG_PATH%" /v DisplayVersion /t REG_SZ /d "1.0.0" /f
reg add "%REG_PATH%" /v Publisher /t REG_SZ /d "RelyEZ" /f
::reg add "%REG_PATH%" /v InstallLocation /t REG_SZ /d "%softwarePath%" /f
echo 注册表项已添加
endlocal

BIN
installer/rqeh6000.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -0,0 +1,127 @@
#!/bin/bash
#stop server
if [ $(id -u) -ne 0 ]; then
echo "ERROR:当前用户没有管理员权限,非管理员请用 sudo ./installer_linux.sh 命令执行"
exit
fi
#加载宏定义,用来判断平台
for file in "/etc/profile.d/iscs6000.sh" \
"/etc/profile.d/iscs6000env.sh" \
"/etc/profile.d/rqeh6000.sh" \
"/etc/profile.d/rqeh6000env.sh"; do
[ -f "$file" ] && source "$file"
done
#安装平台 centos 、openeuler
OS_DEFINE="${RQEH6000_OS:-$ISCS6000_OS}"
if [ -n "$OS_DEFINE" ]; then
echo "INFO:安装操作系统平台:$OS_DEFINE"
fi
#当前的安装包运行目录
initfile=$(dirname "$(dirname "$(readlink -f "$0")")")
#安装目录
INSTALL_DIR="/opt/EnergyHub"
#debug or release
SETUP_DEBUG_RELEASE=debug
#开启服务
function start_service() {
local service_name=$1
if sudo systemctl is-active --quiet "$service_name"; then
echo "INFO:$service_name 服务已开启。"
else
if [ "kingbase" = "$service_name" ]; then
chmod +x /opt/Kingbase/ES/V8/Scripts/root.sh
/opt/Kingbase/ES/V8/Scripts/root.sh
else
sudo systemctl enable "$service_name"
sudo systemctl start "$service_name"
fi
echo "INFO:$service_name 服务已开启。"
fi
}
#关闭服务
function stop_service() {
local service_name=$1
if sudo systemctl is-active --quiet "$service_name"; then
sudo systemctl stop "$service_name"
sudo systemctl disable "$service_name"
echo "INFO:$service_name 服务已关闭。"
else
echo "INFO:$service_name 服务已关闭。"
fi
}
#开启配置数据库服务
if [ "kylin10d" = "$OS_DEFINE" ]; then
echo "INFO:kylin need to select db-service"
valid_input=false
while [ "$valid_input" = false ]; do
echo "请选择切换的数据库服务名:"
echo "1) kingbase"
echo "2) mariadb"
echo "3) 两者都开启"
read -p "请输入数字选择(默认: 1: " choice
case "$choice" in
1 | "") # 输入 1 或直接回车
DB_SERVICE_NAME="kingbase"
valid_input=true
;;
2)
DB_SERVICE_NAME="mariadb"
valid_input=true
;;
3)
DB_SERVICE_NAME="Both"
valid_input=true
;;
*)
echo "无效选择,请重新输入!"
;;
esac
done
echo "INFO: 选择的数据库服务为 ${DB_SERVICE_NAME}"
case "$DB_SERVICE_NAME" in
"kingbase")
start_service "kingbase"
stop_service "mariadb"
;;
"mariadb")
start_service "mariadb"
stop_service "kingbase"
;;
"Both")
start_service "mariadb"
start_service "kingbase"
;;
esac
fi
#variable
#script_path="$(cd "$(dirname "$0")" && pwd)"
script_path="${INSTALL_DIR}/installer"
echo "INFO:当前脚本执行目录: $script_path"
if [ -d "$(dirname "$script_path")/product/${OS_DEFINE}_debug/" ]; then
SETUP_DEBUG_RELEASE=debug
else
SETUP_DEBUG_RELEASE=release
fi
echo "INFO:安装版本:" $SETUP_DEBUG_RELEASE
export BIN_DIR_VER=${OS_DEFINE}_${SETUP_DEBUG_RELEASE}
#进行配置数据库初始化操作
$(dirname "$script_path")/product/$BIN_DIR_VER/db_installer
echo "INFO: 切换完成。"

68
installer/uninst_linux.sh Normal file
View File

@ -0,0 +1,68 @@
#!/bin/bash
#stop server
if [ $(id -u) -ne 0 ]; then
echo "ERROR:当前用户没有管理员权限,非管理员请用 sudo ./installer_linux.sh 命令执行"
exit
fi
#加载宏定义,用来判断平台
if [ -f "/etc/profile.d/iscs6000.sh" ]; then
source /etc/profile.d/iscs6000.sh
fi
if [ -f "/etc/profile.d/iscs6000env.sh" ]; then
source /etc/profile.d/iscs6000env.sh
fi
if [ -f "/etc/profile.d/rqeh6000.sh" ]; then
source /etc/profile.d/rqeh6000.sh
fi
if [ -f "/etc/profile.d/rqeh6000env.sh" ]; then
source /etc/profile.d/rqeh6000env.sh
fi
#安装平台 centos 、openeuler
OS_DEFINE=""
#nginx 定制系统配置目录 以及服务名称
NGINX_CONFIGDIR=""
NGINX_SERVICE_NAME=""
if [ -n "$RQEH6000_OS" ]; then
OS_DEFINE=$RQEH6000_OS
echo "INFO:安装操作系统平台:" $RQEH6000_OS
fi
if [ -n "$ISCS6000_OS" ]; then
OS_DEFINE=$ISCS6000_OS
echo "INFO:安装操作系统平台:" $ISCS6000_OS
fi
if [ "oe2203" = "$OS_DEFINE" ] || [ "kylin10d" = "$OS_DEFINE" ]; then
NGINX_CONFIGDIR="/etc/nginx/nginx.conf"
NGINX_SERVICE_NAME="nginx"
echo "INFO:nginx配置文件"$NGINX_CONFIGDIR "服务名称" $NGINX_SERVICE_NAME
else
NGINX_CONFIGDIR="/etc/opt/rh/rh-nginx116/nginx/nginx.conf"
NGINX_SERVICE_NAME="rh-nginx116-nginx"
echo "INFO:nginx配置文件"$NGINX_CONFIGDIR "服务名称" $NGINX_SERVICE_NAME
fi
systemctl stop mariadb.service
systemctl disable mariadb.service
systemctl stop influxdb
systemctl disable influxdb
systemctl stop ${NGINX_SERVICE_NAME}
systemctl disable ${NGINX_SERVICE_NAME}
systemctl stop kingbase
systemctl disable kingbase
systemctl stop net_keepalived
systemctl disable net_keepalived
if [ "oe2203" = "$OS_DEFINE" ]; then
systemctl stop opengauss
systemctl disable opengauss
fi
if [ -L "$NGINX_CONFIGDIR" ]; then
sudo rm -f "$NGINX_CONFIGDIR"
echo "Symbolic link $NGINX_CONFIGDIR remove"
fi

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,48 @@
DROP TABLE IF EXISTS his_event;
create table his_event (
UUID_BASE64 char(23) NOT NULL,
ALM_TYPE INT NOT NULL,
ALM_STATUS INT NOT NULL ,
ALM_STYLE INT DEFAULT 2 NOT NULL,
TIME_STAMP BIGINT NOT NULL,
LOCATION_ID INT NOT NULL,
CONTENT VARCHAR(255) NOT NULL,
PRIORITY INT NOT NULL,
SUB_SYSTEM INT NULL,
DEV_TYPE INT NULL ,
REGION_ID INT DEFAULT -1,
DEV_GROUP_TAG VARCHAR(64) NULL,
KEY_ID_TAG VARCHAR(128) NULL ,
CONFIRM_TIME BIGINT NULL ,
CONFIRM_USER_ID INT NULL ,
CONFIRM_NODE_NAME VARCHAR(32) NULL ,
WAVE_FILE varchar(512) NULL ,
IA_UUID char(23) NULL,
PRIMARY KEY (TIME_STAMP,UUID_BASE64)
);
create index on his_event(UUID_BASE64 COLLATE "C");
create index on his_event(IA_UUID COLLATE "C");
create index on his_event(ALM_TYPE);
create index on his_event(ALM_STATUS);
create index on his_event(ALM_STYLE);
create index on his_event(LOCATION_ID);
create index on his_event(SUB_SYSTEM);
create index on his_event(DEV_TYPE);
create index on his_event(REGION_ID);
create index on his_event(DEV_GROUP_TAG);
-----------------
DROP TABLE IF EXISTS his_intelli_alm;
create table his_intelli_alm (
UUID_BASE64 char(23) NOT NULL,
TIME_STAMP BIGINT NOT NULL ,
PRIORITY INT NOT NULL ,
CONTENT VARCHAR(255) NOT NULL ,
MAIN_ALM_UUID CHAR(23) NULL ,
PRIMARY KEY (TIME_STAMP,UUID_BASE64)
);
create index on his_intelli_alm(UUID_BASE64 COLLATE "C");
create index on his_intelli_alm(MAIN_ALM_UUID COLLATE "C");
create index on his_intelli_alm(PRIORITY);

View File

@ -0,0 +1,303 @@
-- 消耗180~210秒 大概4分钟之内
-- 该脚本与数据库名无关
SET FOREIGN_KEY_CHECKS=0;
drop procedure if exists initial_partition;
delimiter ;;
create procedure initial_partition(
p_table varchar(64), -- 表名
partition_start_date varchar(64), -- 开始日期 格式2018年01月01日 输入 字符串 "20180101"
partition_to_add int, -- 需要添加分区的数量
partition_interval_days int, -- 分区时间间隔
p_comment varchar(21800) -- 表的备注,使用实例参照下方调用脚本
)
LANGUAGE SQL
NOT DETERMINISTIC
SQL SECURITY INVOKER
begin
-- 丢弃表定义
SET @table = p_table;
set @comment = p_comment;
select CONCAT('DROP TABLE IF EXISTS ',@table) into @query;
PREPARE st from @query;
EXECUTE st;
deallocate PREPARE st;
-- 创建表头结构
select concat('create table ',@table, '
(`UUID_BASE64` char(23) COLLATE utf8_bin NOT NULL COMMENT '''',
`ALM_TYPE` INT NOT NULL COMMENT '''',
`ALM_STATUS` INT NOT NULL COMMENT '''',
`ALM_STYLE` INT DEFAULT 2 NOT NULL COMMENT ''0123'',
`TIME_STAMP` BIGINT NOT NULL COMMENT ''RFC1305POSIX时标标准'',
`LOCATION_ID` INT NOT NULL COMMENT ''ID'',
`CONTENT` VARCHAR(255) NOT NULL COMMENT ''Content作为PKMySQL 5.6767utf8编码是就是不能大于767/3255Content长度统一为255'',
`PRIORITY` INT NOT NULL COMMENT '''',
`SUB_SYSTEM` INT NULL COMMENT ''ID'',
`DEV_TYPE` INT NULL COMMENT ''ID'',
`REGION_ID` INT DEFAULT -1 COMMENT ''ID'',
`DEV_GROUP_TAG` VARCHAR(64) NULL COMMENT '''',
`KEY_ID_TAG` VARCHAR(128) NULL COMMENT '''',
`CONFIRM_TIME` BIGINT NULL COMMENT '''',
`CONFIRM_USER_ID` INT NULL COMMENT '''',
`CONFIRM_NODE_NAME` VARCHAR(32) NULL COMMENT '''',
`WAVE_FILE` varchar(512) NULL COMMENT '''',
`IA_UUID` char(23) COLLATE utf8_bin NULL COMMENT ''HIS_INTELLI_ALM表的UUID_BASE64'',
CONSTRAINT `PK` PRIMARY KEY (`TIME_STAMP` ASC,`UUID_BASE64` ASC)
COMMENT ''''
)
ENGINE=MyISAM
COMMENT = '' ',@comment
,
' ''
partition by range (TIME_STAMP)
(') into @query;
-- 添加p_first分区
-- 获取当前p_fisrt日期
set @cur_date = partition_start_date;
SET @q = 'SELECT DATE_SUB(?, INTERVAL 0 DAY) INTO @p_first_dp';
PREPARE st FROM @q;
EXECUTE st USING @cur_date;
DEALLOCATE PREPARE st;
-- 获得unix时间戳@p_first_dp
SET @q = 'SELECT UNIX_TIMESTAMP(@p_first_dp)*1000 INTO @p_first_dp';
PREPARE st FROM @q;
EXECUTE st ;
DEALLOCATE PREPARE st;
-- 添加p_first分区到@query中
select concat(@query,'partition p_first values less than (',@p_first_dp,'),\n') into @query;
-- 添加距现在一千个分区
SET @partition_added = 0;
SET @date = partition_start_date;
set @partition_need_to_add = partition_to_add;
set @partition_duration = partition_interval_days;
while @partition_added < @partition_need_to_add DO
-- 计算将要添加分区的分区名
SET @q = 'SELECT DATE_ADD(?, INTERVAL ? day) INTO @date';
PREPARE st FROM @q;
EXECUTE st using @date,@partition_duration;
DEALLOCATE PREPARE st;
-- 格式化日期yyyymmdd
SET @q = 'SELECT DATE_FORMAT(@date, ''%Y%m%d'') INTO @formatted_date';
PREPARE st FROM @q;
EXECUTE st;
DEALLOCATE PREPARE st;
-- 格式化,加上分区名
SET @q = 'SELECT CONCAT(''p'', @formatted_date) INTO @partition_name';
PREPARE st FROM @q;
EXECUTE st;
DEALLOCATE PREPARE st;
-- 计算将要添加分区的分区描述
SET @q = 'SELECT UNIX_TIMESTAMP(?)*1000 INTO @partition_end_ts;';
PREPARE st FROM @q;
EXECUTE st using @date;
DEALLOCATE PREPARE st;
-- 添加分区到@query中
select concat(@query,'partition ',@partition_name,' values less than (',@partition_end_ts,'),\n') into @query;
SET @partition_added = @partition_added + 1;
END while;
-- 添加p_future分区
select concat(@query,'PARTITION p_future VALUES LESS THAN MAXVALUE)') INTO @query;
select @query;
-- -- debug 展示@query
-- select @query;
-- 执行@query
PREPARE st FROM @query;
EXECUTE st;
DEALLOCATE PREPARE st;
end;;
delimiter ;
call initial_partition('HIS_EVENT',curdate(),360,5,'历史事件表');
-- 创建索引
ALTER TABLE `HIS_EVENT`
ADD INDEX `ALM_TYPE` (`ALM_TYPE` ASC)
;
ALTER TABLE `HIS_EVENT`
ADD INDEX `ALM_STATUS` (`ALM_STATUS` ASC)
;
ALTER TABLE `HIS_EVENT`
ADD INDEX `ALM_STYLE` (`ALM_STYLE` ASC)
;
ALTER TABLE `HIS_EVENT`
ADD INDEX `LOCATION_ID` (`LOCATION_ID` ASC)
;
ALTER TABLE `HIS_EVENT`
ADD INDEX `PRIORITY` (`PRIORITY` ASC)
;
ALTER TABLE `HIS_EVENT`
ADD INDEX `SUB_SYSTEM` (`SUB_SYSTEM` ASC)
;
ALTER TABLE `HIS_EVENT`
ADD INDEX `DEV_TYPE` (`DEV_TYPE` ASC)
;
ALTER TABLE `HIS_EVENT`
ADD INDEX `REGION_ID` (`REGION_ID` ASC)
;
ALTER TABLE `HIS_EVENT`
ADD INDEX `DEV_GROUP_TAG` (`DEV_GROUP_TAG` ASC)
;
ALTER TABLE `HIS_EVENT`
ADD INDEX `IA_UUID` (`IA_UUID` ASC)
;
ALTER TABLE `HIS_EVENT`
ADD INDEX `UUID_BASE64` (`UUID_BASE64` ASC)
;
drop procedure if exists initial_partition_intelli;
delimiter ;;
create procedure initial_partition_intelli(
p_table varchar(64), -- 表名
partition_start_date varchar(64), -- 开始日期 格式2018年01月01日 输入 字符串 "20180101"
partition_to_add int, -- 需要添加分区的数量
partition_interval_days int, -- 分区时间间隔
p_comment varchar(21800) -- 表的备注,使用实例参照下方调用脚本
)
LANGUAGE SQL
NOT DETERMINISTIC
SQL SECURITY INVOKER
begin
-- 丢弃表定义
SET @table = p_table;
set @comment = p_comment;
select CONCAT('DROP TABLE IF EXISTS ',@table) into @query;
PREPARE st from @query;
EXECUTE st;
deallocate PREPARE st;
-- 创建表头结构
select concat('create table ',@table,'
(`UUID_BASE64` char(23) COLLATE utf8_bin NOT NULL COMMENT '''',
`TIME_STAMP` BIGINT NOT NULL COMMENT ''RFC1305POSIX时标标准'',
`PRIORITY` INT NOT NULL COMMENT '''',
`CONTENT` VARCHAR(255) NOT NULL COMMENT ''Content作为PKMySQL 5.6767utf8编码是就是不能大于767/3255Content长度统一为255'',
`MAIN_ALM_UUID` CHAR(23) COLLATE utf8_bin NULL COMMENT ''UUIDHIS_EVENT表的UUID_BASE64'',
CONSTRAINT `PK` PRIMARY KEY (`TIME_STAMP` ASC,`UUID_BASE64` ASC)
COMMENT ''''
)
ENGINE=MyISAM
COMMENT = '' ',@comment
,
' ''
partition by range (TIME_STAMP)
(') into @query;
-- 添加p_first分区
-- 获取当前p_fisrt日期
set @cur_date = partition_start_date;
SET @q = 'SELECT DATE_SUB(?, INTERVAL 0 DAY) INTO @p_first_dp';
PREPARE st FROM @q;
EXECUTE st USING @cur_date;
DEALLOCATE PREPARE st;
-- 获得unix时间戳@p_first_dp
SET @q = 'SELECT UNIX_TIMESTAMP(@p_first_dp)*1000 INTO @p_first_dp';
PREPARE st FROM @q;
EXECUTE st ;
DEALLOCATE PREPARE st;
-- 添加p_first分区到@query中
select concat(@query,'partition p_first values less than (',@p_first_dp,'),\n') into @query;
-- 添加距现在一千个分区
SET @partition_added = 0;
SET @date = partition_start_date;
set @partition_need_to_add = partition_to_add;
set @partition_duration = partition_interval_days;
while @partition_added < @partition_need_to_add DO
-- 计算将要添加分区的分区名
SET @q = 'SELECT DATE_ADD(?, INTERVAL ? day) INTO @date';
PREPARE st FROM @q;
EXECUTE st using @date,@partition_duration;
DEALLOCATE PREPARE st;
-- 格式化日期yyyymmdd
SET @q = 'SELECT DATE_FORMAT(@date, ''%Y%m%d'') INTO @formatted_date';
PREPARE st FROM @q;
EXECUTE st;
DEALLOCATE PREPARE st;
-- 格式化,加上分区名
SET @q = 'SELECT CONCAT(''p'', @formatted_date) INTO @partition_name';
PREPARE st FROM @q;
EXECUTE st;
DEALLOCATE PREPARE st;
-- 计算将要添加分区的分区描述
SET @q = 'SELECT UNIX_TIMESTAMP(?)*1000 INTO @partition_end_ts;';
PREPARE st FROM @q;
EXECUTE st using @date;
DEALLOCATE PREPARE st;
-- 添加分区到@query中
select concat(@query,'partition ',@partition_name,' values less than (',@partition_end_ts,'),\n') into @query;
SET @partition_added = @partition_added + 1;
END while;
-- 添加p_future分区
select concat(@query,'PARTITION p_future VALUES LESS THAN MAXVALUE)') INTO @query;
select @query;
-- -- debug 展示@query
-- select @query;
-- 执行@query
PREPARE st FROM @query;
EXECUTE st;
DEALLOCATE PREPARE st;
end;;
delimiter ;
call initial_partition_intelli('HIS_INTELLI_ALM',curdate(),60,30,'存储智能告警历史');
-- 创建索引
ALTER TABLE `HIS_INTELLI_ALM`
ADD INDEX `PRIORITY` (`PRIORITY` ASC)
;
ALTER TABLE `HIS_INTELLI_ALM`
ADD INDEX `UUID_BASE64` (`UUID_BASE64` ASC)
;
SET FOREIGN_KEY_CHECKS=1;

View File

@ -0,0 +1,48 @@
DROP TABLE IF EXISTS his_event;
create table his_event (
UUID_BASE64 char(23) NOT NULL,
ALM_TYPE INT NOT NULL,
ALM_STATUS INT NOT NULL ,
ALM_STYLE INT DEFAULT 2 NOT NULL,
TIME_STAMP BIGINT NOT NULL,
LOCATION_ID INT NOT NULL,
CONTENT VARCHAR(255) NOT NULL,
PRIORITY INT NOT NULL,
SUB_SYSTEM INT NULL,
DEV_TYPE INT NULL ,
REGION_ID INT DEFAULT -1,
DEV_GROUP_TAG VARCHAR(64) NULL,
KEY_ID_TAG VARCHAR(128) NULL ,
CONFIRM_TIME BIGINT NULL ,
CONFIRM_USER_ID INT NULL ,
CONFIRM_NODE_NAME VARCHAR(32) NULL ,
WAVE_FILE varchar(512) NULL ,
IA_UUID char(23) NULL,
PRIMARY KEY (TIME_STAMP,UUID_BASE64)
);
create index on his_event(UUID_BASE64 COLLATE "C");
create index on his_event(IA_UUID COLLATE "C");
create index on his_event(ALM_TYPE);
create index on his_event(ALM_STATUS);
create index on his_event(ALM_STYLE);
create index on his_event(LOCATION_ID);
create index on his_event(SUB_SYSTEM);
create index on his_event(DEV_TYPE);
create index on his_event(REGION_ID);
create index on his_event(DEV_GROUP_TAG);
-----------------
DROP TABLE IF EXISTS HIS_INTELLI_ALM;
create table HIS_INTELLI_ALM (
UUID_BASE64 char(23) NOT NULL,
TIME_STAMP BIGINT NOT NULL ,
PRIORITY INT NOT NULL ,
CONTENT VARCHAR(255) NOT NULL ,
MAIN_ALM_UUID CHAR(23) NULL ,
PRIMARY KEY (TIME_STAMP,UUID_BASE64)
);
create index on HIS_INTELLI_ALM(UUID_BASE64 COLLATE "C");
create index on HIS_INTELLI_ALM(MAIN_ALM_UUID COLLATE "C");
create index on HIS_INTELLI_ALM(PRIORITY);

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,51 @@
msgid ""
msgstr ""
"Project-Id-Version: app_bio_identify_srv\n"
"POT-Creation-Date: 2020-09-07 17:03+0800\n"
"PO-Revision-Date: 2020-09-07 17:03+0800\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: en\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.4.1\n"
"X-Poedit-Basepath: ../../../../../src/application/app_bio_identify/"
"app_bio_identify_srv\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-Flags-xgettext: --add-comments\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-KeywordsList: I18N;I18N_C\n"
"X-Poedit-SearchPath-0: .\n"
#: CAcsDevice.cpp:116
msgid "设备未连接,请检查设备是否在线!"
msgstr "The device is not connected, please check that the device is online!"
#: CAcsDevice.cpp:130
msgid "启用设备成功,请在设备上认证!"
msgstr "Enabling the device was successful, please certify on the device!"
#: CAcsDevice.cpp:142
msgid "启用设备失败,请检查设备是否在线!"
msgstr "Failed to enable the device, check that the device is online!"
#: CAcsDevice.cpp:153
msgid "设备被占用,请稍后再试!"
msgstr "The device is occupied, please try again later!"
#: CAcsDevice.cpp:158
msgid "未知错误!"
msgstr "Unknown error!"
#: CAcsDevice.cpp:279
msgid "认证超时。"
msgstr "Certification timed out."
#: CBioIdentifySrv.cpp:81
#, c-format
msgid ""
"I18N output test\n"
" This is src hardcode. \n"
" int = [%d] , str = [%s]\n"
msgstr ""

View File

@ -0,0 +1,44 @@
msgid ""
msgstr ""
"Project-Id-Version: app_fbd\n"
"POT-Creation-Date: 2021-01-11 17:55+0800\n"
"PO-Revision-Date: 2021-01-11 17:55+0800\n"
"Last-Translator: \n"
"Language-Team: kbdct\n"
"Language: en\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.0.6\n"
"X-Poedit-Basepath: ../../../../../src/application/app_fbd\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-KeywordsList: I18N;I18N_C\n"
"X-Poedit-SearchPath-0: .\n"
#: app_fbd_server/FbdGroupMng.cpp:256
msgid "创建FBD组[%1%]线程失败,请检查配置"
msgstr "Failed to create thread for FBD group: [%1%], please check the configuration"
#: app_fbd_server/FbdGroupMng.cpp:289
msgid "重新设置内存中FBD组[%1%]数据失败"
msgstr "Failed to reset data of FBD group in memory: [%1%]"
#: app_fbd_server/FbdGroupMng.cpp:345
msgid "删除内存中FBD组[%1%]数据失败"
msgstr "Failed to delete data of FBD group in memory: [%1%]"
#: app_fbd_server/FbdServerApp.cpp:290
#, c-format
#| msgid ""
#| "I18N 测试:\n"
#| " This is src hardcode. \n"
#| " int = [%d] , str = [%s]\n"
msgid ""
"I18N test\n"
" This is src hardcode. \n"
" int = [%d] , str = [%s]\n"
msgstr ""
"I18N test\n"
" This is src hardcode. \n"
" int = [%d] , str = [%s]\n"

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 438 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 326 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 395 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 454 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 471 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 294 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 499 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 796 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 849 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 328 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 457 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 447 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 337 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 548 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 426 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 307 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 418 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 B

Some files were not shown because too many files have changed in this diff Show More