Updated userkit builder to name zipfile Cosmos.zip instead of Test.zip. Added code to builder GUI to use local build dir if the installed build dir can't be found in the Registry (new build from source checkout). Added check to console prompter to ignore blank commands (if user just hits Enter key).

This commit is contained in:
sbalmos_cp 2008-01-21 17:57:47 +00:00
parent 977219e326
commit 08131e85c7
4 changed files with 10 additions and 3 deletions

Binary file not shown.

View file

@ -19,9 +19,15 @@ namespace Cosmos.Build.Windows {
public static string GetBuildPath() {
try {
RegistryKey xKey = Registry.CurrentUser.OpenSubKey(@"Software\Cosmos");
string xResult = (string)xKey.GetValue("Build Path");
string xResult;
if (xKey == null) {
xResult = Directory.GetCurrentDirectory();
xResult = xResult.Substring(0, xResult.IndexOf("source"));
xResult += @"Build\";
}
else { xResult = (string)xKey.GetValue("Build Path"); }
if (String.IsNullOrEmpty(xResult)) {
throw new Exception();
throw new Exception("Cannot find Cosmos build path in registry");
}
if (!xResult.EndsWith(@"\")) {
xResult = xResult + @"\";

View file

@ -38,6 +38,7 @@ namespace Cosmos.Shell.Console {
while (running) {
System.Console.Write("/> ");
string line = System.Console.ReadLine();
if (string.IsNullOrEmpty(line)) { continue; }
int index = line.IndexOf(' ');
string command;
string param;

View file

@ -15,6 +15,6 @@ rmdir /S /Q "..\Pack"
mkdir "..\Pack"
mkdir "..\Pack\Cosmos"
xcopy /S "..\Build\*.*" "..\Pack\Cosmos"
"..\Tools\7zip\7z.exe" a -tzip Test.zip "..\Pack\*.*" -r
"..\Tools\7zip\7z.exe" a -tzip Cosmos.zip "..\Pack\*.*" -r
rmdir /S /Q "..\Pack"
pause