PathCombine() 개인적인 정적인 메소드

private static PathCombine ( ) : string
리턴 string
예제 #1
0
        public ManagedProgram(string monodistribution, string profile, string executable, string arguments, bool setMonoEnvironmentVariables, Action <ProcessStartInfo> setupStartInfo)
        {
            string text = ManagedProgram.PathCombine(new string[]
            {
                monodistribution,
                "bin",
                "mono"
            });
            string value = ManagedProgram.PathCombine(new string[]
            {
                monodistribution,
                "lib",
                "mono",
                profile
            });

            if (Application.platform == RuntimePlatform.WindowsEditor)
            {
                text = CommandLineFormatter.PrepareFileName(text + ".exe");
            }
            ProcessStartInfo processStartInfo = new ProcessStartInfo
            {
                Arguments              = CommandLineFormatter.PrepareFileName(executable) + " " + arguments,
                CreateNoWindow         = true,
                FileName               = text,
                RedirectStandardError  = true,
                RedirectStandardOutput = true,
                WorkingDirectory       = Application.dataPath + "/..",
                UseShellExecute        = false
            };

            if (setMonoEnvironmentVariables)
            {
                processStartInfo.EnvironmentVariables["MONO_PATH"]    = value;
                processStartInfo.EnvironmentVariables["MONO_CFG_DIR"] = ManagedProgram.PathCombine(new string[]
                {
                    monodistribution,
                    "etc"
                });
            }
            if (setupStartInfo != null)
            {
                setupStartInfo(processStartInfo);
            }
            this._process.StartInfo = processStartInfo;
        }
예제 #2
0
        public ManagedProgram(string monodistribution, string profile, string executable, string arguments, bool setMonoEnvironmentVariables)
        {
            string str1 = ManagedProgram.PathCombine(monodistribution, "bin", "mono");
            string str2 = ManagedProgram.PathCombine(monodistribution, "lib", "mono", profile);

            if (Application.platform == RuntimePlatform.WindowsEditor)
            {
                str1 = CommandLineFormatter.PrepareFileName(str1 + ".exe");
            }
            ProcessStartInfo processStartInfo = new ProcessStartInfo()
            {
                Arguments = CommandLineFormatter.PrepareFileName(executable) + " " + arguments, CreateNoWindow = true, FileName = str1, RedirectStandardError = true, RedirectStandardOutput = true, WorkingDirectory = Application.dataPath + "/..", UseShellExecute = false
            };

            if (setMonoEnvironmentVariables)
            {
                processStartInfo.EnvironmentVariables["MONO_PATH"]    = str2;
                processStartInfo.EnvironmentVariables["MONO_CFG_DIR"] = ManagedProgram.PathCombine(monodistribution, "etc");
            }
            this._process.StartInfo = processStartInfo;
        }