示例#1
0
        private static ProcessStartInfo CreateDotNetCoreStartInfoForArgs(string arguments)
        {
            string text = Paths.Combine(new string[]
            {
                NetCoreProgram.GetSdkRoot(),
                "dotnet"
            });

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

            if (Application.platform == RuntimePlatform.OSXEditor)
            {
                string text2 = Path.Combine(Path.Combine(Path.Combine(NetCoreProgram.GetNetCoreRoot(), "NativeDeps"), "osx"), "lib");
                if (processStartInfo.EnvironmentVariables.ContainsKey("DYLD_LIBRARY_PATH"))
                {
                    processStartInfo.EnvironmentVariables["DYLD_LIBRARY_PATH"] = string.Format("{0}:{1}", text2, processStartInfo.EnvironmentVariables["DYLD_LIBRARY_PATH"]);
                }
                else
                {
                    processStartInfo.EnvironmentVariables.Add("DYLD_LIBRARY_PATH", text2);
                }
            }
            return(processStartInfo);
        }
示例#2
0
 private static string GetSdkRoot()
 {
     return(Path.Combine(NetCoreProgram.GetNetCoreRoot(), "Sdk"));
 }