Beispiel #1
0
        protected virtual void Run(string args, string workingDirectory)
        {
            try
            {
                if (!args.StartsWith("status")) TraceManager.AddAsync("svn " + args);

                var cmd = GetSvnCmd();
                if (cmd == "Tools\\sliksvn\\bin\\svn.exe")
                {
                    TraceManager.AddAsync("SlickSVN is not included anymore in FlashDevelop tools.\nPlease install a SVN client and set Program Settings > SourceControl > SVN Path = 'svn'", -3);
                    return;
                }

                runner = new ProcessRunner();
                runner.WorkingDirectory = workingDirectory;
                runner.Run(cmd, args);
                runner.Output += new LineOutputHandler(runner_Output);
                runner.Error += new LineOutputHandler(runner_Error);
                runner.ProcessEnded += new ProcessEndedHandler(runner_ProcessEnded);
            }
            catch (Exception ex)
            {
                runner = null;
                String label = TextHelper.GetString("SourceControl.Info.UnableToStartCommand");
                TraceManager.AddAsync(label + "\n" + ex.Message);
            }
        }
Beispiel #2
0
 /// <summary>
 /// Start background process
 /// </summary>
 private void RunPMD(String pmdPath, String projectPath, String sourcePath, String pmdRuleset)
 {
     String args = "-Xmx256m -jar \"" + pmdPath + "\" -s \"" + sourcePath + "\" -o \"" + projectPath + "\"";
     if (!string.IsNullOrEmpty(pmdRuleset) && File.Exists(pmdRuleset)) args += " -r \"" + pmdRuleset + "\"";
     this.SetStatusText(TextHelper.GetString("Info.RunningFlexPMD"));
     this.pmdRunner = new ProcessRunner();
     this.pmdRunner.ProcessEnded += new ProcessEndedHandler(this.PmdRunnerProcessEnded);
     this.pmdRunner.Error += new LineOutputHandler(this.PmdRunnerError);
     this.pmdRunner.Run("java", args, true);
     this.errorLog = String.Empty;
 }
Beispiel #3
0
        protected virtual void Run(string args, string workingDirectory)
        {
            try
            {
                if (!args.StartsWith("status")) TraceManager.AddAsync("svn " + args);

                runner = new ProcessRunner();
                runner.WorkingDirectory = workingDirectory;
                runner.Run(GetSvnCmd(), args);
                runner.Output += new LineOutputHandler(runner_Output);
                runner.Error += new LineOutputHandler(runner_Error);
                runner.ProcessEnded += new ProcessEndedHandler(runner_ProcessEnded);
            }
            catch (Exception ex)
            {
                runner = null;
                String label = TextHelper.GetString("SourceControl.Info.UnableToStartCommand");
                TraceManager.AddAsync(label + "\n" + ex.Message);
            }
        }
 protected virtual void Runner_ProcessEnded(object sender, int exitCode)
 {
     runner = null;
     DisplayErrors();
 }
Beispiel #5
0
        /// <summary>
        /// Start background process
        /// </summary>
        private void StartMxmlcRunner(string flexPath)
        {
            currentSDK = flexPath;
            if (mxmlcRunner != null && mxmlcRunner.IsRunning) mxmlcRunner.KillProcess();

            CheckIsFlex4SDK(flexPath);
            string shell = isFlex4SDK ? "Mxmlc4Shell" : "MxmlcShell";

            string cmd = jvmConfig["java.args"]
                + " -classpath \"" + mxmlcPath + ";" + flexShellsPath + "\" " + shell;
            TraceManager.Add(TextHelper.GetString("Info.StartMxmlcRunner") + "\n"
                + JvmConfigHelper.GetJavaEXE(jvmConfig) + " " + cmd, -1);
            // run compiler shell
            mxmlcRunner = new ProcessRunner();
            mxmlcRunner.WorkingDirectory = Path.Combine(flexPath, "frameworks");
            mxmlcRunner.RedirectInput = true;
            mxmlcRunner.Run(JvmConfigHelper.GetJavaEXE(jvmConfig), cmd, true);
            mxmlcRunner.Output += mxmlcRunner_Output;
            mxmlcRunner.Error += mxmlcRunner_Error;
            errorState = 0;
            Thread.Sleep(100);
        }
Beispiel #6
0
        /// <summary>
        /// Start background process
        /// </summary>
        private void StartAscRunner(string flexPath)
        {
            currentSDK = flexPath;
            if (ascRunner != null && ascRunner.IsRunning) ascRunner.KillProcess();

            string cmd = "-Duser.language=en -Duser.region=US"
                + " -classpath \"" + ascPath + ";" + flexShellsPath + "\" AscShell";
            TraceManager.Add(TextHelper.GetString("Info.StartAscRunner") + "\n"
                + JvmConfigHelper.GetJavaEXE(jvmConfig) + " " + cmd, -1);
            // run asc shell
            ascRunner = new ProcessRunner();
            ascRunner.WorkingDirectory = Path.GetDirectoryName(ascPath);
            ascRunner.RedirectInput = true;
            ascRunner.Run(JvmConfigHelper.GetJavaEXE(jvmConfig), cmd, true);
            ascRunner.Output += ascRunner_Output;
            ascRunner.Error += ascRunner_Error;
            errorState = 0;
            Thread.Sleep(100);
        }
Beispiel #7
0
 /// <summary>
 /// Stop background processes
 /// </summary>
 public void Stop()
 {
     if (ascRunner != null && ascRunner.IsRunning) ascRunner.KillProcess();
     ascRunner = null;
     if (mxmlcRunner != null && mxmlcRunner.IsRunning) mxmlcRunner.KillProcess();
     mxmlcRunner = null;
 }
Beispiel #8
0
 /// <summary>
 /// Stop background processes
 /// </summary>
 public void Stop()
 {
     try
     {
         if (ascRunner != null && ascRunner.IsRunning) ascRunner.KillProcess();
     }
     catch { }
     finally
     {
         ascRunner = null;
     }
     try
     {
         if (mxmlcRunner != null && mxmlcRunner.IsRunning) mxmlcRunner.KillProcess();
     }
     catch { }
     finally
     {
         mxmlcRunner = null;
     }
 }