Compare commits

..

No commits in common. "80309a73a53a500861a56009cf99067ebdd2031f" and "eb4bebe12a381fc1ff8b24ff2a08a648065006f8" have entirely different histories.

View file

@ -31,12 +31,8 @@ Task("Run").IsDependentOn("CopyToMods").Does(() => {
var exeDir = System.IO.File.ReadAllText($"{tinyLifeDir}/GameDir"); var exeDir = System.IO.File.ReadAllText($"{tinyLifeDir}/GameDir");
var process = Process.Start(new ProcessStartInfo($"{exeDir}/Tiny Life") { var process = Process.Start(new ProcessStartInfo($"{exeDir}/Tiny Life") {
Arguments = $"-v --skip-splash --skip-preloads --debug-saves --ansi {args}", Arguments = $"-v --skip-splash --skip-preloads --debug-saves --ansi {args}",
RedirectStandardOutput = true, CreateNoWindow = true
RedirectStandardError = true
}); });
// make sure the output buffers (which we ignore) don't fill up
process.BeginOutputReadLine();
process.BeginErrorReadLine();
// we wait a bit to make sure the process has generated a new log file // we wait a bit to make sure the process has generated a new log file
Thread.Sleep(1000); Thread.Sleep(1000);
@ -49,12 +45,12 @@ Task("Run").IsDependentOn("CopyToMods").Does(() => {
using (var reader = new StreamReader(stream)) { using (var reader = new StreamReader(stream)) {
var lastPos = 0L; var lastPos = 0L;
do { do {
if (stream.Length > lastPos) { if (reader.BaseStream.Length > lastPos) {
stream.Seek(lastPos, SeekOrigin.Begin); reader.BaseStream.Seek(lastPos, SeekOrigin.Begin);
string line; string line;
while ((line = reader.ReadLine()) != null) while ((line = reader.ReadLine()) != null)
Information(line); Information(line);
lastPos = stream.Position; lastPos = reader.BaseStream.Position;
} }
Thread.Sleep(10); Thread.Sleep(10);
} while (!process.HasExited); } while (!process.HasExited);