Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 public LibSearchPath(string p, LibBuildConfig conf, bool IsDll = false, bool IsABS = false)
 {
     Path           = p;
     LibBuildConfig = conf;
     IsLibaryDll    = IsDll;
     ISABS          = IsABS;
 }
Exemplo n.º 3
0
 public static bool IsValidConfig(LibBuildConfig Current, LibBuildConfig other)
 {
     if (Current == LibBuildConfig.General || other == LibBuildConfig.General)
     {
         return(true);
     }
     return(Current == other);
 }
Exemplo n.º 4
0
        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");
        }
Exemplo n.º 5
0
 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);
         }
     }
 }
Exemplo n.º 6
0
 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);
         }
     }
 }
Exemplo n.º 7
0
 public LibNameRef(string name, LibBuildConfig Conf = LibBuildConfig.General, bool IsaDLL = false)
 {
     LibName = name;
     Config  = Conf;
     IsDLL   = IsaDLL;
 }
Exemplo n.º 8
0
 protected void AddLibSearch(ref List <LibSearchPath> target, string folder, LibBuildConfig CFG, bool IsDLL)
 {
     target.Add(new LibSearchPath(ModuleDefManager.GetThirdPartyDir() + ModuleRoot + "\\" + folder, CFG, IsDLL, true));
 }