Explorar el Código

#IQRV #comment 恢复启动脚本的调用

80374374 hace 1 año
padre
commit
1c598519b3

+ 1 - 2
CMakeLists.txt

@@ -726,8 +726,7 @@ if(MSVC)
 	file(GLOB VENDOR_ROOT_CONFIG_FILES "${CMAKE_SOURCE_DIR}/addin/hardwarecfg/WIN/root*.ini")
 	install(FILES ${VENDOR_ROOT_CONFIG_FILES} DESTINATION "${PACK_INSTALL_RUN_DIR}/hardwarecfg" COMPONENT scripts)
 else(MSVC)
-	file(GLOB BAT_SCRIPTS "${CMAKE_SOURCE_DIR}/addin/startup_scripts/sudo_*.sh")
-	install(PROGRAMS ${BAT_SCRIPTS} DESTINATION "${RVC_BASE_PATH}" COMPONENT scripts)
+	install(PROGRAMS "${CMAKE_SOURCE_DIR}/addin/startup_scripts/spexplorer.sh" DESTINATION "${RVC_BASE_PATH}" COMPONENT scripts)
 	if(NOT DEVOPS_ON_CMAKE_PRD)
 		install(PROGRAMS "${CMAKE_SOURCE_DIR}/addin/packaging/UOS/kill.sh" DESTINATION ${RVC_BASE_PATH} COMPONENT scripts)
 	endif(NOT DEVOPS_ON_CMAKE_PRD)

+ 1 - 1
Framework/spshell/Widgets/mainwindow.cpp

@@ -48,7 +48,7 @@
 #define FRAMEWORK_STATE_RECOVING 9
 #define FRAMEWORK_STATE_NOTDISTURB 10
 
-#define STARTUP_SCRIPT "sudo_spexplorer.sh"
+#define STARTUP_SCRIPT "spexplorer.sh"
 
 #ifdef DEVOPS_ON_ST /*DevOps流水线编译,ST环境*/
 #define RVC_TITLE_STRING "RVC Terminal Application STver."

+ 1 - 1
Framework/spshell/Widgets/res/spexplorerauto.desktop

@@ -5,5 +5,5 @@ GenericName=RVC Terminal Application
 GenericName[zh_CN]=招行可视柜台终端应用程序
 Comment=RVC Terminal Application
 Comment[zh_CN]=招行可视柜台终端应用
-Exec=/opt/Run/version/sudo_spexplorer.sh
+Exec=/opt/Run/version/spexplorer.sh
 Type=Application

+ 1 - 1
Framework/spshell/svc.cpp

@@ -203,7 +203,7 @@ static int KickoffSpRestartInner(int options)
 		tk_process_option_t option;
 		char app[MAX_PATH] = { '\0' };
 		char shell_scripts[MAX_PATH] = { '\0' };
-		sprintf(shell_scripts, "%s/%s", env->dir->root_ver_path, "sudo_spexplorer.sh");
+		sprintf(shell_scripts, "%s/%s", env->dir->root_ver_path, "spexplorer.sh");
 		if (options == RESTART_FRAMEWORK) {
 			if (env && env->cfg && env->cfg->args && env->cfg->args->arguments) {
 				sprintf(app, "%s %s -Rwait", shell_scripts, env->cfg->args->arguments);

+ 3 - 3
Tool/guardian/guardian.cpp

@@ -554,7 +554,7 @@ int FrameworkShutdown(bool bUpgrade=false,bool bRestart = true)
 			toResetCWD = true;
 		}
 
-		strcat(tmp, "sudo_spexplorer.sh  --restart");
+		strcat(tmp, "spexplorer.sh  --restart");
 		LOG4VTM(DEBUG, tmp);
         tk_process_t* process = NULL;
         tk_process_option_t option;
@@ -565,7 +565,7 @@ int FrameworkShutdown(bool bUpgrade=false,bool bRestart = true)
 
         if (0 == process_spawn(&option, &process)) {
             FREE(process);
-			LOG4VTM(INFO, "run sudo_spexplorer.sh scripts succ.");
+			LOG4VTM(INFO, "run spexplorer.sh scripts succ.");
 			Sleep(1000);
 			g_SpShellPID = GetSpshellProcID();
 			LOG4VTM(INFO, "get spshell proc id: " << g_SpShellPID);
@@ -575,7 +575,7 @@ int FrameworkShutdown(bool bUpgrade=false,bool bRestart = true)
             return 0;
 		} else {
 			FREE(process);
-			LOG4VTM(ERROR, "run sudo_spexplorer.sh scripts failed!");
+			LOG4VTM(ERROR, "run spexplorer.sh scripts failed!");
 
             if (toResetCWD) {
                 SetCurrentDirectoryA(path);

BIN
addin/assets/VTM.ico


+ 1 - 1
addin/packaging/DEBIAN/postinst

@@ -161,7 +161,7 @@ if [ "$1" = "configure" ]; then
     chmod 777 -R ${rvc_install_path_rvc_dir}
     chmod 777 -R ${rvc_install_path_hardware_dir}
     chmod 777 ${rvc_install_path_versions_dir}/spexplorer.sh > /dev/null 2>&1
-    chmod 777 ${rvc_install_path_versions_dir}/sudo_spexplorer.sh
+    chmod 777 ${rvc_install_path_versions_dir}/sudo_spexplorer.sh > /dev/null 2>&1
     chmod a+rw ${rvc_install_path_versions_dir}/active.txt
     echo "[INFO]: change the run scripts priviledge done!"
 

+ 1 - 1
addin/packaging/DEBIAN/spexplorerauto.desktop

@@ -5,7 +5,7 @@ GenericName=RVC Terminal Application
 GenericName[zh_CN]=招行可视柜台终端应用程序
 Comment=RVC Terminal Application
 Comment[zh_CN]=招行可视柜台终端应用
-Exec=/opt/Run/version/sudo_spexplorer.sh
+Exec=/opt/Run/version/spexplorer.sh
 Icon=/opt/rvc/Resources/VTM.ico
 Type=Application
 Keywords=CMB;RVC;Terminal;

+ 1 - 1
addin/packaging/UOS/installsub.in

@@ -265,7 +265,7 @@ sudo chmod a+rw -R ${rvc_install_path_hardware_dir}
 
 sudo chmod 777 -R ${rvc_install_path_root}/${rel_version_dir}
 sudo chmod 777 ${rvc_install_path_versions_dir}/spexplorer.sh > /dev/null 2>&1
-sudo chmod 777 ${rvc_install_path_versions_dir}/sudo_spexplorer.sh
+sudo chmod 777 ${rvc_install_path_versions_dir}/sudo_spexplorer.sh > /dev/null 2>&1
 sudo chmod a+rw ${rvc_install_path_versions_dir}/active.txt
 sudo chmod a+rw ${rvc_install_path_versions_dir}
 sudo chmod a+rw ${rvc_install_path_Run_dir}

+ 1 - 1
addin/packaging/UOS/original.sh

@@ -277,7 +277,7 @@ sudo chmod a+rw -R ${rvc_install_path_hardware_dir}
 
 sudo chmod 777 -R ${rvc_install_path_root}/${rel_version_dir}
 sudo chmod 777 ${rvc_install_path_versions_dir}/spexplorer.sh > /dev/null 2>&1
-sudo chmod 777 ${rvc_install_path_versions_dir}/sudo_spexplorer.sh
+sudo chmod 777 ${rvc_install_path_versions_dir}/sudo_spexplorer.sh > /dev/null 2>&1
 sudo chmod a+rw ${rvc_install_path_versions_dir}/active.txt
 sudo chmod a+rw ${rvc_install_path_versions_dir}
 sudo chmod a+rw ${rvc_install_path_Run_dir}

+ 1 - 1
addin/packaging/UOS/spexplorerauto.target

@@ -12,7 +12,7 @@ Description=RVC Terminal Application AutoStart
 
 [Service]
 Type=simple
-ExecStart=/opt/Run/version/sudo_spexplorer.sh
+ExecStart=/opt/Run/version/spexplorer.sh
 Restart=always
 
 [Install]

+ 59 - 0
addin/startup_scripts/spexplorer.sh

@@ -0,0 +1,59 @@
+#!/bin/sh
+
+MY_PATH="`dirname \"$0\"`"              # relative
+MY_PATH="`( cd \"$MY_PATH\" && pwd )`"  # absolutized and normalized
+
+
+
+bootscripts=""
+
+
+check_dir_exists() {
+	if [ ! -d "$*" ]; then
+		echo "\n"
+		echo "=============================================================="
+		echo "   文件夹 $* 不存在!  "
+		echo "==============================================================\n"
+		exit 2
+	fi
+}
+
+check_file_exists() {
+	if [ ! -f "$*" ]; then
+		echo "\n"
+		echo "=============================================================="
+		echo "   文件 $* 不存在!  "
+		echo "==============================================================\n"
+		exit 2
+	fi
+}
+
+versionpath=""
+versionpath=$MY_PATH"/active.txt"
+# echo $versionpath
+line=""
+version=$(cat $versionpath)
+version=`echo ${version} | sed -e 's/^[ \t]*//g' -e 's/^[ \t]*$//g'`
+if [ -z "$version" ]; then
+    echo "\n"
+	echo "=============================================================="
+	echo "   文件 ${versionpath} 不存在或内容为空!  "
+	echo "==============================================================\n"
+	exit 1
+fi
+
+# add library search path
+LIBDIR=${MY_PATH}"/"${version}"/bin"
+check_dir_exists ${LIBDIR}
+
+bootscripts=$LIBDIR"/spshellstart.sh"
+echo $bootscripts
+chmod 766 $bootscripts
+
+if [ $# -eq 0 ]
+then
+	sudo $bootscripts
+else
+	# echo $#
+	sudo $bootscripts $*
+fi

+ 3 - 51
addin/startup_scripts/sudo_spexplorer.sh

@@ -2,58 +2,10 @@
 
 MY_PATH="`dirname \"$0\"`"              # relative
 MY_PATH="`( cd \"$MY_PATH\" && pwd )`"  # absolutized and normalized
-
-
-
+echo "2"$MY_PATH
 bootscripts=""
-
-
-check_dir_exists() {
-	if [ ! -d "$*" ]; then
-		echo "\n"
-		echo "=============================================================="
-		echo "   文件夹 $* 不存在!  "
-		echo "==============================================================\n"
-		exit 2
-	fi
-}
-
-check_file_exists() {
-	if [ ! -f "$*" ]; then
-		echo "\n"
-		echo "=============================================================="
-		echo "   文件 $* 不存在!  "
-		echo "==============================================================\n"
-		exit 2
-	fi
-}
-
-versionpath=""
-versionpath=$MY_PATH"/active.txt"
-# echo $versionpath
-line=""
-version=$(cat $versionpath)
-version=`echo ${version} | sed -e 's/^[ \t]*//g' -e 's/^[ \t]*$//g'`
-if [ -z "$version" ]; then
-    echo "\n"
-	echo "=============================================================="
-	echo "   文件 ${versionpath} 不存在或内容为空!  "
-	echo "==============================================================\n"
-	exit 1
-fi
-
-# add library search path
-LIBDIR=${MY_PATH}"/"${version}"/bin"
-check_dir_exists ${LIBDIR}
-
-bootscripts=$LIBDIR"/spshellstart.sh"
+bootscripts=$MY_PATH"/spexplorer.sh"
 echo $bootscripts
 chmod 766 $bootscripts
+sudo $bootscripts
 
-if [ $# -eq 0 ]
-then
-	sudo $bootscripts
-else
-	# echo $#
-	sudo $bootscripts $*
-fi