public override void RunPostStep(List <ModuleDef> Modules, ModuleDef CoreModule) { VisualStudioProjectEditor.EnableUnityBuild(CoreModule); foreach (ModuleDef m in Modules) { VisualStudioProjectEditor.EnableUnityBuild(m); VisualStudioProjectEditor.ProcessFile(m); VisualStudioProjectEditor.ReplaceAllModule(m, "$(Console_Libs).lib", "$(Console_Libs)"); } VisualStudioProjectEditor.ReplaceAllModule(CoreModule, "$(Console_Libs).lib", "$(Console_Libs)"); //foreach (BuildConfig bc in ModuleDefManager.CurrentConfigs) //{ // string path = StringUtils.SanitizePath(ModuleDefManager.GetBinPath()/* + "\\" + PD.Name*/ + "\\" + bc.Name + "\\"); // VisualStudioProjectEditor.SetTargetOutput(BuildAllTarget, path, CoreModule.OutputObjectName, bc.Name); //} }
public override void RunPostStep(List <ModuleDef> Modules, ModuleDef CoreModule) { string replacement = " Win64|x64"; string ConfigToken = "</Configuration>"; string ConfigreplaceToken = " Win64</Configuration>"; VisualStudioProjectEditor.EnableUnityBuild(CoreModule); VisualStudioProjectEditor.ReplaceAllModule(CoreModule, "|x64", replacement); VisualStudioProjectEditor.ReplaceAllModule(CoreModule, ConfigToken, ConfigreplaceToken); foreach (ModuleDef m in Modules) { VisualStudioProjectEditor.EnableUnityBuild(m); VisualStudioProjectEditor.ProcessFile(m); VisualStudioProjectEditor.ReplaceAllModule(m, "|x64", replacement); VisualStudioProjectEditor.ReplaceAllModule(m, ConfigToken, ConfigreplaceToken); } string buildall = ModuleDefManager.GetIntermediateDir() + "\\ALL_Build.vcxproj"; VisualStudioProjectEditor.ReplaceAll(buildall, "|x64", replacement); VisualStudioProjectEditor.ReplaceAll(buildall, ConfigToken, ConfigreplaceToken); string HeaderTool = ModuleDefManager.GetIntermediateDir() + "\\HeaderTool.vcxproj"; VisualStudioProjectEditor.ReplaceAll(HeaderTool, "|x64", replacement); VisualStudioProjectEditor.ReplaceAll(HeaderTool, ConfigToken, ConfigreplaceToken); string SLNpath = ModuleDefManager.GetIntermediateDir() + "\\Engine.sln"; foreach (BuildConfig bc in ModuleDefManager.CurrentConfigs) { string token = "|x64.ActiveCfg = " + bc.Name + "|x64"; string repalcementtoken = "|Win64.ActiveCfg = " + bc.Name + " Win64|x64"; VisualStudioProjectEditor.ReplaceAll(SLNpath, token, repalcementtoken); token = "|x64.Build.0 = " + bc.Name + "|x64"; repalcementtoken = "|Win64.Build.0 = " + bc.Name + " Win64|x64"; VisualStudioProjectEditor.ReplaceAll(SLNpath, token, repalcementtoken); token = "|x64 = " + bc.Name + "|x64"; repalcementtoken = "|Win64 = " + bc.Name + "|Win64"; VisualStudioProjectEditor.ReplaceAll(SLNpath, token, repalcementtoken); } if (UseAllBuildWorkAround) { foreach (BuildConfig bc in ModuleDefManager.CurrentConfigs) { string path = StringUtils.SanitizePath(ModuleDefManager.GetBinPath() + "\\" + bc.Name + "\\"); VisualStudioProjectEditor.SetTargetOutput(BuildAllTarget, path, CoreModule.OutputObjectName, bc.Name); } } }