Added a wait for process
This commit is contained in:
parent
a1d102ef40
commit
d851e34daf
@ -1,7 +1,5 @@
|
||||
# USL
|
||||
![Main Banner](https://s14.postimg.org/x2qqyft69/banner.png)
|
||||
|
||||
[![TravisCI build](https://travis-ci.org/casKd-dev/USL.svg?branch=dev)](https://travis-ci.org/casKd-dev/USL/builds/)
|
||||
<p align=center><img src="https://s14.postimg.org/x2qqyft69/banner.png"><br>
|
||||
<img src="https://travis-ci.org/casKd-dev/USL.svg?style=flat-square&branch=release"> <img src="https://img.shields.io/badge/License-MIT-yellow.svg"></p>
|
||||
|
||||
A Gameserver launcher written in C# .
|
||||
This project aims to help people not as experienced with Unturned or computers in general.
|
||||
|
@ -29,7 +29,7 @@ namespace UnturnedSL
|
||||
Run(valid, name, map, welcome, port, data, extralo, path);
|
||||
}
|
||||
|
||||
static void Validation(string name, string map, string welcome, string port, string data, string extralo, string path,out bool valid)
|
||||
static void Validation(string name, string map, string welcome, string port, string data, string extralo, string path, out bool valid)
|
||||
/*Validate if all input is correct*/
|
||||
{
|
||||
/*Checks if every condition is true*/
|
||||
@ -163,8 +163,8 @@ namespace UnturnedSL
|
||||
"If you still get the problem, report it on GitHub!");
|
||||
DisplayText(name, map, welcome, data, port, extralo, path);
|
||||
Console.Beep(2300, 250);
|
||||
Console.WriteLine(Environment.NewLine + "Press any key to exit...");
|
||||
Console.ReadKey();
|
||||
Environment.Exit(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -172,10 +172,10 @@ namespace UnturnedSL
|
||||
Console.WriteLine("Welcome!" + Environment.NewLine);
|
||||
DisplayText(name, map, welcome, data, port, extralo, path);
|
||||
string launchop = "-nographics -batchmode -name " + "\"" + name + "\"" + " -map " + map + " -welcome " + "\"" + welcome + "\"" + " -port:" + port + " " + extralo + " +secureserver/" + data;
|
||||
Process.Start(path + @"\Unturned.exe ", launchop);
|
||||
Console.ReadKey();
|
||||
Environment.Exit(0);
|
||||
var proc = Process.Start(path + @"\Unturned.exe ", launchop);
|
||||
proc.WaitForExit(600000);
|
||||
}
|
||||
Environment.Exit(0);
|
||||
}
|
||||
|
||||
static void MkDirIfNotExist(string name)
|
||||
|
@ -38,7 +38,7 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<RunCodeAnalysis>true</RunCodeAnalysis>
|
||||
<RunCodeAnalysis>false</RunCodeAnalysis>
|
||||
<CodeAnalysisIgnoreGeneratedCode>false</CodeAnalysisIgnoreGeneratedCode>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
|
Reference in New Issue
Block a user