Exemple #1
0
		protected override void Run ()
		{
			SolutionItem entry = IdeApp.ProjectOperations.CurrentSelectedSolutionItem;
			DeployDialog dlg = new DeployDialog (entry, false);
			try {
				if (MessageService.RunCustomDialog (dlg) == (int) Gtk.ResponseType.Ok) {
					if (dlg.SaveToProject) {
						Package p = new Package ();
						p.Name = dlg.NewPackageName;
						p.PackageBuilder = dlg.PackageBuilder;
						
						if (dlg.CreateNewProject) {
							PackagingProject project = new PackagingProject ();
							project.Name = dlg.NewProjectName;
							project.FileName = Path.Combine (dlg.NewProjectSolution.BaseDirectory, project.Name + ".mdse");
							project.Packages.Add (p);
							dlg.NewProjectSolution.Items.Add (project);
							IdeApp.ProjectOperations.Save (dlg.NewProjectSolution.ParentSolution);
						}
						else {
							dlg.ExistingPackagingProject.Packages.Add (p);
							IdeApp.ProjectOperations.Save (dlg.ExistingPackagingProject);
						}
					}
					Package pkg = new Package (dlg.PackageBuilder);
					DeployOperations.BuildPackage (pkg);
				}
			} finally {
				dlg.Destroy ();
				dlg.Dispose ();
			}
		}
Exemple #2
0
		protected override void Run ()
		{
			PackagingProject project = IdeApp.ProjectOperations.CurrentSelectedSolutionItem as PackagingProject;
			DeployDialog dlg = new DeployDialog (project.ParentFolder, true);
			try {
				if (MessageService.RunCustomDialog (dlg) == (int) Gtk.ResponseType.Ok) {
					project.AddPackage (dlg.NewPackageName, dlg.PackageBuilder);
					IdeApp.ProjectOperations.Save (project);
				}
			} finally {
				dlg.Destroy ();
				dlg.Dispose ();
			}
		}