From 437741acef4a86133ef518836733825d2efc945a Mon Sep 17 00:00:00 2001 From: Glatzemann Date: Wed, 14 Nov 2012 14:35:58 +0000 Subject: [PATCH] - DX11 shader generation warnings in sscg are removed - Optimized build script: XNA and XNA Game Studio installations are now recognized and Samples which are using the XNA ContentPipeline are no longer builded if not possible. The build scripts now runs completly on Windows 8. --- .../Processors/HLSLCompiler.cs | 13 ++++-- Installer/anx.wxs | 7 +++- .../StockShaderCodeGenerator.csproj | 7 +++- build/ANX.Framework.build | 42 +++++++++++++++---- 4 files changed, 57 insertions(+), 12 deletions(-) diff --git a/ANX.Framework.Content.Pipeline/Processors/HLSLCompiler.cs b/ANX.Framework.Content.Pipeline/Processors/HLSLCompiler.cs index 5d800152..f85ded14 100644 --- a/ANX.Framework.Content.Pipeline/Processors/HLSLCompiler.cs +++ b/ANX.Framework.Content.Pipeline/Processors/HLSLCompiler.cs @@ -76,7 +76,7 @@ namespace ANX.Framework.Content.Pipeline.Processors ProcessStartInfo startInfo = new ProcessStartInfo { FileName = executable, - Arguments = String.Format("{0} {1} {2} {3}", "/Fo " + tempOutputFile, GetCompilerTargetProfile(targetProfile), GetCompilerDebugFlags(debugMode), tempInputFile), + Arguments = String.Format("{0} {1} {2} {3}", "/Fo " + tempOutputFile, GetCompilerTargetProfile(targetProfile), GetCompilerDebugFlags(debugMode, targetProfile), tempInputFile), UseShellExecute = false, RedirectStandardOutput = true, CreateNoWindow = true @@ -117,7 +117,7 @@ namespace ANX.Framework.Content.Pipeline.Processors return Version.GetHashCode(); } - private string GetCompilerDebugFlags(EffectProcessorDebugMode debugMode) + private string GetCompilerDebugFlags(EffectProcessorDebugMode debugMode, string targetProfile) { if ((debugMode == EffectProcessorDebugMode.Auto && System.Diagnostics.Debugger.IsAttached) || debugMode == EffectProcessorDebugMode.Debug) { @@ -125,7 +125,14 @@ namespace ANX.Framework.Content.Pipeline.Processors } else { - return "/O3 /Qstrip_debug"; + if (targetProfile == "fx_5_0") + { + return "/O3"; + } + else + { + return "/O3 /Qstrip_debug"; + } } } diff --git a/Installer/anx.wxs b/Installer/anx.wxs index 7594502f..95f6401d 100644 --- a/Installer/anx.wxs +++ b/Installer/anx.wxs @@ -65,7 +65,7 @@ Target="[System64Folder]msiexec.exe" Arguments="/x [ProductCode]"/> - + @@ -85,6 +85,11 @@ + + + + + diff --git a/Tools/StockShaderCodeGenerator/StockShaderCodeGenerator.csproj b/Tools/StockShaderCodeGenerator/StockShaderCodeGenerator.csproj index 0d5afd6b..a1790093 100644 --- a/Tools/StockShaderCodeGenerator/StockShaderCodeGenerator.csproj +++ b/Tools/StockShaderCodeGenerator/StockShaderCodeGenerator.csproj @@ -10,8 +10,10 @@ Properties StockShaderCodeGenerator sscg - Client + + 512 + v4.0 x86 @@ -56,6 +58,9 @@ ANX.Framework + + + - + +