public WorkspaceUpdateContext(int InChangeNumber, WorkspaceUpdateOptions InOptions, string[] InSyncFilter, Dictionary<Guid, ConfigObject> InDefaultBuildSteps, List<ConfigObject> InUserBuildSteps, HashSet<Guid> InCustomBuildSteps, Dictionary<string, string> InVariables)
		{
			ChangeNumber = InChangeNumber;
			Options = InOptions;
			SyncFilter = InSyncFilter;
			DefaultBuildSteps = InDefaultBuildSteps;
			UserBuildStepObjects = InUserBuildSteps;
			CustomBuildSteps = InCustomBuildSteps;
			Variables = InVariables;
		}
Beispiel #2
0
 public WorkspaceUpdateContext(int InChangeNumber, WorkspaceUpdateOptions InOptions, string[] InSyncFilter, Dictionary <Guid, ConfigObject> InDefaultBuildSteps, List <ConfigObject> InUserBuildSteps, HashSet <Guid> InCustomBuildSteps, Dictionary <string, string> InVariables)
 {
     ChangeNumber         = InChangeNumber;
     Options              = InOptions;
     SyncFilter           = InSyncFilter;
     DefaultBuildSteps    = InDefaultBuildSteps;
     UserBuildStepObjects = InUserBuildSteps;
     CustomBuildSteps     = InCustomBuildSteps;
     Variables            = InVariables;
 }
		void StartWorkspaceUpdate(int ChangeNumber, WorkspaceUpdateOptions Options)
		{
			if((Options & (WorkspaceUpdateOptions.Sync | WorkspaceUpdateOptions.Build)) != 0 && IsEditorRunning(GetEditorBuildConfig()))
			{
				MessageBox.Show("Please close the editor before trying to sync/build.", "Editor Open");
				return;
			}

			WorkspaceUpdateContext Context = new WorkspaceUpdateContext(ChangeNumber, Options, Settings.SyncFilter, GetDefaultBuildStepObjects(), Settings.CurrentProject.BuildSteps, null, GetWorkspaceVariables());
			if(Options.HasFlag(WorkspaceUpdateOptions.SyncArchives))
			{
				string EditorArchivePath = null;
				if(ShouldSyncPrecompiledEditor)
				{
					EditorArchivePath = GetArchivePathForChangeNumber(ChangeNumber);
					if(EditorArchivePath == null)
					{
						MessageBox.Show("There are no compiled editor binaries for this change. To sync it, you must disable syncing of precompiled editor binaries.");
						return;
					}
				}
				Context.ArchiveTypeToDepotPath.Add(EditorArchiveType, EditorArchivePath);
			}
			StartWorkspaceUpdate(Context);
		}