LoadMacros() public method

public LoadMacros ( string sourceDir, string version, string build ) : void
sourceDir string
version string
build string
return void
示例#1
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.ParameterVSPath         = txtPathVS8.Text;
            m_oBuilder.ParameterMSBuildPath    = txtPathMSBuild.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();
        }
示例#2
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   += new BuildRunner.StepErrorDelegate(runner_StepError);
            builder.MessageLog += new Builder.Common.Builder.MessageLogDelegate(builder_MessageLog);
            runner.Run();

            return;
        }