public void ApplyMod(string pbxmod) { XCMod mod = new XCMod(pbxmod); if (mod.libs != null) { foreach (var lib in mod.libs) { Debug.Log("Library: " + lib); } } ApplyMod(mod); }
public void ApplyMod( XCMod mod ) { PBXGroup modGroup = this.GetGroup( mod.group ); if (mod.libs != null) { Debug.Log("Adding libraries..."); foreach (XCModFile libRef in mod.libs) { string completeLibPath = CombinePaths("usr/lib", libRef.filePath); Debug.Log("Adding library " + completeLibPath); this.AddFile(completeLibPath, "", modGroup, "SDKROOT", true, libRef.isWeak); } } if (mod.frameworks != null) { Debug.Log("Adding frameworks..."); PBXGroup frameworkGroup = this.GetGroup("Frameworks"); foreach (string framework in mod.frameworks) { string[] filename = framework.Split(':'); bool isWeak = (filename.Length > 1); string completePath = CombinePaths("System/Library/Frameworks", filename[0]); this.AddFile(completePath, "", frameworkGroup, "SDKROOT", true, isWeak); } } if (mod.files != null) { Debug.Log("Adding files..."); foreach (XCModFile file in mod.files) { string absoluteFilePath = CombinePaths(mod.path, file.filePath); this.AddFile(absoluteFilePath, file.fileFlags, modGroup); } } if (mod.folders != null) { Debug.Log("Adding folders..."); foreach (string folderPath in mod.folders) { string absoluteFolderPath = CombinePaths(Application.dataPath, folderPath); Debug.Log("Adding folder " + absoluteFolderPath); this.AddFolder(absoluteFolderPath,null, modGroup, (string[]) mod.excludes.ToArray(typeof (string))); } } if (mod.headerpaths != null) { Debug.Log("Adding headerpaths..."); foreach (string headerpath in mod.headerpaths) { if (headerpath.Contains("$(inherited)")) { Debug.Log("not prepending a path to " + headerpath); this.AddHeaderSearchPaths(headerpath); } else { string absoluteHeaderPath = CombinePaths(mod.path, headerpath); this.AddHeaderSearchPaths(absoluteHeaderPath); } } } if (mod.compiler_flags != null) { Debug.Log("Adding compiler flags..."); foreach (string flag in mod.compiler_flags) { this.AddOtherCFlags(flag); } } if (mod.linker_flags != null) { Debug.Log("Adding linker flags..."); foreach (string flag in mod.linker_flags) { this.AddOtherLinkerFlags(flag); } } this.Consolidate(); }
public void ApplyMod( string pbxmod ) { XCMod mod = new XCMod( pbxmod ); if (mod.libs != null) { foreach (var lib in mod.libs) { Debug.Log("Library: " + lib); } } ApplyMod(mod); }
public void ApplyMod(XCMod mod) { PBXGroup modGroup = this.GetGroup(mod.group); if (mod.libs != null) { Debug.Log("Adding libraries..."); foreach (XCModFile libRef in mod.libs) { string completeLibPath = CombinePaths("usr/lib", libRef.filePath); Debug.Log("Adding library " + completeLibPath); this.AddFile(completeLibPath, "", modGroup, "SDKROOT", true, libRef.isWeak); } } if (mod.frameworks != null) { Debug.Log("Adding frameworks..."); PBXGroup frameworkGroup = this.GetGroup("Frameworks"); foreach (string framework in mod.frameworks) { string[] filename = framework.Split(':'); bool isWeak = (filename.Length > 1); string completePath = CombinePaths("System/Library/Frameworks", filename[0]); this.AddFile(completePath, "", frameworkGroup, "SDKROOT", true, isWeak); } } if (mod.files != null) { Debug.Log("Adding files..."); foreach (XCModFile file in mod.files) { string absoluteFilePath = CombinePaths(mod.path, file.filePath); this.AddFile(absoluteFilePath, file.fileFlags, modGroup); } } if (mod.folders != null) { Debug.Log("Adding folders..."); foreach (XCModFolder folder in mod.folders) { string absoluteFolderPath = CombinePaths(mod.path, folder.folderPath); Debug.Log("Adding folder " + absoluteFolderPath); this.AddFolder(absoluteFolderPath, null, modGroup, (string[])mod.excludes.ToArray(typeof(string))); } } if (mod.headerpaths != null) { Debug.Log("Adding headerpaths..."); foreach (string headerpath in mod.headerpaths) { if (headerpath.Contains("$(inherited)")) { Debug.Log("not prepending a path to " + headerpath); this.AddHeaderSearchPaths(headerpath); } else { string absoluteHeaderPath = CombinePaths(mod.path, headerpath); this.AddHeaderSearchPaths(absoluteHeaderPath); } } } if (mod.compiler_flags != null) { Debug.Log("Adding compiler flags..."); foreach (string flag in mod.compiler_flags) { this.AddOtherCFlags(flag); } } if (mod.linker_flags != null) { Debug.Log("Adding linker flags..."); foreach (string flag in mod.linker_flags) { this.AddOtherLinkerFlags(flag); } } this.Consolidate(); }