public IAppInstall InstallApplication(UnrealAppConfig AppConfig) { if (AppConfig.Build is StagedBuild) { return(InstallStagedBuild(AppConfig, AppConfig.Build as StagedBuild)); } EditorBuild EditorBuild = AppConfig.Build as EditorBuild; if (EditorBuild == null) { throw new AutomationException("Invalid build type!"); } MacAppInstall MacApp = new MacAppInstall(AppConfig.Name, this); MacApp.WorkingDirectory = Path.GetFullPath(EditorBuild.ExecutablePath); MacApp.CommandArguments = AppConfig.CommandLine; MacApp.RunOptions = RunOptions; // Mac always forces this to stop logs and other artifacts going to different places MacApp.CommandArguments += string.Format(" -userdir={0}", UserDir); MacApp.ArtifactPath = Path.Combine(UserDir, @"Saved"); // now turn the Foo.app into Foo/Content/MacOS/Foo string AppPath = Path.GetDirectoryName(EditorBuild.ExecutablePath); string FileName = Path.GetFileNameWithoutExtension(EditorBuild.ExecutablePath); MacApp.ExecutablePath = Path.Combine(EditorBuild.ExecutablePath, "Contents", "MacOS", FileName); return(MacApp); }
public IAppInstall InstallApplication(UnrealAppConfig AppConfig) { if (AppConfig.Build is StagedBuild) { return(InstallStagedBuild(AppConfig, AppConfig.Build as StagedBuild)); } EditorBuild EditorBuild = AppConfig.Build as EditorBuild; if (EditorBuild == null) { throw new AutomationException("Invalid build type!"); } WindowsAppInstall WinApp = new WindowsAppInstall(AppConfig.Name, AppConfig.ProjectName, this); WinApp.WorkingDirectory = Path.GetDirectoryName(EditorBuild.ExecutablePath); WinApp.RunOptions = RunOptions; // Force this to stop logs and other artifacts going to different places WinApp.CommandArguments = AppConfig.CommandLine + string.Format(" -userdir=\"{0}\"", UserDir); WinApp.ArtifactPath = Path.Combine(UserDir, @"Saved"); WinApp.ExecutablePath = EditorBuild.ExecutablePath; return(WinApp); }
EditorBuild CreateEditorBuild(DirectoryReference InUnrealPath) { if (InUnrealPath == null) { return(null); } // check for the editor string EditorExe = Path.Combine(InUnrealPath.FullName, GetRelativeExecutablePath(UnrealTargetRole.Editor, BuildHostPlatform.Current.Platform, UnrealTargetConfiguration.Development)); if (!Utils.SystemHelpers.ApplicationExists(EditorExe)) { return(null); } EditorBuild NewBuild = new EditorBuild(EditorExe); return(NewBuild); }
EditorBuild CreateEditorBuild(string InProjectName, string InUnrealPath) { if (string.IsNullOrEmpty(InUnrealPath)) { return(null); } // check for the editor string EditorExe = Path.Combine(InUnrealPath, GetRelativeExecutablePath(UnrealTargetRole.Editor, BuildHostPlatform.Current.Platform, UnrealTargetConfiguration.Development)); if (!Utils.SystemHelpers.ApplicationExists(EditorExe)) { return(null); } // figure out the game name - they may have passed Foo or FooGame string ProjectPath = UnrealHelpers.GetProjectPath(InProjectName); if (File.Exists(ProjectPath)) { ProjectName = InProjectName; } else { // todo - this is ok, because we want people to be able to run staged builds // where no uproject file is available. /*throw new AutomationException("Unable to find project file for {0}. Neither {1} nor {2} exists.", * InProjectName, ProjectOption1, ProjectOption2);*/ return(null); } EditorBuild NewBuild = new EditorBuild(EditorExe); return(NewBuild); //List<string> Empty = new List<string>(); //return CanSupportRole(new UnrealSessionRole(UnrealRoleType.Editor, BuildHostPlatform.Current.Platform, UnrealTargetConfiguration.Development), ref Empty); ; }