Opentk/Installers/Zip/Build.Installer.Zip.csproj
2013-01-03 10:41:56 -06:00

82 lines
4.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)' == 'Documentation'">
<OutputPath>.\opentk\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<OutputPath>.\opentk\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<OutputPath>.\opentk\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Nsis'">
<OutputPath>.\opentk\</OutputPath>
</PropertyGroup>
<PropertyGroup>
<ProjectGuid>{ADC34399-7613-44D2-90B2-19250F06FE7B}</ProjectGuid>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<InputPath>..\..\</InputPath>
<OutputPath>.\opentk\</OutputPath>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>10.0.0</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<OutputType>Exe</OutputType>
<AssemblyName>Build.Installer.Zip</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Documentation|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>False</Optimize>
<OutputPath>opentk\</OutputPath>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>False</Optimize>
<OutputPath>opentk\</OutputPath>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>False</Optimize>
<OutputPath>opentk\</OutputPath>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Nsis|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>False</Optimize>
<OutputPath>opentk\</OutputPath>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<Target Name="Build">
<CallTarget Targets="CleanTreeCopy" />
<!-- Make a clean copy of the source tree -->
<CreateItem Include="$(InputPath)**\*.*" Exclude="$(InputPath)**\.svn\**\*.*;&#xD;&#xA; $(InputPath)**\obj\**\*.*;&#xD;&#xA; $(InputPath)Installers\Zip\opentk\**\*.*;&#xD;&#xA; $(InputPath)Documentation\Source\**\*.*;&#xD;&#xA; $(InputPath)Automation\**\*.*;&#xD;&#xA; $(InputPath)Old\**\*.*;&#xD;&#xA; $(InputPath)**\OpenTK*.xml;&#xD;&#xA; $(InputPath)**\*.suo;&#xD;&#xA; $(InputPath)**\*.pidb;&#xD;&#xA; $(InputPath)**\*.userprefs;&#xD;&#xA; $(InputPath)**\opentk*.zip;&#xD;&#xA; $(InputPath)**\opentk*.exe;&#xD;&#xA; $(InputPath)**\vshost*.exe;&#xD;&#xA; ">
<Output TaskParameter="Include" ItemName="FileList" />
</CreateItem>
<Copy SourceFiles="@(FileList)" DestinationFiles="@(FileList-&gt;'$(OutputPath)%(RecursiveDir)%(Filename)%(Extension)')" />
<!-- Zip the copy of the source tree -->
<Exec Command="7z a -tzip opentk.zip $(OutputPath)" />
<!-- Copy the zip file to the root directory and add a date stamp -->
<ReadLinesFromFile File="../../Version.txt">
<Output TaskParameter="Lines" ItemName="Version" />
</ReadLinesFromFile>
<Copy SourceFiles=".\opentk.zip" DestinationFiles="@(Version-&gt;'..\..\opentk-%(Identity).zip')" />
</Target>
<Target Name="Clean">
<CreateItem Include=".\opentk.zip;..\..\opentk-*.zip">
<Output TaskParameter="Include" ItemName="FilesToDelete" />
</CreateItem>
<Delete Files="@(FilesToDelete)" />
<CallTarget Targets="CleanTreeCopy" />
</Target>
<Target Name="Rebuild">
<CallTarget Targets="Clean" />
<CallTarget Targets="Build" />
</Target>
<Target Name="CleanTreeCopy">
<RemoveDir Directories="$(OutputPath)" Condition="$(OS) == 'Windows_NT'" />
<Exec Command="rm -rf '$(OutputPath)'" Condition="$(OS) != 'Windows_NT'" />
</Target>
</Project>