static int Main(string[] args) { int errlvl = 0; try { string buildCfgFile = args[0]; ProductBuildDataSet pbDataSet = ProductBuildDataSet.ReadBuildConfigurationFile(buildCfgFile); string unixPassword = pbDataSet.GetBuildProperty("UnixPassword"); if (unixPassword != null) { pbDataSet.SetBuildProperty("UnixPassword", "dummy", true); } pbDataSet.WriteBuildConfigurationFile(buildCfgFile); } catch (Exception e) { errlvl = 1; Console.Error.WriteLine("An error occurred in SetDummyPasswords:"); Console.Error.WriteLine(e.ToString()); } return(errlvl); }
static int Main(string[] args) { if (args.Length < 1) { errorLevel = 3; Usage(); return(errorLevel); } try { string path = null; Hashtable commandLineProperties = new Hashtable(); ProcessCommandLineArguments(args, ref path, commandLineProperties); LibraryManifest libraryInfo = new LibraryManifest(path); // default to Development profile string profileName = "Development (Public)"; string commandLineProfileName = (string)commandLineProperties["BuildProfileName"]; profileName = (commandLineProfileName != null) ? commandLineProfileName : profileName; ProductBuildDataSet pbDataSet = ProductBuildDataSet.GetProductBuildDataSetWithoutComplist( profileName, libraryInfo.GetName(), libraryInfo.GetVersion(), libraryInfo.GetPlatform(), libraryInfo.GetBranchOrTrunkName(), libraryInfo.GetDirectory(), path, libraryInfo.GetDate()); pbDataSet.ApplyCommandLineProperties(commandLineProperties); pbDataSet.LoadComplist(); pbDataSet.FinalizeProperties(); pbDataSet.WriteBuildConfigurationFile(pbDataSet.GetBuildConfigurationFilename()); string buildPath = pbDataSet.GetBuildProperty("BuildPath"); VmsProduct currProduct = new VmsProduct(libraryInfo.GetName(), libraryInfo.GetVersion(), libraryInfo.GetPlatform()); VmsLibrary currLibrary = new VmsLibrary(currProduct, libraryInfo.GetBranchOrTrunkName()); ControllerObject controllerObject = new ControllerObject(); string currentKey = Util.GetServiceKey(); bool actionSucceeded = false; string errorMessage = null; if (controllerObject.BuildLibrary(currLibrary, currentKey, buildPath, out errorMessage, false)) { NewMessage.ProcessMessages(currentKey, ref errorMessage, ref actionSucceeded, false, ref errorLevel); if (actionSucceeded) { Console.WriteLine(" Successfully built " + currLibrary.ShortLibraryName); } else { Console.WriteLine(" Error building " + currLibrary.ShortLibraryName + ":" + errorMessage); } } else { Console.WriteLine(" Error building " + currLibrary.ShortLibraryName + ":" + errorMessage); } } catch (Exception e) { errorLevel = 3; Console.Error.WriteLine("An error occurred in ProductBuilder:"); Console.Error.WriteLine(e.ToString()); Usage(); } return(errorLevel); }