public static void StartServer(ProcessCaller _MangosProcess, ProcessCaller _RealmProcess, string _worldExe, string _realmExe, RichTextBox _Normal, RichTextBox _Error) { _Error.Clear(); _Normal.Clear(); _Normal.Focus(); ErrorRich = _Error; NormalRich = _Normal; //World _MangosProcess.FileName = Settings.Default.ServerPath + "\\" + _worldExe; _MangosProcess.WorkingDirectory = Settings.Default.ServerPath + "\\"; _MangosProcess.StdErrReceived += new DataReceivedHandler(writeStreamInfoError); _MangosProcess.StdOutReceived += new DataReceivedHandler(writeStreamInfoNormal); if (IsRunning(_worldExe)) KillProcess(_worldExe); _MangosProcess.Start(); //Realm _RealmProcess.FileName = Settings.Default.ServerPath + "\\" + _realmExe; _RealmProcess.WorkingDirectory = Settings.Default.ServerPath + "\\"; _RealmProcess.StdErrReceived += new DataReceivedHandler(writeStreamInfoError); _RealmProcess.StdOutReceived += new DataReceivedHandler(writeStreamInfoNormal); if (IsRunning(_realmExe)) KillProcess(_realmExe); _RealmProcess.Start(); }
private static void PullGit(GitTypes type) { ProcessCaller GitPull = new ProcessCaller(MainForm); GitPull.FileName = "apps\\git\\bin\\git.exe"; switch ((GitTypes)type) { case GitTypes.Core: GitPull.WorkingDirectory = "Source\\Core"; CompileRich.AppendText("Pulling Core Updates\n"); GitPull.Completed += new EventHandler(processCompleted); if (Settings.Default.ScriptdevGit == "") GitPull.Completed += new EventHandler(CompileCore); break; case GitTypes.Database: GitPull.WorkingDirectory = "Source\\Database"; CompileRich.AppendText("Pulling Databse Updates\n"); break; case GitTypes.ScriptDev2: GitPull.WorkingDirectory = "Source\\Core\\src\\bindings\\ScriptDev2"; CompileRich.AppendText("Pulling scriptdev Updates\n"); GitPull.Completed += new EventHandler(CompileCore); break; } GitPull.Arguments = "pull"; GitPull.StdErrReceived += new DataReceivedHandler(writeStreamInfoNormal); GitPull.StdOutReceived += new DataReceivedHandler(writeStreamInfoNormal); GitPull.Start(); }
private static void CloneGit(GitTypes type) { ProcessCaller Git = new ProcessCaller(MainForm); Git.FileName = "apps\\git\\bin\\git.exe"; Git.WorkingDirectory = "Source"; string GitRepo = ""; string RepoName = ""; switch ((GitTypes)type) { case GitTypes.Core: GitRepo = Settings.Default.CoreGit; RepoName = "Core"; Git.Completed += new EventHandler(processCompleted); if (Settings.Default.ScriptdevGit == "") Git.Completed += new EventHandler(CompileCore); CompileRich.AppendText("Cloning core\n"); break; case GitTypes.Database: GitRepo = Settings.Default.DatabaseGit; RepoName = "Database"; CompileRich.AppendText("Cloning database\n"); break; case GitTypes.ScriptDev2: GitRepo = Settings.Default.ScriptdevGit; RepoName = "ScriptDev2"; Git.WorkingDirectory = "Source\\Core\\src\\bindings"; Git.Completed += new EventHandler(CompileCore); CompileRich.AppendText("Cloning Scriptdev\n"); break; } if (GitRepo != "") { Git.Arguments = "clone -b master " + GitRepo + " " + RepoName; Git.StdErrReceived += new DataReceivedHandler(writeStreamInfoNormal); Git.StdOutReceived += new DataReceivedHandler(writeStreamInfoNormal); Git.Start(); } else CompileRich.AppendText("Cloning failed on " + type.ToString() + "\n"); }
private static void CompileSD2(object sender, EventArgs e) { ProcessCaller SD2Compile = new ProcessCaller(MainForm); CompileRich.Clear(); CompileRich.AppendText("Scriptdev Compile started\n"); SD2Compile.FileName = "C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\MSBuild.exe"; SD2Compile.Arguments = CompileArguments(GitTypes.ScriptDev2); SD2Compile.StdOutReceived += new DataReceivedHandler(writeStreamInfoNormal); SD2Compile.StdErrReceived += new DataReceivedHandler(writeStreamInfoNormal); SD2Compile.Completed += new EventHandler(finalizeCompile); SD2Compile.Start(); }