Skip to content
Permalink
Browse files

- Typo corrections + code cleanup (#615)

  • Loading branch information...
tgiphil committed Mar 23, 2019
1 parent 96c320c commit 69ae4d0c27c24b43f2556ea63b4ad3a1df79ec63
@@ -1,16 +1,16 @@
using System;
// Copyright (c) MOSA Project. Licensed under the New BSD License.

using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Diagnostics;
using System.Reflection;
using System.Text.RegularExpressions;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;

namespace Mosa.Tool.Mosactl
{

public class MosaCtl
{
private bool IsWin = false;
@@ -45,27 +45,35 @@ public static string GetEnv(string name)
case "MOSA_ROOT":
value = Path.GetDirectoryName(Path.GetDirectoryName(new Uri(typeof(Program).Assembly.Location).AbsolutePath));
break;

case "MOSA_BIN":
value = Path.Combine(GetEnv("MOSA_ROOT"), "bin");
break;

case "MOSA_SOURCE":
value = Path.Combine(GetEnv("MOSA_ROOT"), "Source");
break;

case "MOSA_TOOLS":
value = Path.Combine(GetEnv("MOSA_ROOT"), "Tools");
break;

case "MOSA_NUGET":
value = Path.Combine(GetEnv("MOSA_TOOLS"), "nuget", "nuget.exe");
break;

case "MOSA_MSBUILD":
value = appLocations.MsBuild;
break;

case "MOSA_WIN_OSDIR":
value = @"C:\Windows";
break;

case "MOSA_WIN_PROGRAMS":
value = @"C:\Program Files"; // TODO
break;

case "MOSA_WIN_PROGRAMS_X86":
value = @"C:\Program Files (x86)"; // TODO
break;
@@ -99,35 +107,43 @@ public void Run(List<string> args)
if (!TaskTools(CheckType.force))
Environment.Exit(1);
break;

case "runtime":
if (!TaskRuntime(CheckType.force))
Environment.Exit(1);
break;

case "net":
case "dotnet":
if (!TaskCILBuild(CheckType.force, args))
Environment.Exit(1);
break;

case "bin":
case "binary":
if (!TaskBinaryBuild(CheckType.force, args))
Environment.Exit(1);
break;

case "run":
if (!TaskRun(args))
Environment.Exit(1);
break;

case "test":
if (!TaskTest(args))
Environment.Exit(1);
break;

case "unittest":
if (!TaskUnitTest(args))
Environment.Exit(1);
break;

case "debug":
TaskDebug(args);
break;

case "help":
PrintHelp("usage");
break;
@@ -249,7 +265,9 @@ private PlattformAppCall PrepareNetRuntime(string netApplication, List<string> a
}
}

public void TaskDiskBuild() { }
public void TaskDiskBuild()
{
}

public void TaskBuild(List<string> args)
{
@@ -343,7 +361,6 @@ private bool CallQemu(bool nographic, Action<string, Process> OnKernelLog)
args.Add("-serial");
args.Add("stdio");


args.Add("-serial");
args.Add("null");

@@ -385,7 +402,6 @@ private bool CallQemu(bool nographic, Action<string, Process> OnKernelLog)
if (buf[0] != '\r')
sb.Append(buf[0]);
}

}
});
th.Start();
@@ -508,10 +524,13 @@ public string ExpandKernelName(string name)
{
case "helloworld":
return "Mosa.HelloWorld.x86";

case "coolworld":
return "Mosa.CoolWorld.x86";

case "testworld":
return "Mosa.TestWorld.x86";

case "unittests":
return "Mosa.UnitTests.x86";
}
@@ -538,5 +557,4 @@ public string ExpandKernelBinPath(string name)
return name;
}
}

}
@@ -5,7 +5,7 @@
possible name: helloworld, coolworld, testworld.
(Name can also be a path to a project. This feature is in development.)

if actions is ommited, it's always "build"
if actions is omitted, it's always "build"

# builds the compiler tools. Rebuild is only required if compiler source has been changed.
tools build

This file was deleted.

Oops, something went wrong.
@@ -1,3 +1,3 @@
Try to avoid references to other Dependencies, because loaded assemblies are locked on windows.
If dependencies are required, try to access them as late as possible, to make rebuilds possible.
Another solution would be to have an seperate assembly and load them via reflection.
Another solution would be to have an separate assembly and load them via reflection.
@@ -33,7 +33,7 @@ for:
after_build:
- cmd: ISCC.exe Source/Inno-Setup-Script/Mosa-Installer.iss
- ps: ./mosactl.ps1 unittest
- ps: ./mosactl.ps1 test
# - ps: ./mosactl.ps1 test

build_script:

0 comments on commit 69ae4d0

Please sign in to comment.
You can’t perform that action at this time.