Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: fix the mac directories #19

Merged
merged 1 commit into from
Jun 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/Pharmacist.Core/Extractors/PlatformExtractors/Android.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading.Tasks;

namespace Pharmacist.Core.Extractors.PlatformExtractors
Expand All @@ -25,6 +26,11 @@ public class Android : BasePlatform
/// <inheritdoc />
public override Task Extract(string referenceAssembliesLocation)
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
referenceAssembliesLocation = "/Library/Frameworks/Xamarin.Android.framework/Libraries/xbuild-frameworks";
}

// Pin to a particular framework version https://github.com/reactiveui/ReactiveUI/issues/1517
var latestVersion = Directory.GetFiles(
Path.Combine(referenceAssembliesLocation, "MonoAndroid"),
Expand Down
6 changes: 6 additions & 0 deletions src/Pharmacist.Core/Extractors/PlatformExtractors/Mac.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading.Tasks;

namespace Pharmacist.Core.Extractors.PlatformExtractors
Expand All @@ -20,6 +21,11 @@ public class Mac : BasePlatform
/// <inheritdoc />
public override Task Extract(string referenceAssembliesLocation)
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
referenceAssembliesLocation = "/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/";
}

var assemblies =
Directory.GetFiles(
Path.Combine(referenceAssembliesLocation, "Xamarin.Mac"),
Expand Down
6 changes: 6 additions & 0 deletions src/Pharmacist.Core/Extractors/PlatformExtractors/iOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading.Tasks;

namespace Pharmacist.Core.Extractors.PlatformExtractors
Expand All @@ -23,6 +24,11 @@ public class iOS : BasePlatform
/// <inheritdoc />
public override Task Extract(string referenceAssembliesLocation)
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
referenceAssembliesLocation = "/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/";
}

var assemblies =
Directory.GetFiles(
Path.Combine(referenceAssembliesLocation, "Xamarin.iOS"),
Expand Down
2 changes: 1 addition & 1 deletion src/Pharmacist.Core/Extractors/PlatformExtractors/tvOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public override Task Extract(string referenceAssembliesLocation)
{
if (PlatformHelper.IsRunningOnMono())
{
referenceAssembliesLocation = Path.Combine(referenceAssembliesLocation, "Xamarin.iOS.framework/Versions/Current/lib/mono");
referenceAssembliesLocation = "/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/";
}

var assemblies =
Expand Down
2 changes: 1 addition & 1 deletion src/Pharmacist.Core/ReferenceLocators/ReferenceLocator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static Task<string> GetReferenceLocation(bool includePreRelease = true)
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
return Task.FromResult("/Library⁩/Frameworks⁩/Libraries/⁨mono");
return Task.FromResult("/Library⁩/Frameworks⁩/Libraries/⁨mono");
}

if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Expand Down