Beispiel #1
0
 public async Task <string> runVcpkg(string args)
 {
     return(await Task.Run(
                () =>
     {
         return ShellCommand.RunShellOnce(VcpkgPath, args);
     }));
 }
Beispiel #2
0
        public void InstallToAll(bool useDialog = true, DataReceivedEventHandler recvHander = null)
        {
            if (useDialog == false)
            {
                ShellCommand shellRun = new ShellCommand();

                shellRun.RunShell(VcpkgPath, "integrate install", recvHander);
            }
            else
            {
                ShowProcessFrm.RunShell(VcpkgPath, "integrate install");
            }
        }
Beispiel #3
0
        /// <summary>
        /// 安装setupVcpkg代码并编译
        /// </summary>
        /// <param name="recvHander">接收数据重定向</param>
        /// <returns>是否安装成功</returns>
        public bool buildVcpkg(string targetPath, bool useDialog = true, DataReceivedEventHandler recvHander = null)
        {
            if (useDialog == false)
            {
                // Git安装源码
                ShellCommand shellRun = new ShellCommand();

                return(shellRun.RunShell(targetPath + "\\bootstrap-vcpkg.bat", "", recvHander));
            }
            else
            {
                ShowProcessFrm.RunShell(targetPath + "\\bootstrap-vcpkg.bat", "");

                return(true);
            }
        }
Beispiel #4
0
        /// <summary>
        /// 根据git代码克隆对应的vcpkg路径
        /// </summary>
        /// <param name="targetPath">clone到哪里</param>
        /// <param name="recvHander">重定向的控制台数据</param>
        /// <returns>返回是否克隆成功</returns>
        public bool gitCloneVcpkg(string targetPath, bool useDialog = true, DataReceivedEventHandler recvHander = null)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat("clone --progress -v \"{0}\" \"{1}\"", GitVcpkgUrl, targetPath);

            if (useDialog == false)
            {
                // Git安装源码
                ShellCommand shellRun = new ShellCommand();

                return(shellRun.RunShell(GitPath, sb.ToString(), recvHander));
            }
            else
            {
                ShowProcessFrm.RunShell(GitPath, sb.ToString());

                return(true);
            }
        }