Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            var ideManager          = new IdeManager();
            var generationDirectory = args[0];

            ideManager.OpenNewlyCreatedYoProject(generationDirectory);
        }
        private void btnSetupSource_Click(object sender, EventArgs e)
        {
            LogMessage("Setting up source.");

            var action = new Action(() =>
            {
                try
                {
                    var project = ProjectManager.ProjectBase;
                    string slnName;
                    string slnDebugName;

                    LogMessage("Processing " + project.Name);
                    slnName      = IdeManager.LocateSolution(project.FullFileName);
                    slnDebugName = slnName.Substring(0, slnName.Length - 4) + "_Debug.sln";

                    if (!File.Exists(slnDebugName))
                    {
                        File.Copy(slnName, slnDebugName);
                    }

                    //IdeManager.Initialize(GetVersion(project));
                    //IdeManager.AddProjectsToSolution(IdeManager.LocateSolution(project.FullFileName),
                    //GetEngineProjects(project));
                    //IdeManager.ReleaseInstance();

                    LinkDlls(project);

                    foreach (var syncedProject in ProjectManager.SyncedProjects)
                    {
                        LogMessage("Processing " + syncedProject.Name);

                        slnName      = IdeManager.LocateSolution(syncedProject.FullFileName);
                        slnDebugName = slnName.Substring(0, slnName.Length - 4) + "_Debug.sln";

                        if (!File.Exists(slnDebugName))
                        {
                            File.Copy(slnName, slnDebugName);
                        }

                        //IdeManager.Initialize(GetVersion(syncedProject));
                        //IdeManager.AddProjectsToSolution(
                        //IdeManager.LocateSolution(syncedProject.FullFileName),
                        //GetEngineProjects(syncedProject));
                        //IdeManager.ReleaseInstance();

                        LinkDlls(syncedProject);
                    }

                    LogMessage("Complete.");
                }
                catch (Exception ex)
                {
                    LogMessage("Error.");
                    BeginInvoke(new Action(() =>
                    {
                        MessageBox.Show(ex.ToString(), @"Error");
                    }));
                }
            });

            action.BeginInvoke(null, null);
        }