public bool GetLib(string name, out LibRef Output, LibBuildConfig CFG, bool IsDLL = false) { name = Path.GetFileNameWithoutExtension(name); Output = null; if (IsDLL) { foreach (LibRef r in FoundDLLs) { if (r.Name == name) { Output = r; return(true); } } } else { foreach (LibRef r in FoundLibs) { if (r.Name == name && r.BuildCFg == CFG) { Output = r; return(true); } } } return(false); }
public LibSearchPath(string p, LibBuildConfig conf, bool IsDll = false, bool IsABS = false) { Path = p; LibBuildConfig = conf; IsLibaryDll = IsDll; ISABS = IsABS; }
public static bool IsValidConfig(LibBuildConfig Current, LibBuildConfig other) { if (Current == LibBuildConfig.General || other == LibBuildConfig.General) { return(true); } return(Current == other); }
public static string BCToString(LibBuildConfig config) { switch (config) { case LibBuildConfig.Debug: return("debug"); case LibBuildConfig.Optimized: return("optimized"); case LibBuildConfig.General: return("general"); } return("-1"); }
void AddLibs(List <string> names, LibBuildConfig CFG, bool DLL = false) { foreach (string s in names) { LibNameRef l = new LibNameRef(s, CFG, DLL); if (DLL) { DynamaicLibs.Add(l); } else { StaticLibs.Add(l); } } }
void AddModulePaths(List <string> paths, LibBuildConfig buildconfig, bool DLL) { foreach (string s in paths) { LibRef Newref = new LibRef(); Newref.BuildType = BCToString(buildconfig); Newref.Path = StringUtils.SanitizePath(s); Newref.Name = Path.GetFileNameWithoutExtension(s); Newref.BuildCFg = buildconfig; if (DLL) { FoundDLLs.Add(Newref); } else { FoundLibs.Add(Newref); } } }
public LibNameRef(string name, LibBuildConfig Conf = LibBuildConfig.General, bool IsaDLL = false) { LibName = name; Config = Conf; IsDLL = IsaDLL; }
protected void AddLibSearch(ref List <LibSearchPath> target, string folder, LibBuildConfig CFG, bool IsDLL) { target.Add(new LibSearchPath(ModuleDefManager.GetThirdPartyDir() + ModuleRoot + "\\" + folder, CFG, IsDLL, true)); }