Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
bf9821e0
Commit
bf9821e0
authored
Apr 03, 2011
by
Jon Skeet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes to package generation, and convert all tabs to spaces in MSBuild files.
parent
ce58e301
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
81 additions
and
80 deletions
+81
-80
Common.targets
build/Common.targets
+75
-74
GenerateCompletePackage.bat
build/GenerateCompletePackage.bat
+4
-4
GenerateReleasePackage.bat
build/GenerateReleasePackage.bat
+2
-2
build.csproj
build/build.csproj
+0
-0
No files found.
build/Common.targets
View file @
bf9821e0
...
...
@@ -10,8 +10,8 @@
</Target>
<Target
Name=
"_Clean"
>
<RemoveDir
Directories=
"@(WorkingDirectories)"
Condition=
"Exists(%(WorkingDirectories.Identity))"
/>
<MakeDir
Directories=
"@(WorkingDirectories)"
/>
<RemoveDir
Directories=
"@(WorkingDirectories)"
Condition=
"Exists(%(WorkingDirectories.Identity))"
/>
<MakeDir
Directories=
"@(WorkingDirectories)"
/>
<MSBuild
Projects=
"$(MSBuildProjectFullPath)"
Properties=
"SolutionTarget=Clean;BuildConfiguration=$(BuildConfiguration)"
Targets=
"_BuildSolution"
ContinueOnError=
"true"
/>
</Target>
...
...
@@ -24,13 +24,13 @@
<MSBuild
Projects=
"$(MSBuildProjectFullPath)"
Properties=
"Step=Two;SolutionTarget=Build;BuildConfiguration=$(BuildConfiguration)"
Targets=
"_BuildSolution"
/>
</Target>
<Target
Name=
"_GenerateSource"
>
<Target
Name=
"_GenerateSource"
>
<Exec
Command=
"$(ProtocExePath) --proto_path=$(ProtosDirectory) --descriptor_set_out=compiled.pb @(Protos->'%(RelativeDir)%(Filename)%(Extension)', ' ')"
WorkingDirectory=
"$(BuildTempDirectory)"
/>
<Exec
Command=
"$(ProtogenExePath) compiled.pb"
WorkingDirectory=
"$(BuildTempDirectory)"
/>
</Target>
<Exec
Command=
"$(ProtogenExePath) compiled.pb"
WorkingDirectory=
"$(BuildTempDirectory)"
/>
</Target>
<Target
Name=
"_CopyGeneratedSource"
DependsOnTargets=
"_GenerateSource"
>
<Copy
SourceFiles=
"%(GeneratedSource.Identity)"
DestinationFiles=
"%(GeneratedSource.TargetDirectory)\%(GeneratedSource.Filename)%(GeneratedSource.Extension)"
/>
<Target
Name=
"_CopyGeneratedSource"
DependsOnTargets=
"_GenerateSource"
>
<Copy
SourceFiles=
"%(GeneratedSource.Identity)"
DestinationFiles=
"%(GeneratedSource.TargetDirectory)\%(GeneratedSource.Filename)%(GeneratedSource.Extension)"
/>
</Target>
<Target
Name=
"_Test"
DependsOnTargets=
"_CompileGeneratedSource"
Condition=
"$(BuildConfiguration)=='Debug' or $(BuildConfiguration)=='Release'"
>
...
...
@@ -38,74 +38,74 @@
</Target>
<Target
Name=
"_RunTests"
>
<Exec
Command=
""$(NUnitExePath)" /noshadow %(TestContainer.Identity) /xml:$(BuildTempDirectory)\..\%(TestContainer.Filename).$(BuildConfiguration).xml"
/>
</Target>
<!--## Package Generation ##-->
<Target
Name=
"_CleanOutputDirectory"
>
<RemoveDir
Directories=
"$(BuildOutputDirectory)
"
ContinueOnError=
"true"
/>
<
MakeDir
Directories=
"$(BuildOutputDirectory)
"
ContinueOnError=
"true"
/>
</Target
>
<Target
Name=
"_PreparePackageComponent"
>
<Copy
SourceFiles=
"@(DynamicPackageItem)"
DestinationFolder=
"$(BuildOutputDirectory)\%(DynamicPackageItem.TargetDirectory)\%(DynamicPackageItem.RecursiveDir)"
/
>
</Target
>
<Target
Name=
"_GeneratePackage"
>
<Copy
SourceFiles=
"@(StaticPackageItem)"
DestinationFolder=
"$(BuildOutputDirectory)\%(StaticPackageItem.TargetDirectory)\%(StaticPackageItem.RecursiveDir)"
/
>
<Exec
Command=
""$(ZipExePath)" a -tzip $(PackageName) * -r"
WorkingDirectory=
"$(BuildOutputDirectory
)"
/>
</Target>
<!--## Benchmark ##-->
<Target
Name=
"_GenerateBenchmarkSource"
DependsOnTargets=
"_Clean;_Compile"
>
<PropertyGroup>
<Args>
$(BenchmarkProtosDirectory)\google_size.proto $(BenchmarkProtosDirectory)\google_speed.proto
</Args>
</PropertyGroup>
<Exec
Command=
"$(ProtocExePath) --proto_path=$(BenchmarkProtosDirectory);$(ProtosDirectory) --include_imports=compiled.pb --descriptor_set_out=compiled.pb $(Args)"
WorkingDirectory=
"$(BuildTempDirectory)"
/>
<Exec
Command=
"$(ProtogenExePath) compiled.pb"
WorkingDirectory=
"$(BuildTempDirectory)"
/>
</Target>
<Target
Name=
"_CompileBenchmarkAssembly"
DependsOnTargets=
"_GenerateBenchmarkSource"
>
<ItemGroup>
<BenchmarkSources
Include=
"$(BuildTempDirectory)\GoogleSizeProtoFile.cs"
/>
<Exec
Command=
""$(NUnitExePath)" /noshadow %(TestContainer.Identity) /xml:$(BuildTempDirectory)\..\%(TestContainer.Filename).$(BuildConfiguration).xml"
/>
</Target>
<!--## Package Generation ##-->
<Target
Name=
"_CleanOutputDirectory"
>
<RemoveDir
Directories=
"$(ProjectDirectory)\build_output\Package
"
ContinueOnError=
"true"
/>
<
RemoveDir
Directories=
"$(ProjectDirectory)\build_output
"
ContinueOnError=
"true"
/>
<MakeDir
Directories=
"$(ProjectDirectory)\build_output"
ContinueOnError=
"true"
/
>
</Target>
<Target
Name=
"_PreparePackageComponent"
>
<Copy
SourceFiles=
"@(DynamicPackageItem)"
DestinationFolder=
"$(ProjectDirectory)\build_output\Package\$(BuildConfiguration)\%(DynamicPackageItem.TargetDirectory)\%(DynamicPackageItem.RecursiveDir)"
/
>
</Target>
<Target
Name=
"_GeneratePackage"
>
<Copy
SourceFiles=
"@(StaticPackageItem)"
DestinationFolder=
"$(ProjectDirectory)\build_output\Package\%(StaticPackageItem.TargetDirectory)\%(StaticPackageItem.RecursiveDir
)"
/>
<Exec
Command=
""$(ZipExePath)" a -tzip ..\$(PackageName) * -r"
WorkingDirectory=
"$(ProjectDirectory)\build_output\Package"
/>
</Target>
<!--## Benchmark ##-->
<Target
Name=
"_GenerateBenchmarkSource"
DependsOnTargets=
"_Clean;_Compile"
>
<PropertyGroup>
<Args>
$(BenchmarkProtosDirectory)\google_size.proto $(BenchmarkProtosDirectory)\google_speed.proto
</Args>
</PropertyGroup>
<Exec
Command=
"$(ProtocExePath) --proto_path=$(BenchmarkProtosDirectory);$(ProtosDirectory) --include_imports=compiled.pb --descriptor_set_out=compiled.pb $(Args)"
WorkingDirectory=
"$(BuildTempDirectory)"
/>
<Exec
Command=
"$(ProtogenExePath) compiled.pb"
WorkingDirectory=
"$(BuildTempDirectory)"
/>
</Target>
<Target
Name=
"_CompileBenchmarkAssembly"
DependsOnTargets=
"_GenerateBenchmarkSource"
>
<ItemGroup>
<BenchmarkSources
Include=
"$(BuildTempDirectory)\GoogleSizeProtoFile.cs"
/>
<BenchmarkSources
Include=
"$(BuildTempDirectory)\GoogleSpeedProtoFile.cs"
/>
<BenchmarkSources
Include=
"$(SourceDirectory)\ProtoBench\Properties\AssemblyInfo.cs"
/>
</ItemGroup>
<Csc
TargetType=
"library"
OutputAssembly=
"$(BuildTempDirectory)\BenchmarkTypes.dll"
Optimize=
"true"
Sources=
"@(BenchmarkSources)"
References=
"$(SourceDirectory)\ProtocolBuffers\bin\$(BuildConfiguration)\Google.ProtocolBuffers.dll"
/>
</Target>
<Target
Name=
"_PrepareBenchmarkEnvironment"
DependsOnTargets=
"_CompileBenchmarkAssembly"
>
<ItemGroup>
<BenchmarkResources
Include=
"$(BenchmarkProtosDirectory)\google_message1.dat"
/>
<BenchmarkResources
Include=
"$(BenchmarkProtosDirectory)\google_message2.dat"
/>
<BenchmarkResources
Include=
"$(SourceDirectory)\ProtocolBuffers\bin\$(BuildConfiguration)\Google.ProtocolBuffers.dll"
/>
<BenchmarkResources
Include=
"$(SourceDirectory)\ProtoBench\bin\$(BuildConfiguration)\ProtoBench.exe"
/>
</ItemGroup>
<Copy
SourceFiles=
"@(BenchmarkResources)"
DestinationFolder=
"$(BuildTempDirectory)"
/>
</Target>
<Target
Name=
"_RunBenchmarks"
DependsOnTargets=
"_PrepareBenchmarkEnvironment"
>
<ItemGroup>
<BenchmarkParameter
Include=
"Google.ProtocolBuffers.ProtoBench.SizeMessage1,BenchmarkTypes"
/>
<BenchmarkParameter
Include=
"google_message1.dat"
/>
<BenchmarkParameter
Include=
"Google.ProtocolBuffers.ProtoBench.SpeedMessage1,BenchmarkTypes"
/>
<BenchmarkParameter
Include=
"google_message1.dat"
/>
<BenchmarkParameter
Include=
"Google.ProtocolBuffers.ProtoBench.SizeMessage2,BenchmarkTypes"
/>
<BenchmarkParameter
Include=
"google_message2.dat"
/>
<BenchmarkParameter
Include=
"Google.ProtocolBuffers.ProtoBench.SpeedMessage2,BenchmarkTypes"
/>
<BenchmarkParameter
Include=
"google_message2.dat"
/>
</ItemGroup>
<PropertyGroup>
<BenchmarkParameterList>
@(BenchmarkParameter)
</BenchmarkParameterList>
<Args>
$(BenchmarkParameterList.Replace(`;`,` `))
</Args>
</PropertyGroup>
<Exec
Command=
""$(ProtoBenchExePath)" @(BenchmarkParameter->'%(Identity)', ' ') > "$(BuildTempDirectory)\..\BenchmarkResults.txt""
WorkingDirectory=
"$(BuildTempDirectory)"
/>
</Target>
</ItemGroup>
<Csc
TargetType=
"library"
OutputAssembly=
"$(BuildTempDirectory)\BenchmarkTypes.dll"
Optimize=
"true"
Sources=
"@(BenchmarkSources)"
References=
"$(SourceDirectory)\ProtocolBuffers\bin\$(BuildConfiguration)\Google.ProtocolBuffers.dll"
/>
</Target>
<Target
Name=
"_PrepareBenchmarkEnvironment"
DependsOnTargets=
"_CompileBenchmarkAssembly"
>
<ItemGroup>
<BenchmarkResources
Include=
"$(BenchmarkProtosDirectory)\google_message1.dat"
/>
<BenchmarkResources
Include=
"$(BenchmarkProtosDirectory)\google_message2.dat"
/>
<BenchmarkResources
Include=
"$(SourceDirectory)\ProtocolBuffers\bin\$(BuildConfiguration)\Google.ProtocolBuffers.dll"
/>
<BenchmarkResources
Include=
"$(SourceDirectory)\ProtoBench\bin\$(BuildConfiguration)\ProtoBench.exe"
/>
</ItemGroup>
<Copy
SourceFiles=
"@(BenchmarkResources)"
DestinationFolder=
"$(BuildTempDirectory)"
/>
</Target>
<Target
Name=
"_RunBenchmarks"
DependsOnTargets=
"_PrepareBenchmarkEnvironment"
>
<ItemGroup>
<BenchmarkParameter
Include=
"Google.ProtocolBuffers.ProtoBench.SizeMessage1,BenchmarkTypes"
/>
<BenchmarkParameter
Include=
"google_message1.dat"
/>
<BenchmarkParameter
Include=
"Google.ProtocolBuffers.ProtoBench.SpeedMessage1,BenchmarkTypes"
/>
<BenchmarkParameter
Include=
"google_message1.dat"
/>
<BenchmarkParameter
Include=
"Google.ProtocolBuffers.ProtoBench.SizeMessage2,BenchmarkTypes"
/>
<BenchmarkParameter
Include=
"google_message2.dat"
/>
<BenchmarkParameter
Include=
"Google.ProtocolBuffers.ProtoBench.SpeedMessage2,BenchmarkTypes"
/>
<BenchmarkParameter
Include=
"google_message2.dat"
/>
</ItemGroup>
<PropertyGroup>
<BenchmarkParameterList>
@(BenchmarkParameter)
</BenchmarkParameterList>
<Args>
$(BenchmarkParameterList.Replace(`;`,` `))
</Args>
</PropertyGroup>
<Exec
Command=
""$(ProtoBenchExePath)" @(BenchmarkParameter->'%(Identity)', ' ') > "$(BuildTempDirectory)\..\BenchmarkResults.txt""
WorkingDirectory=
"$(BuildTempDirectory)"
/>
</Target>
</Project>
\ No newline at end of file
build/GenerateCompletePackage.bat
View file @
bf9821e0
...
...
@@ -2,16 +2,16 @@
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:PrepareOutputDirectory
IF ERRORLEVEL 1 GOTO END
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:
B
uild;PreparePackageComponent /p:BuildConfiguration=Debug /p:Platform="Any CPU"
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:
Reb
uild;PreparePackageComponent /p:BuildConfiguration=Debug /p:Platform="Any CPU"
IF ERRORLEVEL 1 GOTO END
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:
B
uild;PreparePackageComponent /p:BuildConfiguration=Debug_Silverlight2 /p:Platform="Any CPU"
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:
Reb
uild;PreparePackageComponent /p:BuildConfiguration=Debug_Silverlight2 /p:Platform="Any CPU"
IF ERRORLEVEL 1 GOTO END
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:
B
uild;PreparePackageComponent /p:BuildConfiguration=Release /p:Platform="Any CPU"
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:
Reb
uild;PreparePackageComponent /p:BuildConfiguration=Release /p:Platform="Any CPU"
IF ERRORLEVEL 1 GOTO END
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:
B
uild;PreparePackageComponent /p:BuildConfiguration=Release_Silverlight2 /p:Platform="Any CPU"
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:
Reb
uild;PreparePackageComponent /p:BuildConfiguration=Release_Silverlight2 /p:Platform="Any CPU"
IF ERRORLEVEL 1 GOTO END
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:GeneratePackage /p:PackageName=AllBinariesAndSource.zip /p:Platform="Any CPU"
...
...
build/GenerateReleasePackage.bat
View file @
bf9821e0
...
...
@@ -2,10 +2,10 @@
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:PrepareOutputDirectory
IF ERRORLEVEL 1 GOTO END
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:
B
uild;PreparePackageComponent /p:BuildConfiguration=Release /p:Platform="Any CPU"
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:
Reb
uild;PreparePackageComponent /p:BuildConfiguration=Release /p:Platform="Any CPU"
IF ERRORLEVEL 1 GOTO END
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:
B
uild;PreparePackageComponent /p:BuildConfiguration=Release_Silverlight2 /p:Platform="Any CPU"
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:
Reb
uild;PreparePackageComponent /p:BuildConfiguration=Release_Silverlight2 /p:Platform="Any CPU"
IF ERRORLEVEL 1 GOTO END
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild build.csproj /m /t:GeneratePackage /p:PackageName=ReleaseBinaries.zip /p:Platform="Any CPU"
...
...
build/build.csproj
View file @
bf9821e0
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment