From 18e2202fb568d8488e1e63eb6f9bd22baca012b3 Mon Sep 17 00:00:00 2001
From: Jan Tattermusch <jtattermusch@google.com>
Date: Mon, 28 Sep 2015 17:20:03 -0700
Subject: [PATCH] customize the coapp scripts for zlib

---
 vsprojects/{copkg => coapp}/zlib/README.md    |  0
 vsprojects/{copkg => coapp}/zlib/buildall.bat |  0
 .../zlib/grpc.dependencies.zlib.autopkg       | 62 +++++++++----------
 .../grpc.dependencies.zlib.redist.props       |  0
 .../grpc.dependencies.zlib.redist.targets     |  0
 vsprojects/{copkg => coapp}/zlib/version.inc  |  0
 vsprojects/{copkg => coapp}/zlib/zlib.sln     |  0
 vsprojects/{copkg => coapp}/zlib/zlib.vcxproj | 56 +++++++----------
 8 files changed, 53 insertions(+), 65 deletions(-)
 rename vsprojects/{copkg => coapp}/zlib/README.md (100%)
 rename vsprojects/{copkg => coapp}/zlib/buildall.bat (100%)
 rename vsprojects/{copkg => coapp}/zlib/grpc.dependencies.zlib.autopkg (57%)
 rename vsprojects/{copkg => coapp}/zlib/managed_targets/grpc.dependencies.zlib.redist.props (100%)
 rename vsprojects/{copkg => coapp}/zlib/managed_targets/grpc.dependencies.zlib.redist.targets (100%)
 rename vsprojects/{copkg => coapp}/zlib/version.inc (100%)
 rename vsprojects/{copkg => coapp}/zlib/zlib.sln (100%)
 rename vsprojects/{copkg => coapp}/zlib/zlib.vcxproj (75%)

diff --git a/vsprojects/copkg/zlib/README.md b/vsprojects/coapp/zlib/README.md
similarity index 100%
rename from vsprojects/copkg/zlib/README.md
rename to vsprojects/coapp/zlib/README.md
diff --git a/vsprojects/copkg/zlib/buildall.bat b/vsprojects/coapp/zlib/buildall.bat
similarity index 100%
rename from vsprojects/copkg/zlib/buildall.bat
rename to vsprojects/coapp/zlib/buildall.bat
diff --git a/vsprojects/copkg/zlib/grpc.dependencies.zlib.autopkg b/vsprojects/coapp/zlib/grpc.dependencies.zlib.autopkg
similarity index 57%
rename from vsprojects/copkg/zlib/grpc.dependencies.zlib.autopkg
rename to vsprojects/coapp/zlib/grpc.dependencies.zlib.autopkg
index 015103ba2f..01390b9434 100644
--- a/vsprojects/copkg/zlib/grpc.dependencies.zlib.autopkg
+++ b/vsprojects/coapp/zlib/grpc.dependencies.zlib.autopkg
@@ -41,42 +41,38 @@ nuget {
 		  "managed_targets\${package-id}.redist.targets";
 		};
 	
-		include: { ..\..\zlib.h, ..\..\zconf.h };
+		include: { ..\..\..\third_party\zlib\zlib.h, ..\..\..\third_party\zlib\zconf.h };
 
-		docs: {  ..\..\doc\**\* };
+		docs: {  ..\..\..\third_party\zlib\doc\**\* };
         
         source += {
-            "..\..\adler32.c",
-            "..\..\compress.c",
-            "..\..\crc32.c",
-            "..\..\deflate.c",
-            "..\..\gzclose.c",
-            "..\..\gzlib.c",
-            "..\..\gzread.c",
-            "..\..\gzwrite.c",
-            "..\..\infback.c",
-            "..\..\inffast.c",
-            "..\..\inflate.c",
-            "..\..\inftrees.c",
-            "..\..\trees.c",
-            "..\..\uncompr.c",
-            "..\..\zutil.c",
-            "..\..\crc32.h",
-            "..\..\deflate.h",
-            "..\..\gzguts.h",
-            "..\..\inffast.h",
-            "..\..\inffixed.h",
-            "..\..\inflate.h",
-            "..\..\inftrees.h",
-            "..\..\trees.h",
-            "..\..\zconf.h",
-            "..\..\zlib.h",
-            "..\..\zutil.h",
-            "..\masmx64\inffas8664.c",
-            "..\minizip\ioapi.c",
-            "..\minizip\iowin32.c",
-            "..\minizip\unzip.c",
-            "..\minizip\zip.c",
+            "..\..\..\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}] {
diff --git a/vsprojects/copkg/zlib/managed_targets/grpc.dependencies.zlib.redist.props b/vsprojects/coapp/zlib/managed_targets/grpc.dependencies.zlib.redist.props
similarity index 100%
rename from vsprojects/copkg/zlib/managed_targets/grpc.dependencies.zlib.redist.props
rename to vsprojects/coapp/zlib/managed_targets/grpc.dependencies.zlib.redist.props
diff --git a/vsprojects/copkg/zlib/managed_targets/grpc.dependencies.zlib.redist.targets b/vsprojects/coapp/zlib/managed_targets/grpc.dependencies.zlib.redist.targets
similarity index 100%
rename from vsprojects/copkg/zlib/managed_targets/grpc.dependencies.zlib.redist.targets
rename to vsprojects/coapp/zlib/managed_targets/grpc.dependencies.zlib.redist.targets
diff --git a/vsprojects/copkg/zlib/version.inc b/vsprojects/coapp/zlib/version.inc
similarity index 100%
rename from vsprojects/copkg/zlib/version.inc
rename to vsprojects/coapp/zlib/version.inc
diff --git a/vsprojects/copkg/zlib/zlib.sln b/vsprojects/coapp/zlib/zlib.sln
similarity index 100%
rename from vsprojects/copkg/zlib/zlib.sln
rename to vsprojects/coapp/zlib/zlib.sln
diff --git a/vsprojects/copkg/zlib/zlib.vcxproj b/vsprojects/coapp/zlib/zlib.vcxproj
similarity index 75%
rename from vsprojects/copkg/zlib/zlib.vcxproj
rename to vsprojects/coapp/zlib/zlib.vcxproj
index 0a60fe5393..56df39a248 100644
--- a/vsprojects/copkg/zlib/zlib.vcxproj
+++ b/vsprojects/coapp/zlib/zlib.vcxproj
@@ -8,8 +8,8 @@
   </PropertyGroup>
 
   <PropertyGroup Label="Configuration" >
-    <!-- This lets Visual Studio see this as a VC11 project by default -->
-    <PlatformToolset Condition="'$(PlatformToolset)' == ''">v110</PlatformToolset>
+    <!-- This lets Visual Studio see this as a VC12 project by default -->
+    <PlatformToolset Condition="'$(PlatformToolset)' == ''">v120</PlatformToolset>
   </PropertyGroup>
 
   <Import Condition="Exists('$(CoAppEtcDirectory)\common-variables.vcxproj')" Project="$(CoAppEtcDirectory)\common-variables.vcxproj" />
@@ -35,7 +35,7 @@
     <Defines Condition="$(IS_X64)">$(Defines);WIN64;</Defines>
 
     <!-- Additional Include folders (semicolon delimited) -->
-    <IncludeDirectories>..\..;</IncludeDirectories>
+    <IncludeDirectories>..\..\..\third_party\zlib;</IncludeDirectories>
 
     <!-- Additional Library folders (semicolon delimited) -->
     <LibraryDirectories></LibraryDirectories>
@@ -89,24 +89,24 @@
   </ItemDefinitionGroup>
   
   <ItemGroup Condition="'$(UseASM)' == 'ASM'">
-    <MASM Include="..\masmx64\gvmat64.asm" Condition="$(IS_X64)">
+    <MASM Include="..\..\..\third_party\zlib\contrib\masmx64\gvmat64.asm" Condition="$(IS_X64)">
       <AssembledCodeListingFile>$(IntDir)gvmat64.lst</AssembledCodeListingFile>
       <MASMBeforeTargets>Build</MASMBeforeTargets>
       <ObjectFileName>$(IntDir)gvmat64.obj</ObjectFileName>
     </MASM>
-    <MASM Include="..\masmx64\inffasx64.asm" Condition="$(IS_X64)">
+    <MASM Include="..\..\..\third_party\zlib\contrib\masmx64\inffasx64.asm" Condition="$(IS_X64)">
       <AssembledCodeListingFile>$(IntDir)inffasx64.lst</AssembledCodeListingFile>
       <MASMBeforeTargets>Build</MASMBeforeTargets>
       <ObjectFileName>$(IntDir)inffasx64.obj</ObjectFileName>
     </MASM>
-    <MASM Include="..\masmx86\inffas32.asm" Condition="$(IS_X86) AND $(IS_STDCALL)">
+    <MASM Include="..\..\..\third_party\zlib\contrib\masmx86\inffas32.asm" Condition="$(IS_X86) AND $(IS_STDCALL)">
       <AssembledCodeListingFile>$(IntDir)inffas32.lst</AssembledCodeListingFile>
       <MASMBeforeTargets>Build</MASMBeforeTargets>
 	  <UseSafeExceptionHandlers>true</UseSafeExceptionHandlers>
       <AdditionalOptions>/coff %(AdditionalOptions)</AdditionalOptions>
       <ObjectFileName>$(IntDir)inffas32.obj</ObjectFileName>
     </MASM>
-    <MASM Include="..\masmx86\match686.asm" Condition="$(IS_X86) AND $(IS_STDCALL)">
+    <MASM Include="..\..\..\third_party\zlib\contrib\masmx86\match686.asm" Condition="$(IS_X86) AND $(IS_STDCALL)">
       <AssembledCodeListingFile>$(IntDir)match686.lst</AssembledCodeListingFile>
       <MASMBeforeTargets>Build</MASMBeforeTargets>
 	  <UseSafeExceptionHandlers>true</UseSafeExceptionHandlers>
@@ -118,36 +118,28 @@
   <ItemGroup Label="C Source Files">
     <!-- Include the source files to compile here -->
     <!-- <ClCompile Include="..\src\foo.c" /> -->
-    <ClCompile Include="..\..\adler32.c" />
-    <ClCompile Include="..\..\compress.c" />
-    <ClCompile Include="..\..\crc32.c" />
-    <ClCompile Include="..\..\deflate.c" />
-    <ClCompile Include="..\..\gzclose.c" />
-    <ClCompile Include="..\..\gzlib.c" />
-    <ClCompile Include="..\..\gzread.c" />
-    <ClCompile Include="..\..\gzwrite.c" />
-    <ClCompile Include="..\..\infback.c" />
-    <ClCompile Include="..\masmx64\inffas8664.c" Condition="$(IS_X64)" />
-    <ClCompile Include="..\..\inffast.c" />
-    <ClCompile Include="..\..\inflate.c" />
-    <ClCompile Include="..\..\inftrees.c" />
-    <ClCompile Include="..\..\trees.c" />
-    <ClCompile Include="..\..\uncompr.c" />
-    <ClCompile Include="..\minizip\ioapi.c" />
-    <ClCompile Include="..\minizip\iowin32.c" />
-    <ClCompile Include="..\minizip\unzip.c">
-      <PreprocessorDefinitions Condition="$(IS_RELEASE)">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-    </ClCompile>
-    <ClCompile Include="..\minizip\zip.c">
-      <PreprocessorDefinitions Condition="$(IS_RELEASE)">ZLIB_INTERNAL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-    </ClCompile>
-    <ClCompile Include="..\..\zutil.c" />
+    <ClCompile Include="..\..\..\third_party\zlib\adler32.c" />
+    <ClCompile Include="..\..\..\third_party\zlib\compress.c" />
+    <ClCompile Include="..\..\..\third_party\zlib\crc32.c" />
+    <ClCompile Include="..\..\..\third_party\zlib\deflate.c" />
+    <ClCompile Include="..\..\..\third_party\zlib\gzclose.c" />
+    <ClCompile Include="..\..\..\third_party\zlib\gzlib.c" />
+    <ClCompile Include="..\..\..\third_party\zlib\gzread.c" />
+    <ClCompile Include="..\..\..\third_party\zlib\gzwrite.c" />
+    <ClCompile Include="..\..\..\third_party\zlib\infback.c" />
+    <ClCompile Include="..\..\..\third_party\zlib\contrib\masmx64\inffas8664.c" Condition="$(IS_X64)" />
+    <ClCompile Include="..\..\..\third_party\zlib\inffast.c" />
+    <ClCompile Include="..\..\..\third_party\zlib\inflate.c" />
+    <ClCompile Include="..\..\..\third_party\zlib\inftrees.c" />
+    <ClCompile Include="..\..\..\third_party\zlib\trees.c" />
+    <ClCompile Include="..\..\..\third_party\zlib\uncompr.c" />
+    <ClCompile Include="..\..\..\third_party\zlib\zutil.c" />
   </ItemGroup>
 
   <ItemGroup Label="Resource Files">
     <!-- Include the source files to compile here -->
     <!-- <ResourceCompile Include="..\src\foo.rc" /> -->
-    <ResourceCompile Include="..\..\win32\zlib1.rc" />
+    <ResourceCompile Include="..\..\..\third_party\zlib\win32\zlib1.rc" />
   </ItemGroup>
 
   <Import Condition="'$(UseASM)' == 'ASM'" Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />
-- 
GitLab