-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 5076ef0
Showing
13 changed files
with
1,129 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup Label="UserMacros" Condition=" '$(BaseDir)' == ''"> | ||
<BaseDir>$(MSBuildThisFileDirectory)</BaseDir> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<BaseDirImported>true</BaseDirImported> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
set MSBuildToolsPath="C:\Program Files (x86)\MSBuild\14.0\Bin\msbuild" | ||
echo %MSBuildToolsPath% | ||
cmd /C %MSBuildToolsPath% curl.2015.sln /p:Configuration=Debug /p:Platform=Win32 /t:Build /p:PlatformToolset=v140 | ||
cmd /C %MSBuildToolsPath% curl.2015.sln /p:Configuration=Debug /p:Platform=x64 /t:Build /p:PlatformToolset=v140 | ||
cmd /C %MSBuildToolsPath% curl.2015.sln /p:Configuration=Release /p:Platform=Win32 /t:Build /p:PlatformToolset=v140 | ||
cmd /C %MSBuildToolsPath% curl.2015.sln /p:Configuration=Release /p:Platform=x64 /t:Build /p:PlatformToolset=v140 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ImportGroup Label="PropertySheets"> | ||
<Import Project="basedir.props" Condition=" '$(BaseDirImported)' == ''"/> | ||
</ImportGroup> | ||
|
||
<UsingTask TaskName="BuildPackagesTask" | ||
TaskFactory="CodeTaskFactory" | ||
AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll" > | ||
<Task> | ||
<Reference Include="Microsoft.Build" /> | ||
<Reference Include="Microsoft.Build.Framework" /> | ||
<Reference Include="Microsoft.Build.Utilities.Core" /> | ||
<Reference Include="System.IO.Compression.FileSystem" /> | ||
<Code Type="Class" Language="cs"> | ||
<![CDATA[ | ||
using System; | ||
using System.IO; | ||
using System.IO.Compression; | ||
using Microsoft.Build.Framework; | ||
using System.Reflection; | ||
using Microsoft.Build.Execution; | ||
using System.Net; | ||
using System.ComponentModel; | ||
using System.Diagnostics; | ||
public class BuildPackagesTask : Microsoft.Build.Utilities.Task | ||
{ | ||
private string basedir; | ||
internal static bool FileOrDirectoryExists(string name) | ||
{ | ||
return (Directory.Exists(name) || File.Exists(name)); | ||
} | ||
internal static void CopyFilesRecursively(DirectoryInfo source, DirectoryInfo target) { | ||
foreach (DirectoryInfo dir in source.GetDirectories()) | ||
CopyFilesRecursively(dir, target.CreateSubdirectory(dir.Name)); | ||
foreach (FileInfo file in source.GetFiles()) | ||
file.CopyTo(Path.Combine(target.FullName, file.Name)); | ||
} | ||
public override bool Execute() | ||
{ | ||
basedir = Path.GetFullPath(@"$(BaseDir)"); | ||
Log.LogMessage(MessageImportance.High, | ||
"Building packages."); | ||
string package = "curl-$(curlVersion)"; | ||
string package_root = @"$(BaseDir)out\packages\" + package + @"-headers\" + package; | ||
if (!FileOrDirectoryExists(package_root)) | ||
{ | ||
Directory.CreateDirectory(package_root + @"\include\"); | ||
Directory.CreateDirectory(package_root + @"\include\curl"); | ||
string[] files = {"curl.h","curlver.h","easy.h","mprintf.h","multi.h","stdcheaders.h","system.h","typecheck-gcc.h"}; | ||
foreach (string f in files) { | ||
File.Copy(package + @"\include\curl\" + f, package_root + @"\include\curl\" + f); | ||
} | ||
ZipFile.CreateFromDirectory(@"$(BaseDir)out\packages\" + package + @"-headers\", @"$(BaseDir)out\" + package + @"-headers.zip".ToLower(), CompressionLevel.Optimal, false); | ||
} | ||
package_root = @"$(BaseDir)out\packages\" + package + @"-binaries-$(Platform)-$(Configuration)\" + package; | ||
if (!FileOrDirectoryExists(package_root)) | ||
{ | ||
Directory.CreateDirectory(package_root + @"\binaries\$(Platform)\$(Configuration)"); | ||
string[] files = {"curl.lib"}; | ||
foreach (string f in files) { | ||
File.Copy(@"$(OutDir)\" + f, package_root + @"\binaries\$(Platform)\$(Configuration)\" + f); | ||
} | ||
if ("$(Configuration.ToLower())" == "debug" ) { | ||
string[] debug_files = {"curl.pdb"}; | ||
foreach (string f in debug_files) { | ||
File.Copy(@"$(OutDir)\" + f, package_root + @"\binaries\$(Platform)\$(Configuration)\" + f); | ||
} | ||
} | ||
ZipFile.CreateFromDirectory(@"$(BaseDir)out\packages\" + package + @"-binaries-$(Platform)-$(Configuration)\", @"$(BaseDir)out\" + package + @"-binaries-$(Platform)-$(Configuration).zip".ToLower(), CompressionLevel.Optimal, false); | ||
} | ||
return true; | ||
} | ||
} | ||
]]> | ||
</Code> | ||
</Task> | ||
</UsingTask> | ||
|
||
<PropertyGroup> | ||
<buildpackagestask_Imported>true</buildpackagestask_Imported> | ||
</PropertyGroup> | ||
|
||
<Target Name="BuildPackagesTarget" AfterTargets="Build"> | ||
<BuildPackagesTask /> | ||
</Target> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ImportGroup Label="PropertySheets"> | ||
<Import Project="buildpackages.task" /> | ||
<Import Project="basedir.props" Condition=" '$(BaseDirImported)' == ''"/> | ||
</ImportGroup> | ||
<PropertyGroup Label="UserMacros"> | ||
<curlVersion>7.59.0</curlVersion> | ||
<curlLibDir>$(BaseDir)curl-$(curlVersion)</curlLibDir> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<curlVersionImported>true</curlVersionImported> | ||
</PropertyGroup> | ||
<PropertyGroup /> | ||
<ItemDefinitionGroup /> | ||
<ItemGroup> | ||
<BuildMacro Include="curlVersion"> | ||
<Value>$(curlVersion)</Value> | ||
</BuildMacro> | ||
</ItemGroup> | ||
<ImportGroup Label="PropertySheets"> | ||
<Import Project="curl.download.target" Condition=" '$(curlDownloadTarget_Imported)' == '' "/> | ||
</ImportGroup> | ||
<ItemDefinitionGroup> | ||
<ClCompile> | ||
<PreprocessorDefinitions>HAVE_ZLIB_H;HAVE_ZLIB;HAVE_LIBZ;_USRDLL;BUILDING_LIBCURL;USE_SSLEAY;USE_OPENSSL;CURL_DISABLE_LDAP;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
</ClCompile> | ||
<Link> | ||
<AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> | ||
</Link> | ||
</ItemDefinitionGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 14 | ||
VisualStudioVersion = 14.0.25420.1 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "curl", "curl.2015.vcxproj", "{82A21DDA-9AAB-443A-BF7C-EDE07D1105AE}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|x64 = Debug|x64 | ||
Debug|Win32 = Debug|Win32 | ||
Release|x64 = Release|x64 | ||
Release|Win32 = Release|Win32 | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{82A21DDA-9AAB-443A-BF7C-EDE07D1105AE}.Debug|x64.ActiveCfg = Debug|x64 | ||
{82A21DDA-9AAB-443A-BF7C-EDE07D1105AE}.Debug|x64.Build.0 = Debug|x64 | ||
{82A21DDA-9AAB-443A-BF7C-EDE07D1105AE}.Debug|Win32.ActiveCfg = Debug|Win32 | ||
{82A21DDA-9AAB-443A-BF7C-EDE07D1105AE}.Debug|Win32.Build.0 = Debug|Win32 | ||
{82A21DDA-9AAB-443A-BF7C-EDE07D1105AE}.Release|x64.ActiveCfg = Release|x64 | ||
{82A21DDA-9AAB-443A-BF7C-EDE07D1105AE}.Release|x64.Build.0 = Release|x64 | ||
{82A21DDA-9AAB-443A-BF7C-EDE07D1105AE}.Release|Win32.ActiveCfg = Release|Win32 | ||
{82A21DDA-9AAB-443A-BF7C-EDE07D1105AE}.Release|Win32.Build.0 = Release|Win32 | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
Oops, something went wrong.