public void Run()
        {
            LogStage("Generate Stage");
            CurrentConfigs = BuildConfiguration.GetDefaultConfigs();
            Directory.CreateDirectory(GetIntermediateDir());
            GatherModuleFiles();
            PlatformDefinition.Init(Interfaces);

            if (USEPREMAKE)
            {
                gen = new PreMakeGenerator();
            }
            else
            {
                gen = new CmakeGenerator();
            }
            //core module Is Special!
            CoreModule = TargetRulesObject.GetCoreModule();
            for (int i = ALLModules.Count - 1; i >= 0; i--)
            {
                if (ALLModules[i].IsGameModule && ALLModules[i].ModuleName != CoreModule.GameModuleName)
                {
                    ALLModules.RemoveAt(i);
                }
            }
            ALLModules.Add(CoreModule);
            if (LogDebug)
            {
                foreach (ModuleDef M in ALLModules)
                {
                    Console.WriteLine("Found module " + M.ModuleName);
                }
            }
            Projectdata.LibSearchPaths.AddRange(TargetRulesObject.LibSearchPaths);
            PreProcessModules();
            Projectdata.PopulateLibs();
            ProcessModules();
            LogStage("Generate project files stage");
            if (!SettingCache.IsCacheValid())
            {
                gen.ClearCache();
                Console.WriteLine("Cache Is Invalid, clearing...");
            }

            gen.SingleTargetPlatform = PlatformDefinition.GetDefinition(PlatformDefinition.WindowsID);
            gen.GenerateList(ALLModules, CoreModule, CurrentConfigs);
            gen.Execute();
            LogStage("Post Gen");
            gen.RunPostStep(NonCoreModuleObjects, CoreModule);
            LogStage("Copy DLLs");
            FileUtils.CreateShortcut("EngineSolution.sln", GetRootPath(), GetIntermediateDir() + "\\Engine.sln");
            Projectdata.CopyDllsToConfig(PlatformDefinition.GetDefaultPlatforms(), CurrentConfigs, ALLModules);
            LinkDirectiories();
            SettingCache.Save();
            LogStage("Complete");
        }
 public virtual void OnPreMakeCreateModule(ModuleDef n, ref string PremakeFile, GeneratorBase gen)
 {
 }