- 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.
This commit is contained in:
Glatzemann 2012-11-14 14:35:58 +00:00 committed by Konstantin Koch
parent a5f4931578
commit 437741acef
4 changed files with 57 additions and 12 deletions

View File

@ -76,7 +76,7 @@ namespace ANX.Framework.Content.Pipeline.Processors
ProcessStartInfo startInfo = new ProcessStartInfo ProcessStartInfo startInfo = new ProcessStartInfo
{ {
FileName = executable, 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, UseShellExecute = false,
RedirectStandardOutput = true, RedirectStandardOutput = true,
CreateNoWindow = true CreateNoWindow = true
@ -117,7 +117,7 @@ namespace ANX.Framework.Content.Pipeline.Processors
return Version.GetHashCode(); 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) if ((debugMode == EffectProcessorDebugMode.Auto && System.Diagnostics.Debugger.IsAttached) || debugMode == EffectProcessorDebugMode.Debug)
{ {
@ -125,7 +125,14 @@ namespace ANX.Framework.Content.Pipeline.Processors
} }
else else
{ {
return "/O3 /Qstrip_debug"; if (targetProfile == "fx_5_0")
{
return "/O3";
}
else
{
return "/O3 /Qstrip_debug";
}
} }
} }

View File

@ -65,7 +65,7 @@
Target="[System64Folder]msiexec.exe" Target="[System64Folder]msiexec.exe"
Arguments="/x [ProductCode]"/> Arguments="/x [ProductCode]"/>
<RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/> <RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\Microsoft\ANX.Framework" Name="installed" Type="integer" Value="1" KeyPath="yes"/> <RegistryValue Root="HKLM" Key="Software\Microsoft\ANX.Framework" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
</Component> </Component>
</DirectoryRef> </DirectoryRef>
</Fragment> </Fragment>
@ -85,6 +85,11 @@
<File Id='license' Name='license.txt' DiskId='1' Source='../doc/license.txt' /> <File Id='license' Name='license.txt' DiskId='1' Source='../doc/license.txt' />
<File Id='anx.framework' Name='ANX.Framework.dll' DiskId='1' Source='../bin/Release/ANX.Framework.dll' /> <File Id='anx.framework' Name='ANX.Framework.dll' DiskId='1' Source='../bin/Release/ANX.Framework.dll' />
<File Id='anx.framework.contentpipeline' Name='ANX.Framework.ContentPipeline.dll' DiskId='1' Source='../bin/Release/ANX.Framework.ContentPipeline.dll' /> <File Id='anx.framework.contentpipeline' Name='ANX.Framework.ContentPipeline.dll' DiskId='1' Source='../bin/Release/ANX.Framework.ContentPipeline.dll' />
<RegistryKey Root="HKLM" Key="Software\Microsoft\.NETFramework\ANX.Framework" Action="createAndRemoveOnUninstall">
<RegistryValue Type="string" Value="[APPLICATIONFOLDER]" />
</RegistryKey>
</Component> </Component>
<Component Id='SharpDX' Guid='{D6D751D7-A339-4DBB-81BC-D9AC084936C5}'> <Component Id='SharpDX' Guid='{D6D751D7-A339-4DBB-81BC-D9AC084936C5}'>
<File Id='sharpdx.d3dcompiler' Name='SharpDX.D3DCompiler.dll' DiskId='1' Source='../lib/SharpDX/Bin/Standard-net20/SharpDX.D3DCompiler.dll' /> <File Id='sharpdx.d3dcompiler' Name='SharpDX.D3DCompiler.dll' DiskId='1' Source='../lib/SharpDX/Bin/Standard-net20/SharpDX.D3DCompiler.dll' />

View File

@ -10,8 +10,10 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>StockShaderCodeGenerator</RootNamespace> <RootNamespace>StockShaderCodeGenerator</RootNamespace>
<AssemblyName>sscg</AssemblyName> <AssemblyName>sscg</AssemblyName>
<TargetFrameworkProfile>Client</TargetFrameworkProfile> <TargetFrameworkProfile>
</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
@ -56,6 +58,9 @@
<Name>ANX.Framework</Name> <Name>ANX.Framework</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="app.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.

View File

@ -24,6 +24,9 @@
<property name="project.anx.psvita" value="false" /> <property name="project.anx.psvita" value="false" />
<property name="project.anx.metro" value="false" /> <property name="project.anx.metro" value="false" />
<property name="project.anx.winrt" value="false" /> <property name="project.anx.winrt" value="false" />
<property name="xna.installed" value="false" />
<property name="xnasdk.installed" value="false" />
<target name="clean" description="Cleans all targets."> <target name="clean" description="Cleans all targets.">
<delete> <delete>
@ -93,17 +96,20 @@
<call target="generate_project_files" /> <call target="generate_project_files" />
</target> </target>
<target name="build"> <target name="build" depends="check_xna">
<echo message="===================================================" /> <echo message="===================================================" />
<echo message="ANX.Framework build script" /> <echo message="ANX.Framework build script" />
<echo message="===================================================" /> <echo message="===================================================" />
<echo message="" /> <echo message="" />
<echo message="Build environment : ${project.anx.build_env}" /> <echo message="Build environment : ${project.anx.build_env}" />
<echo message="Build configuration: ${build.configuration}" /> <echo message="Build configuration : ${build.configuration}" />
<echo message="Target platform : ${project.anx.platform}" /> <echo message="Target platform : ${project.anx.platform}" />
<echo message="Target build dir : ${build.dir.base}" /> <echo message="Target build dir : ${build.dir.base}" />
<echo message="" /> <echo message="" />
<echo message="XNA runtime installed : ${xna.installed}" />
<echo message="XNA game studio installed: ${xnasdk.installed}" />
<echo message="" />
<if test="${project.anx.extended}"> <if test="${project.anx.extended}">
<property name="project.anx.directives" value="${project.anx.directives} XNAEXT" /> <property name="project.anx.directives" value="${project.anx.directives} XNAEXT" />
</if> </if>
@ -125,6 +131,27 @@
<call target="samples" /> <call target="samples" />
</target> </target>
<target name="check_xna" description="checks if the XNA framework is installed" unless="${target::has-executed('check_xna')}">
<property name="xna32" value="0" />
<property name="xna64" value="0" />
<property name="xnasdk32" value="0" />
<property name="xnasdk64" value="0" />
<readregistry property="xna32" key="Software\Microsoft\XNA\Framework\v4.0\Installed" hive="LocalMachine" failonerror="false" />
<readregistry property="xna64" key="Software\Wow6432Node\Microsoft\XNA\Framework\v4.0\Installed" hive="LocalMachine" failonerror="false" />
<if test="${int::parse(xna32) == 1 or int::parse(xna64) == 1}">
<property name="xna.installed" value="true" />
</if>
<readregistry property="xnasdk32" key="Software\Microsoft\XNA\Game Studio\v4.0\Installed" hive="LocalMachine" failonerror="false" />
<readregistry property="xnasdk64" key="Software\Wow6432Node\Microsoft\XNA\Game Studio\v4.0\Installed" hive="LocalMachine" failonerror="false" />
<if test="${int::parse(xnasdk32) == 1 or int::parse(xnasdk64) == 1}">
<property name="xnasdk.installed" value="true" />
</if>
</target>
<target name="anx" description="Build ANX.Framework core" unless="${target::has-executed('anx')}"> <target name="anx" description="Build ANX.Framework core" unless="${target::has-executed('anx')}">
<echo message="building: ANX.Framework" /> <echo message="building: ANX.Framework" />
@ -269,7 +296,8 @@
<target name="samples" description="Build ANX.Framework samples"> <target name="samples" description="Build ANX.Framework samples">
<!-- default windows fileset --> <!-- default windows fileset -->
<fileset id="sample_files" basedir="../Samples/"> <fileset id="sample_files" basedir="../Samples/">
<include name="**/*.csproj" /> <include name="**/*.csproj" unless="${not xnasdk.installed}" />
<include name="**/SimpleNoContent.csproj" />
<exclude name="**/*Kinect*.csproj" /> <exclude name="**/*Kinect*.csproj" />