From 08131e85c710ff458b69050d4e8308cbd15377dd Mon Sep 17 00:00:00 2001 From: sbalmos_cp Date: Mon, 21 Jan 2008 17:57:47 +0000 Subject: [PATCH] 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). --- Build/ISO/isolinux.bin | Bin 11691 -> 11691 bytes source/Cosmos.Build.Windows/Builder.cs | 10 ++++++++-- .../Cosmos/Cosmos.Shell.Console/Prompter.cs | 1 + source/PrepareUserKit.bat | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Build/ISO/isolinux.bin b/Build/ISO/isolinux.bin index 9201f08a437aa5d8ad00dd36cfe041d17c562546..f406ac4feddc029eb0fb0d5fa4727b07272b2945 100644 GIT binary patch delta 22 ecmZ1-y*irr*DHq_28Ia}1Q-|?WH<88(**!#O$U$w delta 22 ecmZ1-y*irr*DHq_28Ia}1Q-|?WH$27(**!#NC%Gq diff --git a/source/Cosmos.Build.Windows/Builder.cs b/source/Cosmos.Build.Windows/Builder.cs index edf20c19b..b1ea892b5 100644 --- a/source/Cosmos.Build.Windows/Builder.cs +++ b/source/Cosmos.Build.Windows/Builder.cs @@ -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 + @"\"; diff --git a/source/Cosmos/Cosmos.Shell.Console/Prompter.cs b/source/Cosmos/Cosmos.Shell.Console/Prompter.cs index 56b526168..7226454f7 100644 --- a/source/Cosmos/Cosmos.Shell.Console/Prompter.cs +++ b/source/Cosmos/Cosmos.Shell.Console/Prompter.cs @@ -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; diff --git a/source/PrepareUserKit.bat b/source/PrepareUserKit.bat index eb033305d..e0f7f7202 100644 --- a/source/PrepareUserKit.bat +++ b/source/PrepareUserKit.bat @@ -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 \ No newline at end of file