public void Run() { string cppOutputDirectoryInStagingArea = this.GetCppOutputDirectoryInStagingArea(); string fullPath = Path.GetFullPath(Path.Combine(this.m_StagingAreaData, "Managed")); string[] files = Directory.GetFiles(fullPath); for (int i = 0; i < files.Length; i++) { string fileName = files[i]; FileInfo fileInfo = new FileInfo(fileName); fileInfo.IsReadOnly = false; } AssemblyStripper.StripAssemblies(this.m_StagingAreaData, this.m_PlatformProvider, this.m_RuntimeClassRegistry); FileUtil.CreateOrCleanDirectory(cppOutputDirectoryInStagingArea); if (this.m_ModifyOutputBeforeCompile != null) { this.m_ModifyOutputBeforeCompile(cppOutputDirectoryInStagingArea); } this.ConvertPlayerDlltoCpp(this.GetUserAssembliesToConvert(fullPath), cppOutputDirectoryInStagingArea, fullPath); INativeCompiler nativeCompiler = this.m_PlatformProvider.CreateNativeCompiler(); if (nativeCompiler != null && this.m_PlatformProvider.CreateIl2CppNativeCodeBuilder() == null) { string outFile = this.OutputFileRelativePath(); List <string> list = new List <string>(this.m_PlatformProvider.includePaths); list.Add(cppOutputDirectoryInStagingArea); this.m_PlatformProvider.CreateNativeCompiler().CompileDynamicLibrary(outFile, NativeCompiler.AllSourceFilesIn(cppOutputDirectoryInStagingArea), list, this.m_PlatformProvider.libraryPaths, new string[0]); } }
public void Run() { string cppOutputDirectoryInStagingArea = this.GetCppOutputDirectoryInStagingArea(); string fullPath = Path.GetFullPath(Path.Combine(this.m_StagingAreaData, "Managed")); string[] files = Directory.GetFiles(fullPath); for (int i = 0; i < files.Length; i++) { string fileName = files[i]; FileInfo fileInfo = new FileInfo(fileName); fileInfo.IsReadOnly = false; } this.PatchAssemblies(); this.StripAssemblies(this.GetUserAssemblies(fullPath), fullPath); this.ConvertPlayerDlltoCpp(this.GetUserAssembliesOrUnityEngine(fullPath), cppOutputDirectoryInStagingArea, fullPath); if (this.m_ModifyOutputBeforeCompile != null) { this.m_ModifyOutputBeforeCompile(cppOutputDirectoryInStagingArea); } INativeCompiler nativeCompiler = this.m_PlatformProvider.CreateNativeCompiler(); if (nativeCompiler != null) { string text = Path.Combine(this.m_StagingAreaData, "Native"); Directory.CreateDirectory(text); text = Path.Combine(text, this.m_PlatformProvider.nativeLibraryFileName); List <string> list = new List <string>(this.m_PlatformProvider.includePaths); list.Add(cppOutputDirectoryInStagingArea); this.m_PlatformProvider.CreateNativeCompiler().CompileDynamicLibrary(text, NativeCompiler.AllSourceFilesIn(cppOutputDirectoryInStagingArea), list, this.m_PlatformProvider.libraryPaths, new string[0]); } }