public Pram(NPath pramDll, params NPath[] providerLoadPaths) { PramDataDirectory.EnsureDirectoryExists(); this.pramDll = pramDll; this.EnvironmentVariables.Add("PRAM_DIRECTORY", PramDataDirectory.ToString()); this.ProviderLoadPaths = providerLoadPaths; }
public static IEnumerable <NPath> Move(this IEnumerable <NPath> self, NPath dest) { if (dest.IsRelative) { throw new ArgumentException("When moving multiple files, the destination cannot be a relative path"); } dest.EnsureDirectoryExists(); return(self.Select(p => p.Move(dest.Combine(p.FileName))).ToArray()); }
public string GetSpecialFolder(Environment.SpecialFolder folder) { var ensureDirectoryExists = integrationTestEnvironmentPath.EnsureDirectoryExists(folder.ToString()); var specialFolderPath = ensureDirectoryExists.ToString(); if (enableTrace) { logger.Trace("GetSpecialFolder: {0}", specialFolderPath); } return(specialFolderPath); }
public CreateEnvironmentOptions(NPath?basePath = null) { NPath path = basePath ?? NPath.SystemTemp.Combine(ApplicationInfo.ApplicationName); path.EnsureDirectoryExists(); Extensionfolder = path.Combine(DefaultExtensionFolder); UserProfilePath = path.Combine(DefaultUserProfilePath); UnityProjectPath = path.Combine(DefaultUnityProjectPathAndRepositoryPath); RepositoryPath = path.Combine(DefaultUnityProjectPathAndRepositoryPath); Extensionfolder.EnsureDirectoryExists(); UserProfilePath.EnsureDirectoryExists(); UnityProjectPath.EnsureDirectoryExists(); }
public static BuildRequest BuildRequestFor(RunnableProgram buildProgram, string dagName, string dagDirectory, bool useScriptUpdater, string projectDirectory, ILPostProcessingProgram ilpp, StdOutMode stdoutMode, RunnableProgram beeBackendProgram = null) { NPath dagDir = dagDirectory ?? "Library/Bee"; RecreateDagDirectoryIfNeeded(dagDir); var performingPlayerBuild = UnityBeeDriverProfilerSession.PerformingPlayerBuild; NPath profilerOutputFile = performingPlayerBuild ? UnityBeeDriverProfilerSession.GetTraceEventsOutputForPlayerBuild() : $"{dagDir}/fullprofile.json"; return(new BuildRequest() { BuildProgram = buildProgram, BackendProgram = beeBackendProgram ?? UnityBeeBackendProgram(stdoutMode), ProjectRoot = projectDirectory, DagName = dagName, BuildStateDirectory = dagDir.EnsureDirectoryExists().ToString(), ProfilerOutputFile = profilerOutputFile.ToString(), // Use a null process name during a player build to avoid writing process metadata. The player profiler will take care of writing the process metadata ProfilerProcessName = performingPlayerBuild ? null : "BeeDriver", SourceFileUpdaters = useScriptUpdater ? new[] { new UnityScriptUpdater(projectDirectory) } : Array.Empty <SourceFileUpdaterBase>(), ProcessSourceFileUpdatersResult = new UnitySourceFileUpdatersResultHandler(), DataForBuildProgram = { () => new ConfigurationData { Il2CppDir = IL2CPPUtils.GetIl2CppFolder(), Il2CppPath = IL2CPPUtils.GetExePath("il2cpp"), UnityLinkerPath = IL2CPPUtils.GetExePath("UnityLinker"), NetCoreRunPath = NetCoreRunProgram.NetCoreRunPath, EditorContentsPath = EditorApplication.applicationContentsPath, Packages = GetPackageInfos(NPath.CurrentDirectory.ToString()), UnityVersion = Application.unityVersion, UnityVersionNumeric = new BeeBuildProgramCommon.Data.Version(Application.unityVersionVer, Application.unityVersionMaj, Application.unityVersionMin), UnitySourceCodePath = Unsupported.IsSourceBuild(false) ? Unsupported.GetBaseUnityDeveloperFolder() : null, AdvancedLicense = PlayerSettings.advancedLicense, Batchmode = InternalEditorUtility.inBatchMode, EmitDataForBeeWhy = (Debug.GetDiagnosticSwitch("EmitDataForBeeWhy").value as bool?) ?? false, NamedPipeOrUnixSocket = ilpp.NamedPipeOrUnixSocket, } } }); }