// dunno where else to put this public static void PurgeAllCompiled() { var compiledDir = new DirectoryInfo(BasicPaths.PathToCompiled); if (compiledDir.Exists) { foreach (var file in compiledDir.GetFiles()) { file.Delete(); } } var outerCompiledForExportDir = new DirectoryInfo(BasicPaths.PathCombine(BasicPaths.PathToCompiled, "..", "Export")); if (outerCompiledForExportDir.Exists) { foreach (var file in outerCompiledForExportDir.GetFiles()) { file.Delete(); } } var exportDir = new DirectoryInfo(BasicPaths.PathToCompiledForExport); if (exportDir.Exists) { foreach (var file in exportDir.GetFiles()) { file.Delete(); } } }
public static string InitialClojureLoadPath() { var path = BasicPaths.PathToCompiled + Path.PathSeparator + Path.GetFullPath(BasicPaths.PathCombine(BasicPaths.ClojureDllFolder, "..", "Source")) + Path.PathSeparator + BasicPaths.BestGuessDataPath; return(path); }
public static void SetClojureLoadPath() { Util.require("arcadia.internal.compiler"); string clojureDllFolder = BasicPaths.ClojureDllFolder; Environment.SetEnvironmentVariable("CLOJURE_LOAD_PATH", InitialClojureLoadPath() + Path.PathSeparator + RT.var("arcadia.internal.compiler", "loadpath-extension-string").invoke() + Path.PathSeparator + Path.GetFullPath(BasicPaths.PathCombine(clojureDllFolder, "..", "Libraries"))); }
// https://forum.unity.com/threads/postprocessbuild-preprocessbuild.293616/ static string GetDataManagedFolder(BuildTarget target, string pathToBuiltProject) { if (target.ToString().Contains("OSX")) { return(pathToBuiltProject + "/Contents/Resources/Data/Managed/"); } if (target.ToString().Contains("Windows")) { string name = Path.GetFileNameWithoutExtension(pathToBuiltProject); string directory = Path.GetDirectoryName(pathToBuiltProject); return(BasicPaths.PathCombine(directory, name + "_Data", "Managed")); } if (target.ToString().Contains("Linux")) { string name = Path.GetFileNameWithoutExtension(pathToBuiltProject); string directory = Path.GetDirectoryName(pathToBuiltProject); return(BasicPaths.PathCombine(directory, name + "_Data", "Managed")); } UnityEngine.Debug.Log(string.Format("Exported configuration for target {0} not supported. Configuration will not be usable in export.", target)); return(Path.GetDirectoryName(pathToBuiltProject)); }