Example #1
0
 public void LoadMacros(string sourceDir, string version, string build)
 {
     Macros.Clear();
     AddMacro("%BUILD_NUMBER%", build);
     AddMacro("%PATH_SOURCE%", sourceDir);
     AddMacro("%HMAILSERVER_VERSION%", version);
     AddMacro("%PROGRAM_FILES%", BuildLoader.ProgramFilesx86());
 }
Example #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+= runner_StepError;
             builder.MessageLog += builder_MessageLog;
             runner.Run();

             return;
        }
Example #3
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;
        }