Skip to content

Commit 0901a16

Browse files
author
Edward Thomson
committed
Update to NativeBinaries 1.0.137
Update to NativeBinaries 1.0.137, update paths to `lib` from `NativeBinaries`. Update name of Windows 64-bit library to 'x64' to reflect Microsoft's recommended naming.
1 parent 68d9be9 commit 0901a16

File tree

8 files changed

+22
-24
lines changed

8 files changed

+22
-24
lines changed

‎CI/build.msbuild‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@
4949
DestinationFiles="@(OutputFiles->'$(DeployFolder)\%(RecursiveDir)%(Filename)%(Extension)')" />
5050

5151
<ItemGroup>
52-
<NativeBinaries Include="$(TestBuildDir)\NativeBinaries\**\*.*" />
52+
<NativeBinaries Include="$(TestBuildDir)\lib\**\*.*" />
5353
</ItemGroup>
5454

5555
<Copy SourceFiles="@(NativeBinaries)"
56-
DestinationFiles="@(NativeBinaries->'$(DeployFolder)\NativeBinaries\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
56+
DestinationFiles="@(NativeBinaries->'$(DeployFolder)\lib\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
5757
</Target>
5858
</Project>

‎LibGit2Sharp.Tests/GlobalSettingsFixture.cs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public void CanGetMinimumCompiledInFeatures()
1919
publicvoidCanRetrieveValidVersionString()
2020
{
2121
// Version string format is:
22-
// Major.Minor.Patch[-preDateTime]-LibGit2Sharp_abbrev_hash-libgit2_abbrev_hash (x86|amd64 - features)
22+
// Major.Minor.Patch[-preDateTime]-LibGit2Sharp_abbrev_hash-libgit2_abbrev_hash (x86|x64 - features)
2323
// Example output:
2424
// "0.17.0[-pre20170914123547]-deadcafe-06d772d (x86 - Threads, Https)"
2525

@@ -29,7 +29,7 @@ public void CanRetrieveValidVersionString()
2929
// version: '0.17.0[-pre20170914123547]' LibGit2Sharp version number.
3030
// git2SharpHash:'unknown' ( when compiled from source ) else LibGit2Sharp library hash.
3131
// git2hash: '06d772d' LibGit2 library hash.
32-
// arch: 'x86' or 'amd64' LibGit2 target.
32+
// arch: 'x86' or 'x64' LibGit2 target.
3333
// git2Features: 'Threads, Ssh' LibGit2 features compiled with.
3434
stringregex=@"^(?<version>\d{1,}\.\d{1,2}\.\d{1,3}(-(pre|dev)\d{14})?)-(?<git2SharpHash>\w+)-(?<git2Hash>\w+) \((?<arch>\w+) - (?<git2Features>(?:\w*(?:, )*\w+)*)\)$";
3535

@@ -38,7 +38,7 @@ public void CanRetrieveValidVersionString()
3838
MatchregexResult=Regex.Match(versionInfo,regex);
3939

4040
Assert.True(regexResult.Success,"The following version string format is enforced:"+
41-
"Major.Minor.Patch[-preDateTime]-LibGit2Sharp_abbrev_hash-libgit2_abbrev_hash (x86|amd64 - features)");
41+
"Major.Minor.Patch[-preDateTime]-LibGit2Sharp_abbrev_hash-libgit2_abbrev_hash (x86|x64 - features)");
4242

4343
GroupCollectionmatchGroups=regexResult.Groups;
4444

‎LibGit2Sharp.Tests/ShadowCopyFixture.cs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ public void CanProbeForNativeBinariesFromAShadowCopiedAssembly()
5959

6060
if(!Constants.IsRunningOnUnix)
6161
{
62-
// ...that this cache doesn't contain the `NativeBinaries` folder
62+
// ...that this cache doesn't contain the `lib` folder
6363
stringcachedAssemblyParentPath=Path.GetDirectoryName(cachedAssemblyLocation);
64-
Assert.False(Directory.Exists(Path.Combine(cachedAssemblyParentPath,"NativeBinaries")));
64+
Assert.False(Directory.Exists(Path.Combine(cachedAssemblyParentPath,"lib")));
6565

66-
// ...whereas `NativeBinaries` of course exists next to the source assembly
66+
// ...whereas `lib` of course exists next to the source assembly
6767
stringsourceAssemblyParentPath=
6868
Path.GetDirectoryName(newUri(sourceAssembly.EscapedCodeBase).LocalPath);
69-
Assert.True(Directory.Exists(Path.Combine(sourceAssemblyParentPath,"NativeBinaries")));
69+
Assert.True(Directory.Exists(Path.Combine(sourceAssemblyParentPath,"lib")));
7070
}
7171

7272
AppDomain.Unload(domain);

‎LibGit2Sharp/Core/Platform.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ internal static class Platform
1313
{
1414
publicstaticstringProcessorArchitecture
1515
{
16-
get{returnEnvironment.Is64BitProcess?"amd64":"x86";}
16+
get{returnEnvironment.Is64BitProcess?"x64":"x86";}
1717
}
1818

1919
publicstaticOperatingSystemTypeOperatingSystem

‎LibGit2Sharp/GlobalSettings.cs‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ static GlobalSettings()
2424
if(Platform.OperatingSystem==OperatingSystemType.Windows)
2525
{
2626
stringmanagedPath=newUri(Assembly.GetExecutingAssembly().EscapedCodeBase).LocalPath;
27-
nativeLibraryPath=Path.Combine(Path.GetDirectoryName(managedPath),"NativeBinaries");
27+
nativeLibraryPath=Path.Combine(Path.Combine(Path.GetDirectoryName(managedPath),"lib"),"win32");
2828
}
2929

3030
registeredFilters=newDictionary<Filter,FilterRegistration>();
@@ -129,10 +129,10 @@ public static LogConfiguration LogConfiguration
129129
/// <summary>
130130
/// Sets a hint path for searching for native binaries: when
131131
/// specified, native binaries will first be searched in a
132-
/// subdirectory of the given path corresponding to the architecture
133-
/// (eg, "x86" or "amd64") before falling back to the default
134-
/// path ("NativeBinaries\x86" or "NativeBinaries\amd64" next
135-
/// to the application).
132+
/// subdirectory of the given path corresponding to the operating
133+
/// system and architecture (eg, "x86" or "x64") before falling
134+
/// back to the default path ("lib\win32\x86" or "lib\win32\x64"
135+
/// next to the application).
136136
/// <para>
137137
/// This must be set before any other calls to the library,
138138
/// and is not available on Unix platforms: see your dynamic

‎LibGit2Sharp/LibGit2Sharp.csproj‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<ProjectToolsVersion="4.0"DefaultTargets="Build"xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<ImportProject="..\packages\LibGit2Sharp.NativeBinaries.1.0.132\build\LibGit2Sharp.NativeBinaries.props"Condition="Exists('..\packages\LibGit2Sharp.NativeBinaries.1.0.132\build\LibGit2Sharp.NativeBinaries.props')" />
3+
<ImportProject="..\packages\LibGit2Sharp.NativeBinaries.1.0.137\build\LibGit2Sharp.NativeBinaries.props"Condition="Exists('..\packages\LibGit2Sharp.NativeBinaries.1.0.137\build\LibGit2Sharp.NativeBinaries.props')" />
44
<PropertyGroup>
55
<ConfigurationCondition=" '$(Configuration)' == '' ">Debug</Configuration>
66
<PlatformCondition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -79,8 +79,8 @@
7979
<CompileInclude="Core\GitFetchOptions.cs" />
8080
<CompileInclude="Core\GitPushUpdate.cs" />
8181
<CompileInclude="Core\GitSubmoduleIgnore.cs" />
82-
<CompileInclude="Core\Platform.cs" />
8382
<CompileInclude="Core\GitWriteStream.cs" />
83+
<CompileInclude="Core\Platform.cs" />
8484
<CompileInclude="Core\WriteStream.cs" />
8585
<CompileInclude="Core\GitRebaseOperation.cs" />
8686
<CompileInclude="Core\GitRebaseOptions.cs" />
@@ -381,7 +381,7 @@
381381
<PropertyGroup>
382382
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is{0}.</ErrorText>
383383
</PropertyGroup>
384-
<ErrorCondition="!Exists('..\packages\LibGit2Sharp.NativeBinaries.1.0.132\build\LibGit2Sharp.NativeBinaries.props')"Text="$([System.String]::Format('$(ErrorText)', '..\packages\LibGit2Sharp.NativeBinaries.1.0.132\build\LibGit2Sharp.NativeBinaries.props'))" />
384+
<ErrorCondition="!Exists('..\packages\LibGit2Sharp.NativeBinaries.1.0.137\build\LibGit2Sharp.NativeBinaries.props')"Text="$([System.String]::Format('$(ErrorText)', '..\packages\LibGit2Sharp.NativeBinaries.1.0.137\build\LibGit2Sharp.NativeBinaries.props'))" />
385385
</Target>
386386
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
387387
Other similar extension points exist, see Microsoft.Common.targets.
@@ -390,7 +390,5 @@
390390
<Target Name="AfterBuild">
391391
</Target>
392392
-->
393-
<ItemGroup>
394-
<FolderInclude="Commands\" />
395-
</ItemGroup>
393+
<ItemGroup />
396394
</Project>

‎LibGit2Sharp/Version.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ private string RetrieveAbbrevShaFrom(string name)
7777
/// </summary>
7878
/// <para>
7979
/// The format of the version number is as follows:
80-
/// <para>Major.Minor.Patch-LibGit2Sharp_abbrev_hash-libgit2_abbrev_hash (x86|amd64 - features)</para>
80+
/// <para>Major.Minor.Patch-LibGit2Sharp_abbrev_hash-libgit2_abbrev_hash (x86|x64 - features)</para>
8181
/// </para>
8282
/// <returns></returns>
8383
publicoverridestringToString()

‎LibGit2Sharp/packages.config‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<packageid="LibGit2Sharp.NativeBinaries"version="1.0.132"targetFramework="net4"allowedVersions="[1.0.132]" />
3+
<packageid="LibGit2Sharp.NativeBinaries"version="1.0.137"targetFramework="net4"allowedVersions="[1.0.137]" />
44
</packages>

0 commit comments

Comments
(0)