diff --git a/vsprojects/coapp/zlib/README.md b/vsprojects/coapp/zlib/README.md new file mode 100644 index 00000000000..c81a57a48be --- /dev/null +++ b/vsprojects/coapp/zlib/README.md @@ -0,0 +1,35 @@ +Zlib Native Nuget package +------------------------- + +Uses [CoApp](http://coapp.org/) project to build the zlib package. + +Prerequisites +------------- +Multiple versions of VS installed to be able to build all the targets: +* Visual Studio 2013 +* Visual Studio 2010 (you might need SP1 to prevent LNK1123 error) + +CoApp toolkit: http://downloads.coapp.org/files/CoApp.Tools.Powershell.msi + +More details on installation: http://coapp.org/tutorials/installation.html + +Building +-------- + +Build all flavors of zlib library using the provided batch file. +``` +buildall.bat +``` + +Then, create NuGet package using powershell (you'll need the CoApp toolkit installed): +``` +[THIS_DIRECTORY]> Write-NuGetPackage grpc.dependencies.zlib.autopkg +``` + +This will create three NuGet packages: +* the main dev package +* the redistributable package that contains just the binaries and no headers +* the symbols package (debug symbols) + +Later, you can push the package to NuGet.org repo. +Attention: before pusing the resulting nuget package to public nuget repo, you have to be 100% sure it works correctly - there’s no way how to delete or update an already existing package. \ No newline at end of file diff --git a/vsprojects/coapp/zlib/buildall.bat b/vsprojects/coapp/zlib/buildall.bat new file mode 100644 index 00000000000..a71e56f4ae0 --- /dev/null +++ b/vsprojects/coapp/zlib/buildall.bat @@ -0,0 +1,51 @@ +@echo off +setlocal + +setlocal +call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64 +call :build x64 Release v120 || goto :eof +call :build x64 Debug v120 || goto :eof +endlocal + +setlocal +call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86 +call :build Win32 Release v120 || goto :eof +call :build Win32 Debug v120 || goto :eof +endlocal + +REM setlocal +REM call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" amd64 +REM call :build x64 Release v110 || goto :eof +REM call :build x64 Debug v110 || goto :eof +REM endlocal + +REM setlocal +REM call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86 +REM call :build Win32 Release v110 || goto :eof +REM call :build Win32 Debug v110 || goto :eof +REM endlocal + +REM setlocal +REM call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" amd64 +REM call :build x64 Release v100 || goto :eof +REM call :build x64 Debug v100 || goto :eof +REM endlocal + +setlocal +call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 +call :build Win32 Release v100 || goto :eof +call :build Win32 Debug v100 || goto :eof +endlocal + +goto :eof + +:build +msbuild /P:Platform=%1 /P:Configuration=%2 /P:PlatformToolset=%3 /P:UsesConfigurationType=Dynamic /P:CallingConvention=cdecl .\zlib.sln || goto :eof +msbuild /P:Platform=%1 /P:Configuration=%2 /P:PlatformToolset=%3 /P:UsesConfigurationType=Dynamic /P:CallingConvention=stdcall .\zlib.sln || goto :eof +msbuild /P:Platform=%1 /P:Configuration=%2 /P:PlatformToolset=%3 /P:UsesConfigurationType=Static /P:CallingConvention=cdecl .\zlib.sln || goto :eof +msbuild /P:Platform=%1 /P:Configuration=%2 /P:PlatformToolset=%3 /P:UsesConfigurationType=Static /P:CallingConvention=stdcall .\zlib.sln || goto :eof +msbuild /P:Platform=%1 /P:Configuration=%2 /P:PlatformToolset=%3 /P:UsesConfigurationType=ltcg /P:CallingConvention=cdecl .\zlib.sln || goto :eof +msbuild /P:Platform=%1 /P:Configuration=%2 /P:PlatformToolset=%3 /P:UsesConfigurationType=ltcg /P:CallingConvention=stdcall .\zlib.sln || goto :eof +goto :eof + + diff --git a/vsprojects/coapp/zlib/grpc.dependencies.zlib.autopkg b/vsprojects/coapp/zlib/grpc.dependencies.zlib.autopkg new file mode 100644 index 00000000000..01390b94346 --- /dev/null +++ b/vsprojects/coapp/zlib/grpc.dependencies.zlib.autopkg @@ -0,0 +1,102 @@ +@import @"version.inc"; + +configurations { +}; + +#define { + package-id = "grpc.dependencies.zlib"; +} + +nuget { + // the nuspec file metadata. Gets created/updated on build + nuspec { + id = ${package-id}; + version : ${package-version}; + title: gRPC Native Dependency: ZLib compression library; + authors: {Jean-loup Gailly, Mark Adler, Garrett Serack, Tim Rogers}; + owners: {Jan Tattermusch}; + licenseUrl: "http://zlib.net/zlib-license.html"; + projectUrl: "http://github.com/jtattermusch/zlib"; + iconUrl: "http://zlib.net/images/zlib3d-b1.png"; + requireLicenseAcceptance:false; + summary:A zlib library; + description: @"A native zlib library. + zlib homepage: http://zlib.net"; + releaseNotes: "Release of zlib 1.2.8 libraries."; + copyright: Copyright 2013; + tags: { zlib, native, CoApp }; + + }; + + // the files that go into the content folders + // (inserted into the nuspec file) + files { + // .targets file that are applied when redist package is installed from a managed project. + managed_build: { + #output { + package = redist; + }; + #destination = "\build\portable-net45"; + "managed_targets\${package-id}.redist.props"; + "managed_targets\${package-id}.redist.targets"; + }; + + include: { ..\..\..\third_party\zlib\zlib.h, ..\..\..\third_party\zlib\zconf.h }; + + docs: { ..\..\..\third_party\zlib\doc\**\* }; + + source += { + "..\..\..\third_party\zlib\adler32.c", + "..\..\..\third_party\zlib\compress.c", + "..\..\..\third_party\zlib\crc32.c", + "..\..\..\third_party\zlib\deflate.c", + "..\..\..\third_party\zlib\gzclose.c", + "..\..\..\third_party\zlib\gzlib.c", + "..\..\..\third_party\zlib\gzread.c", + "..\..\..\third_party\zlib\gzwrite.c", + "..\..\..\third_party\zlib\infback.c", + "..\..\..\third_party\zlib\inffast.c", + "..\..\..\third_party\zlib\inflate.c", + "..\..\..\third_party\zlib\inftrees.c", + "..\..\..\third_party\zlib\trees.c", + "..\..\..\third_party\zlib\uncompr.c", + "..\..\..\third_party\zlib\zutil.c", + "..\..\..\third_party\zlib\crc32.h", + "..\..\..\third_party\zlib\deflate.h", + "..\..\..\third_party\zlib\gzguts.h", + "..\..\..\third_party\zlib\inffast.h", + "..\..\..\third_party\zlib\inffixed.h", + "..\..\..\third_party\zlib\inflate.h", + "..\..\..\third_party\zlib\inftrees.h", + "..\..\..\third_party\zlib\trees.h", + "..\..\..\third_party\zlib\zconf.h", + "..\..\..\third_party\zlib\zlib.h", + "..\..\..\third_party\zlib\zutil.h", + "..\..\..\third_party\zlib\contrib\masmx64\inffas8664.c", + }; + ("v100,v120", "Win32,x64", "Release,Debug", "Dynamic", "cdecl,stdcall", "MultiByte") => { + [${0},${1},${2},${3},${4}] { + lib: { .\output\${0}\${1}\${2}\${3}\${4}\${5}\*.lib }; + bin: { .\output\${0}\${1}\${2}\${3}\${4}\${5}\*.dll }; + symbols: { .\output\${0}\${1}\${2}\${3}\${4}\${5}\*.pdb }; + }; + }; + ("v100,v120", "Win32,x64", "Release,Debug", "Static,ltcg", "cdecl,stdcall", "MultiByte") => { + [${0},${1},${2},${3},${4}] { + lib: { .\output\${0}\${1}\${2}\${3}\${4}\${5}\*.lib }; + }; + }; + + }; + + // the VC++ .targets file that gets generated and inserted into the ${d_content} folder + targets { + Defines += HAS_ZLIB; + [dynamic] + Defines += ZLIB_DLL; + [stdcall] + Defines += ZLIB_WINAPI; + + }; +} + diff --git a/vsprojects/coapp/zlib/managed_targets/grpc.dependencies.zlib.redist.props b/vsprojects/coapp/zlib/managed_targets/grpc.dependencies.zlib.redist.props new file mode 100644 index 00000000000..bcb37de0f7f --- /dev/null +++ b/vsprojects/coapp/zlib/managed_targets/grpc.dependencies.zlib.redist.props @@ -0,0 +1,13 @@ + + + + + true + + + v120 + Win32 + Debug + cdecl + + \ No newline at end of file diff --git a/vsprojects/coapp/zlib/managed_targets/grpc.dependencies.zlib.redist.targets b/vsprojects/coapp/zlib/managed_targets/grpc.dependencies.zlib.redist.targets new file mode 100644 index 00000000000..f00d97dc361 --- /dev/null +++ b/vsprojects/coapp/zlib/managed_targets/grpc.dependencies.zlib.redist.targets @@ -0,0 +1,14 @@ + + + + + + + + PreserveNewest + + + + + + \ No newline at end of file diff --git a/vsprojects/coapp/zlib/version.inc b/vsprojects/coapp/zlib/version.inc new file mode 100644 index 00000000000..1f893a49514 --- /dev/null +++ b/vsprojects/coapp/zlib/version.inc @@ -0,0 +1 @@ +#define { package-version : 1.2.8.9; } diff --git a/vsprojects/coapp/zlib/zlib.sln b/vsprojects/coapp/zlib/zlib.sln new file mode 100644 index 00000000000..7c38e6e1215 --- /dev/null +++ b/vsprojects/coapp/zlib/zlib.sln @@ -0,0 +1,26 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "zlib.vcxproj", "{63BED288-E8C3-4345-B84D-2E64598DCF3A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + Debug|x64 = Debug|x64 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {63BED288-E8C3-4345-B84D-2E64598DCF3A}.Debug|Win32.ActiveCfg = Debug|Win32 + {63BED288-E8C3-4345-B84D-2E64598DCF3A}.Debug|Win32.Build.0 = Debug|Win32 + {63BED288-E8C3-4345-B84D-2E64598DCF3A}.Release|Win32.ActiveCfg = Release|Win32 + {63BED288-E8C3-4345-B84D-2E64598DCF3A}.Release|Win32.Build.0 = Release|Win32 + {63BED288-E8C3-4345-B84D-2E64598DCF3A}.Debug|x64.ActiveCfg = Debug|x64 + {63BED288-E8C3-4345-B84D-2E64598DCF3A}.Debug|x64.Build.0 = Debug|x64 + {63BED288-E8C3-4345-B84D-2E64598DCF3A}.Release|x64.ActiveCfg = Release|x64 + {63BED288-E8C3-4345-B84D-2E64598DCF3A}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/vsprojects/coapp/zlib/zlib.vcxproj b/vsprojects/coapp/zlib/zlib.vcxproj new file mode 100644 index 00000000000..56df39a2483 --- /dev/null +++ b/vsprojects/coapp/zlib/zlib.vcxproj @@ -0,0 +1,147 @@ + + + + $(registry:HKEY_LOCAL_MACHINE\Software\Outercurve\CoApp.Powershell\etc) + + + false + + + + + v120 + + + + + + + + {63BED288-E8C3-4345-B84D-2E64598DCF3A} + $(MSBuildProjectName) + + 1 + + + DynamicLibrary + + + _CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS; + $(Defines);ZLIB_WINAPI; + $(Defines);ZLIB_DLL; + $(Defines);IOWIN32_USING_WINRT_API=1; + $(Defines);IOWIN32_USING_WINRT_API=0; + $(Defines);ASMV;ASMINF; + $(Defines);WIN64; + + + ..\..\..\third_party\zlib; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $(ProjectRootDir)Output/$(PlatformToolset)/$(Platform)/$(Configuration)/$(UsesConfigurationType)/$(CallingConvention)/$(CharacterSet)/$(AppContainer)/$(UseASM)/ + $(ProjectRootDir)Intermediate/$(TargetName)/$(PlatformToolset)/$(Platform)/$(Configuration)/$(UsesConfigurationType)/$(CallingConvention)/$(CharacterSet)/$(AppContainer)/$(UseASM)/ + + + + + true + + + 0x5A4C0000 + + + + + + $(IntDir)gvmat64.lst + Build + $(IntDir)gvmat64.obj + + + $(IntDir)inffasx64.lst + Build + $(IntDir)inffasx64.obj + + + $(IntDir)inffas32.lst + Build + true + /coff %(AdditionalOptions) + $(IntDir)inffas32.obj + + + $(IntDir)match686.lst + Build + true + /coff %(AdditionalOptions) + $(IntDir)match686.obj + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +