예제 #1
0
    private static void WrapRunSVNThread(string args)
    {
        switch (Application.platform)
        {
        case RuntimePlatform.OSXEditor:
            System.Collections.Specialized.StringDictionary env = new System.Collections.Specialized.StringDictionary();
            string goodcmd = args.Replace("\"", string.Empty);
            env.Add("goodcmd", goodcmd);

            //Debug.Log(string.Format("export goodcmd={0}ls", goodcmd));

            string bottleName = GoodSVN.GetCrossOverBottle();
            env.Add("bottle", bottleName);

            //Debug.Log(string.Format("export bottle={0}", bottleName));

            //Debug.Log(args);
            string crossOverScript = GoodEditorPanel.FindAssetPath("GoodSVNCrossOver.sh", EXCLUDE_SVN_FOLDER);
            if (string.IsNullOrEmpty(crossOverScript))
            {
                Debug.LogError(string.Format("Failed to find script: {0}", crossOverScript));
                break;
            }

            string command  = "/bin/sh";
            string argument = crossOverScript.Replace(@"\", "/");
            //Debug.Log(string.Format("{0} {1}", command, argument));
            GoodEditorProcess.RunProcessThread(command, argument, null, env);
            break;

        default:
            RunSVNThread(args);
            break;
        }
    }
예제 #2
0
 public static void RunSVNThread(string args)
 {
     try
     {
         GoodEditorProcess.RunProcessThread(PATH_TORTOISE_SVN, args);
     }
     catch (Exception error)
     {
         Debug.LogWarning(error);
     }
 }
예제 #3
0
    public void Work()
    {
        Error  = string.Empty;
        Output = string.Empty;

        IsRunning = true;
        if (Env == null)
        {
            Process = GoodEditorProcess.RunProcess(Path, Arguments, ref Output, ref Error);
        }
        else
        {
            Process = GoodEditorProcess.RunProcess(Path, Arguments, Env);
        }
        IsRunning = false;

        if (null != CompleteCallback)
        {
            CompleteCallback.Invoke(this);
        }
    }