Some work on build file:

- target platforms are now supported
- generating of project files for target platform
This commit is contained in:
Glatzemann 2012-08-24 08:01:14 +00:00
parent 7f75c22eea
commit 478583c630
4 changed files with 66 additions and 10 deletions

View File

@ -11,13 +11,15 @@
<ProjectGuid>{6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35}</ProjectGuid>
<RootNamespace>ANX.Framework</RootNamespace>
<AssemblyName>ANX.Framework</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<PackageCertificateKeyFile>Test_TemporaryKey.pfx</PackageCertificateKeyFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\bin\Debug\</OutputPath>
<DefineConstants>XNAEXT;DEBUG;TRACE;LINUX;</DefineConstants>
<DefineConstants>;TRACE;DEBUG;XNAEXT;LINUX;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@ -26,7 +28,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\bin\Release\</OutputPath>
<DefineConstants>XNAEXT;TRACE;LINUX;</DefineConstants>
<DefineConstants>;TRACE;XNAEXT;LINUX;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@ -499,7 +501,7 @@
<ItemGroup>
<Folder Include="Content\MediaTypeReaders\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
<!-- 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.
<Target Name="BeforeBuild">
@ -507,4 +509,8 @@
<Target Name="AfterBuild">
</Target>
-->
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '11.0' ">
<VisualStudioVersion>11.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
</Project>

View File

@ -55,7 +55,6 @@ namespace ProjectConverter
foreach (string file in files)
{
string fileExt = Path.GetExtension(file).ToLowerInvariant();
foreach (Converter converter in converters)
{
if (switches.Contains(converter.Postfix.ToLowerInvariant()))

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.02.0.0")]
[assembly: AssemblyFileVersion("1.02.0.0")]

View File

@ -2,13 +2,16 @@
<property name="build.configuration" value="Release" />
<property name="build.platform" value="Any CPU" />
<property name="build.dir" value="../../bin" />
<property name="build.dir.tools" value="../bin" />
<property name="build.solution_dir" value="../" />
<property name="project.anx.path" value="../ANX.Framework" />
<property name="project.anx.name" value="ANX.Framework" />
<property name="project.anx.build_env" value="VS2010" />
<property name="project.anx.win8" value="false" />
<property name="project.anx.platform" value="Windows" />
<property name="project.anx.windows" value="true" />
<property name="project.anx.linux" value="false" />
<property name="project.anx.psvita" value="false" />
<property name="project.anx.metro" value="false" />
@ -49,14 +52,40 @@
<property name="project.anx.build_env" value="VS2011" />
</target>
<target name="windows">
<property name="project.anx.windows" value="true" />
<property name="project.anx.platform" value="Windows" />
</target>
<target name="linux">
<property name="project.anx.linux" value="true" />
<property name="project.anx.platform" value="Linux" />
<call target="generate_project_files" />
</target>
<target name="psvita">
<property name="project.anx.psvita" value="true" />
<property name="project.anx.platform" value="PS Vita" />
<call target="generate_project_files" />
</target>
<target name="metro">
<property name="project.anx.metro" value="false" />
<property name="project.anx.platform" value="Windows 8 / Metro" />
<call target="generate_project_files" />
</target>
<target name="build">
<echo message="===================================================" />
<echo message="ANX.Framework build script" />
<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="Win8 / Metro build: ${project.anx.win8}" />
<echo message="Target platform : ${project.anx.platform}" />
<echo message="" />
<if test="${project.anx.extended}">
@ -358,4 +387,26 @@
</target>
<target name="generate_project_files" depends="tools">
<foreach item="File" property="projectFile">
<in>
<items basedir="../">
<include name="**/${project.anx.name}/*.csproj" />
<exclude name="*/*_Linux.csproj" />
<exclude name="*/*_PSVita.csproj" />
<exclude name="*/*_WindowsMetro.csproj" />
</items>
</in>
<do>
<echo message="create project file: ${projectFile}" />
<exec program="${build.dir.tools}/${build.configuration}/ProjectConverter.exe" >
<arg value="&quot;${projectFile}&quot;" />
<arg value="/linux" if="${project.anx.linux}" />
<arg value="/psvita" if="${project.anx.psvita}" />
<arg value="/windowsmetro" if="${project.anx.metro}" />
</exec>
</do>
</foreach>
</target>
</project>