LoadSettings() public method

public LoadSettings ( ) : void
return void
Example #1
0
        static void Main(string[] args)
        {
            if (args.Length != 3)
             {
            System.Console.WriteLine("Wrong number of parameters passed to Builder.Console");
            Environment.ExitCode = -1;
            return;
             }

             Settings settings = new Settings();
             settings.LoadSettings();

             BuildLoader loader = new BuildLoader();
             Builder.Common.Builder builder = loader.Load(settings.BuildInstructions);

             // Run all steps.
             builder.StepStart = -1;
             builder.StepEnd = -1;

             builder.LoadMacros(args[0], args[1], args[2]);

             string result;
             if (!settings.ValidateSettings(builder, out result))
             {
            System.Console.WriteLine(result);
            Environment.ExitCode = -1;
            return;
             }

             builder.LoadSettings(settings);

             ManualResetEvent eventStopThread= new ManualResetEvent(false);
             ManualResetEvent eventThreadStopped= new ManualResetEvent(false);

             BuildRunner runner = new BuildRunner(eventStopThread, eventThreadStopped, builder);
             runner.StepError+= runner_StepError;
             builder.MessageLog += builder_MessageLog;
             runner.Run();

             return;
        }
Example #2
0
        private void Run(int iStartIndex, int iStopIndex)
        {
            if (IsRunning)
            return;

             Settings settings = new Settings();
             settings.LoadSettings();

             for (int i = 0; i < lvwBuildSteps.Items.Count; i++)
            lvwBuildSteps.Items[i].SubItems[1].Text = "";

             timerBuildTime.Enabled = true;
             m_dtStartTime = DateTime.Now;

             cmdStart.Enabled = false;
             cmdStop.Enabled = true;

             // Set parameters to builder
             m_oBuilder.StepStart = iStartIndex;
             m_oBuilder.StepEnd = iStopIndex;

             m_oBuilder.ParameterSourcePath = txtPathSource.Text;
             m_oBuilder.ParameterVS8Path = txtPathVS8.Text;
             m_oBuilder.ParameterInnoSetupPath = txtPathInnoSetup.Text;
             m_oBuilder.ParameterSubversionPath = txtPathSubversion.Text;

             // Create macros
             m_oBuilder.LoadMacros(txtPathSource.Text, txtVersion.Text, txtBuildNumber.Text);

             string result;
             if (!settings.ValidateSettings(m_oBuilder, out result))
             {
            OnAddToLog(result, true);
            return;
             }

             m_EventStopThread.Reset();
             // create worker thread instance
             m_WorkerThread = new Thread(new ThreadStart(this.ThreadEntryPoint));
             m_WorkerThread.Name = "Build thread";   // looks nice in Output window
             m_WorkerThread.Start();
        }
Example #3
0
        private void SaveSettings()
        {
            Settings settings = new Settings();
             settings.LoadSettings();

             settings.SourcePath = txtPathSource.Text;
             settings.BuildNumber = Convert.ToInt32(txtBuildNumber.Text);
             settings.Version  = txtVersion.Text;
             settings.VSPath = txtPathVS8.Text;
             settings.InnoSetupPath = txtPathInnoSetup.Text;
             settings.SubversionPath = txtPathSubversion.Text;

             settings.SaveSettings();
        }
Example #4
0
        private void LoadSettings()
        {
            Settings settings = new Settings();
             settings.LoadSettings();

             txtPathSource.Text = settings.SourcePath;
             txtPathVS8.Text = settings.VSPath;
             txtBuildNumber.Text = settings.BuildNumber.ToString();
             txtPathInnoSetup.Text = settings.InnoSetupPath;
             txtVersion.Text = settings.Version;
             txtPathSubversion.Text = settings.SubversionPath;

             string s = settings.BuildInstructions;

             BuildLoader oBuildLoader = new BuildLoader();
             m_oBuilder = oBuildLoader.Load(s);

             m_oBuilder.MessageLog += new Builder.Common.Builder.MessageLogDelegate(m_oBuilder_MessageLog);

             string s2 = s;
        }