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 process = Process.Start(new ProcessStartInfo($"{exeDir}/Tiny Life") {
Arguments = $"-v --skip-splash --skip-preloads --debug-saves --ansi {args}",
RedirectStandardOutput = true,
RedirectStandardError = true
CreateNoWindow = 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
Thread.Sleep(1000);
@ -49,12 +45,12 @@ Task("Run").IsDependentOn("CopyToMods").Does(() => {
using (var reader = new StreamReader(stream)) {
var lastPos = 0L;
do {
if (stream.Length > lastPos) {
stream.Seek(lastPos, SeekOrigin.Begin);
if (reader.BaseStream.Length > lastPos) {
reader.BaseStream.Seek(lastPos, SeekOrigin.Begin);
string line;
while ((line = reader.ReadLine()) != null)
Information(line);
lastPos = stream.Position;
lastPos = reader.BaseStream.Position;
}
Thread.Sleep(10);
} while (!process.HasExited);