Commit 1999a990 authored by ArnoldZokas's avatar ArnoldZokas

Implemented distribution package generation

parent d58af394
......@@ -33,4 +33,22 @@
<Exec Command="&quot;E:\dotnet-protobufs\lib\NUnit 2.2.8.0\nunit-console.exe&quot; %(TestContainer.Identity) /xml:$(BuildOutputDirectory)\%(TestContainer.Filename).$(BuildConfiguration).xml" />
</Target>
<Target Name="_PreparePackageComponent">
<Copy SourceFiles="@(DynamicPackageItem)" DestinationFolder="$(BuildOutputDirectory)\%(DynamicPackageItem.TargetDirectory)\%(DynamicPackageItem.RecursiveDir)" />
</Target>
<Target Name="_GeneratePackage">
<ItemGroup><ExistingArchives Include="$(BuildOutputDirectory)\*.zip" /></ItemGroup>
<Delete Files="@(ExistingArchives)" />
<Copy SourceFiles="@(StaticPackageItem)" DestinationFolder="$(BuildOutputDirectory)\%(StaticPackageItem.TargetDirectory)\%(StaticPackageItem.RecursiveDir)" />
<Exec Command="&quot;E:\dotnet-protobufs\lib\7-Zip 9.20\7za.exe&quot; a -tzip $(PackageName) * -r" WorkingDirectory="$(BuildOutputDirectory)" />
<ItemGroup><DirectoriesToDelete Include="$([System.IO.Directory]::GetDirectories('$(BuildOutputDirectory)'))" /></ItemGroup>
<ItemGroup><FilesToDelete Include="$(BuildOutputDirectory)\**\*.*" Exclude="$(BuildOutputDirectory)\$(PackageName)" /></ItemGroup>
<Delete Files="@(FilesToDelete)" />
<RemoveDir Directories="@(DirectoriesToDelete)" ContinueOnError="true" />
</Target>
</Project>
\ No newline at end of file
@ECHO OFF
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Build /p:BuildConfiguration=Debug
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Build;PreparePackageComponent /p:BuildConfiguration=Debug
IF ERRORLEVEL 1 GOTO END
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Build /p:BuildConfiguration=Debug_Silverlight2
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Build;PreparePackageComponent /p:BuildConfiguration=Debug_Silverlight2
IF ERRORLEVEL 1 GOTO END
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Build /p:BuildConfiguration=Release
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Build;PreparePackageComponent /p:BuildConfiguration=Release
IF ERRORLEVEL 1 GOTO END
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Build /p:BuildConfiguration=Release_Silverlight2
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Build;PreparePackageComponent /p:BuildConfiguration=Release_Silverlight2
IF ERRORLEVEL 1 GOTO END
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:GeneratePackage /p:PackageScope=AllBinariesAndSource
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:GeneratePackage /p:PackageName=AllBinariesAndSource.zip
:END
PAUSE
\ No newline at end of file
@ECHO OFF
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Build /p:BuildConfiguration=Release
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Build;PreparePackageComponent /p:BuildConfiguration=Release
IF ERRORLEVEL 1 GOTO END
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Build /p:BuildConfiguration=Release_Silverlight2
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:Build;PreparePackageComponent /p:BuildConfiguration=Release_Silverlight2
IF ERRORLEVEL 1 GOTO END
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:GeneratePackage /p:PackageScope=ReleaseBinaries
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:GeneratePackage /p:PackageName=ReleaseBinaries.zip
:END
PAUSE
\ No newline at end of file
......@@ -7,17 +7,19 @@
<!--Directory Paths-->
<ProjectDirectory>$(MSBuildProjectDirectory)\..</ProjectDirectory>
<SourceDirectory>$(ProjectDirectory)\src</SourceDirectory>
<LibDirectory>$(ProjectDirectory)\lib</LibDirectory>
<ProtosDirectory>$(ProjectDirectory)\protos</ProtosDirectory>
<BuildTempDirectory>$(ProjectDirectory)\build_temp\$(BuildConfiguration)</BuildTempDirectory>
<BuildOutputDirectory>$(ProjectDirectory)\build_output</BuildOutputDirectory>
<BuildOutputDirectory>$(ProjectDirectory)\build_output\$(BuildConfiguration)</BuildOutputDirectory>
<!--File Paths-->
<SolutionFile>$(ProjectDirectory)\src\ProtocolBuffers.sln</SolutionFile>
<SolutionFile>$(SourceDirectory)\ProtocolBuffers.sln</SolutionFile>
<!--Tool Paths-->
<ProtocExePath>$(ProjectDirectory)\lib\protoc.exe</ProtocExePath>
<ProtogenExePath>$(ProjectDirectory)\src\ProtoGen\bin\$(BuildConfiguration)\protogen.exe</ProtogenExePath>
<NUnitExePath>$(ProjectDirectory)\lib\NUnit 2.2.8.0\nunit-console.exe</NUnitExePath>
<ProtocExePath>$(LibDirectory)\protoc.exe</ProtocExePath>
<ProtogenExePath>$(SourceDirectory)\ProtoGen\bin\$(BuildConfiguration)\protogen.exe</ProtogenExePath>
<NUnitExePath>$(LibDirectory)\NUnit 2.2.8.0\nunit-console.exe</NUnitExePath>
</PropertyGroup>
<Import Project="Common.targets"/>
......@@ -68,13 +70,30 @@
<TargetDirectory>$(SourceDirectory)\ProtocolBuffers.Test\TestProtos</TargetDirectory>
</GeneratedSource>
<TestContainer Include="$(ProjectDirectory)\src\ProtocolBuffers.Test\bin\$(BuildConfiguration)\Google.ProtocolBuffers.Test.dll" />
<TestContainer Include="$(ProjectDirectory)\src\ProtoGen.Test\bin\$(BuildConfiguration)\Google.ProtocolBuffers.ProtoGen.Test.dll" />
<TestContainer Include="$(SourceDirectory)\ProtocolBuffers.Test\bin\$(BuildConfiguration)\Google.ProtocolBuffers.Test.dll" />
<TestContainer Include="$(SourceDirectory)\ProtoGen.Test\bin\$(BuildConfiguration)\Google.ProtocolBuffers.ProtoGen.Test.dll" />
<DynamicPackageItem Include="$(SourceDirectory)\ProtocolBuffers\bin\$(BuildConfiguration)\Google.ProtocolBuffers.*" />
<DynamicPackageItem Include="$(SourceDirectory)\ProtoGen\bin\$(BuildConfiguration)\ProtoGen.*" />
<DynamicPackageItem Include="$(SourceDirectory)\ProtoMunge\bin\$(BuildConfiguration)\ProtoMunge.*" />
<DynamicPackageItem Include="$(SourceDirectory)\ProtoDump\bin\$(BuildConfiguration)\ProtoDump.*" />
<DynamicPackageItem Include="$(SourceDirectory)\ProtoBench\bin\$(BuildConfiguration)\ProtoBench.*" />
<StaticPackageItem Include="$(ProjectDirectory)\readme.txt" />
<StaticPackageItem Include="$(ProjectDirectory)\license.txt" />
<StaticPackageItem Include="$(ProjectDirectory)\protos\**\*.*">
<TargetDirectory>\protos</TargetDirectory>
</StaticPackageItem>
<StaticPackageItem Include="$(LibDirectory)\Protoc*">
<TargetDirectory>\Protoc</TargetDirectory>
</StaticPackageItem>
</ItemGroup>
<!-- targets -->
<Target Name="Build" DependsOnTargets="_Compile;_Test" />
<Target Name="RunBenchmarks" DependsOnTargets="_Compile" />
<Target Name="GeneratePackage" />
<Target Name="PreparePackageComponent" DependsOnTargets="_PreparePackageComponent" />
<Target Name="GeneratePackage" DependsOnTargets="_GeneratePackage" />
<Target Name="RunBenchmarks" />
</Project>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment