Skip to content
This repository was archived by the owner on Apr 3, 2023. It is now read-only.
Open
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
56 changes: 54 additions & 2 deletions src/ImageCircle.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.15
# Visual Studio Version 16
VisualStudioVersion = 16.0.29306.81
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{49C6E954-C9FF-429A-A011-E647B388FA12}"
ProjectSection(SolutionItems) = preProject
Expand All @@ -24,10 +24,13 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestAppsCircles.UWP", "Test
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestAppsCircles.Mac", "TestAppCircles.Mac\TestAppsCircles.Mac.csproj", "{ADDF933D-E425-4F54-BDA7-16F7BD5CB471}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestAppsCircles.WPF", "TestAppsCircles.WPF\TestAppsCircles.WPF.csproj", "{3F3E7A02-659A-4347-9A66-996ADF67AB21}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
TestAppsCircles\TestAppsCircles.projitems*{239ba275-b4a4-46c8-b87a-bf5975f88efd}*SharedItemsImports = 4
TestAppsCircles\TestAppsCircles.projitems*{2e67d1a4-b517-4d89-9f49-6e3d048cd781}*SharedItemsImports = 4
TestAppsCircles\TestAppsCircles.projitems*{3f3e7a02-659a-4347-9a66-996adf67ab21}*SharedItemsImports = 4
TestAppsCircles\TestAppsCircles.projitems*{61c3066c-0237-4606-8434-f5626acaf29e}*SharedItemsImports = 4
TestAppsCircles\TestAppsCircles.projitems*{addf933d-e425-4f54-bda7-16f7bd5cb471}*SharedItemsImports = 4
TestAppsCircles\TestAppsCircles.projitems*{fd4e1f85-421f-4c06-9752-4faded914f17}*SharedItemsImports = 13
Expand Down Expand Up @@ -319,6 +322,54 @@ Global
{ADDF933D-E425-4F54-BDA7-16F7BD5CB471}.Release|x64.Build.0 = Release|iPhone
{ADDF933D-E425-4F54-BDA7-16F7BD5CB471}.Release|x86.ActiveCfg = Release|iPhone
{ADDF933D-E425-4F54-BDA7-16F7BD5CB471}.Release|x86.Build.0 = Release|iPhone
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.Ad-Hoc|ARM.Build.0 = Release|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.Ad-Hoc|x64.Build.0 = Release|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.Ad-Hoc|x86.Build.0 = Release|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.AppStore|Any CPU.ActiveCfg = Release|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.AppStore|Any CPU.Build.0 = Release|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.AppStore|ARM.ActiveCfg = Release|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.AppStore|ARM.Build.0 = Release|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.AppStore|iPhone.ActiveCfg = Release|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.AppStore|iPhone.Build.0 = Release|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.AppStore|x64.ActiveCfg = Release|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.AppStore|x64.Build.0 = Release|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.AppStore|x86.ActiveCfg = Release|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.AppStore|x86.Build.0 = Release|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.Debug|ARM.ActiveCfg = Debug|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.Debug|ARM.Build.0 = Debug|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.Debug|iPhone.Build.0 = Debug|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.Debug|x64.ActiveCfg = Debug|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.Debug|x64.Build.0 = Debug|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.Debug|x86.ActiveCfg = Debug|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.Debug|x86.Build.0 = Debug|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.Release|Any CPU.Build.0 = Release|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.Release|ARM.ActiveCfg = Release|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.Release|ARM.Build.0 = Release|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.Release|iPhone.ActiveCfg = Release|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.Release|iPhone.Build.0 = Release|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.Release|x64.ActiveCfg = Release|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.Release|x64.Build.0 = Release|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.Release|x86.ActiveCfg = Release|Any CPU
{3F3E7A02-659A-4347-9A66-996ADF67AB21}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -329,6 +380,7 @@ Global
{61C3066C-0237-4606-8434-F5626ACAF29E} = {28F410BB-635A-4607-B82A-11DFB2FA2206}
{2E67D1A4-B517-4D89-9F49-6E3D048CD781} = {28F410BB-635A-4607-B82A-11DFB2FA2206}
{ADDF933D-E425-4F54-BDA7-16F7BD5CB471} = {28F410BB-635A-4607-B82A-11DFB2FA2206}
{3F3E7A02-659A-4347-9A66-996ADF67AB21} = {28F410BB-635A-4607-B82A-11DFB2FA2206}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {94BD0FCA-480F-435F-93B4-174C90C27419}
Expand Down
9 changes: 8 additions & 1 deletion src/ImageCircle/ImageCircle.Forms.Plugin.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="MSBuild.Sdk.Extras/1.6.61">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;MonoAndroid71;MonoAndroid80;MonoAndroid81;Xamarin.iOS10;uap10.0.16299;Xamarin.Mac20</TargetFrameworks>
<TargetFrameworks>netstandard2.0;MonoAndroid71;MonoAndroid80;MonoAndroid81;Xamarin.iOS10;uap10.0.16299;Xamarin.Mac20;net461</TargetFrameworks>
<AssemblyName>ImageCircle.Forms.Plugin</AssemblyName>
<RootNamespace>ImageCircle.Forms.Plugin</RootNamespace>
<Product>$(AssemblyName) ($(TargetFramework))</Product>
Expand Down Expand Up @@ -88,4 +88,11 @@
<Compile Include="*.mac.cs" />
</ItemGroup>

<ItemGroup Condition=" $(TargetFramework.StartsWith('net461')) ">
<Compile Include="*.net461.cs" />
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<PackageReference Include="Xamarin.Forms.Platform.WPF" Version="3.4.0.1009999" />
</ItemGroup>
</Project>
146 changes: 146 additions & 0 deletions src/ImageCircle/Renderer.net461.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
using ImageCircle.Forms.Plugin.WPF;
using System;
using Xamarin.Forms;
using ImageCircle.Forms.Plugin.Abstractions;
using Xamarin.Forms.Platform.WPF;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using Color = System.Windows.Media.Color;
using ImageSource = Xamarin.Forms.ImageSource;
using System.ComponentModel;
using System.Diagnostics;

[assembly: ExportRenderer(typeof(CircleImage), typeof(ImageCircleRenderer))]
namespace ImageCircle.Forms.Plugin.WPF
{
/// <summary>
/// ImageCircle Implementation
/// </summary>
public class ImageCircleRenderer : ViewRenderer<Image, Ellipse>
Copy link

@VladislavAntonyuk VladislavAntonyuk Feb 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have changed a code for this file:

private ImageSource file;

        protected override void OnElementChanged(ElementChangedEventArgs<Image> e)
        {
            base.OnElementChanged(e);
            if (e.OldElement == null)
            {
                var ellipse = new Ellipse();
                SetNativeControl(ellipse);
            }
        }

        protected override async void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            base.OnElementPropertyChanged(sender, e);

            if (Control == null)
            {
                return;
            }

            var min = Math.Min(Element.Width, Element.Height);
            if (min / 2.0f <= 0)
            {
                return;
            }

            Control.Width = min;
            Control.Height = min;

            // Fill background color
            var color = ((CircleImage) Element).FillColor;
            Control.Fill = XamarinColorToBrush(color);

            // Fill stroke
            color = ((CircleImage) Element).BorderColor;
            Control.StrokeThickness = ((CircleImage) Element).BorderThickness;
            Control.Stroke = XamarinColorToBrush(color);

            var force = ForceUpdate(e.PropertyName);

            //already set
            if (file == Element.Source && !force)
            {
                return;
            }

            file = Element.Source;

            IImageSourceHandler handler;

            switch (file)
            {
                case UriImageSource _:
                    handler = new UriImageSourceHandler();
                    break;
                case FileImageSource f:
                    if(!File.Exists(f.File))
                    {
                        return;
                    }

                    handler = new FileImageSourceHandler();
                    break;
                case StreamImageSource _:
                    handler = new StreamImageSourceHandler();
                    break;
                default:
                    return;
            }

            var originalBitmap = await handler.LoadImageAsync(Element.Source);
            if (originalBitmap != null)
            {
                Control.Fill = new ImageBrush
                {
                    ImageSource = originalBitmap,
                    Stretch = Stretch.UniformToFill
                };
            }
        }

        private static bool ForceUpdate(string propertyName)
        {
            var forcePropertiesList = new List<string>
            {
                VisualElement.XProperty.PropertyName,
                VisualElement.YProperty.PropertyName,
                VisualElement.WidthProperty.PropertyName,
                VisualElement.HeightProperty.PropertyName,
                VisualElement.ScaleProperty.PropertyName,
                VisualElement.TranslationXProperty.PropertyName,
                VisualElement.TranslationYProperty.PropertyName,
                VisualElement.RotationYProperty.PropertyName,
                VisualElement.RotationXProperty.PropertyName,
                VisualElement.RotationProperty.PropertyName,
                CircleImage.BorderThicknessProperty.PropertyName,
                CircleImage.BorderColorProperty.PropertyName,
                CircleImage.FillColorProperty.PropertyName,
                VisualElement.AnchorXProperty.PropertyName,
                VisualElement.AnchorYProperty.PropertyName
            };

            return forcePropertiesList.Contains(propertyName);
        }

        private static Brush XamarinColorToBrush(Color color)
        {
            return new SolidColorBrush(System.Windows.Media.Color.FromArgb(
                (byte) (color.A * 255),
                (byte) (color.R * 255),
                (byte) (color.G * 255),
                (byte) (color.B * 255)));
        }

{
#pragma warning disable CS0108 // Member hides inherited member; missing new keyword
#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously
/// <summary>
/// Used for registration with dependency service
/// </summary>
public async static void Init()
#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Init is not necessary, I suggest to replace the file with the code above

#pragma warning restore CS0108 // Member hides inherited member; missing new keyword
{
var temp = DateTime.Now;
}

private ImageSource file;

/// <summary>
/// Register circle
/// </summary>
/// <param name="e"></param>
protected override void OnElementChanged(ElementChangedEventArgs<Image> e)
{
base.OnElementChanged(e);
if (e.OldElement != null || Element == null)
return;

var ellipse = new Ellipse();
SetNativeControl(ellipse);
}

/// <summary>
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected override async void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
{
base.OnElementPropertyChanged(sender, e);

if (Control == null)
return;

var min = Math.Min(Element.Width, Element.Height);
if (min / 2.0f <= 0)
return;

try
{
Control.Width = min;
Control.Height = min;

// Fill background color
var color = ((CircleImage)Element).FillColor;
Control.Fill = new SolidColorBrush(Color.FromArgb(
(byte)(color.A * 255),
(byte)(color.R * 255),
(byte)(color.G * 255),
(byte)(color.B * 255)));

// Fill stroke
color = ((CircleImage)Element).BorderColor;
Control.StrokeThickness = ((CircleImage)Element).BorderThickness;
Control.Stroke = new SolidColorBrush(Color.FromArgb(
(byte)(color.A * 255),
(byte)(color.R * 255),
(byte)(color.G * 255),
(byte)(color.B * 255)));

var force = e.PropertyName == VisualElement.XProperty.PropertyName ||
e.PropertyName == VisualElement.YProperty.PropertyName ||
e.PropertyName == VisualElement.WidthProperty.PropertyName ||
e.PropertyName == VisualElement.HeightProperty.PropertyName ||
e.PropertyName == VisualElement.ScaleProperty.PropertyName ||
e.PropertyName == VisualElement.TranslationXProperty.PropertyName ||
e.PropertyName == VisualElement.TranslationYProperty.PropertyName ||
e.PropertyName == VisualElement.RotationYProperty.PropertyName ||
e.PropertyName == VisualElement.RotationXProperty.PropertyName ||
e.PropertyName == VisualElement.RotationProperty.PropertyName ||
e.PropertyName == CircleImage.BorderThicknessProperty.PropertyName ||
e.PropertyName == CircleImage.BorderColorProperty.PropertyName ||
e.PropertyName == CircleImage.FillColorProperty.PropertyName ||
e.PropertyName == VisualElement.AnchorXProperty.PropertyName ||
e.PropertyName == VisualElement.AnchorYProperty.PropertyName;

//already set
if (file == Element.Source && !force)
return;

file = Element.Source;

Copy link

@VladislavAntonyuk VladislavAntonyuk Feb 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IImageSourceHandler handler;

            switch (file)
            {
                case UriImageSource _:
                    handler = new UriImageSourceHandler();
                    break;
                case FileImageSource f:
                    if(!File.Exists(f.File))
                    {
                        return;
                    }

                    handler = new FileImageSourceHandler();
                    break;
                case StreamImageSource _:
                    handler = new StreamImageSourceHandler();
                    break;
                default:
                    return;
            }

BitmapImage bitmapImage = null;

// Handle file images
if (file is FileImageSource) throw new NotImplementedException();

if (file is UriImageSource)
{
bitmapImage = new BitmapImage((Element.Source as UriImageSource).Uri);
}
else if (file is StreamImageSource)
{
var handler = new StreamImageSourceHandler();
var imageSource = await handler.LoadImageAsync(file);

if (imageSource != null)
Control.Fill = new ImageBrush
{
ImageSource = imageSource,
Stretch = Stretch.UniformToFill
};
return;
}

if (bitmapImage != null)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

var originalBitmap = await handler.LoadImageAsync(Element.Source);
            if (originalBitmap != null)
            {
                Control.Fill = new ImageBrush
                {
                    ImageSource = originalBitmap,
                    Stretch = Stretch.UniformToFill
                };
            }

Control.Fill = new ImageBrush
{
ImageSource = bitmapImage,
Stretch = Stretch.UniformToFill
};
}
catch

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

try catch looks uninformative, you can remove it

{
Debug.WriteLine("Unable to create circle image, falling back to background color.");
}
}
}

}
18 changes: 18 additions & 0 deletions src/TestAppsCircles.WPF/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="OpenTK" publicKeyToken="bad199fe84eb3df4" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="OpenTK.GLControl" publicKeyToken="bad199fe84eb3df4" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
9 changes: 9 additions & 0 deletions src/TestAppsCircles.WPF/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Application x:Class="TestAppsCircles.WPF.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:TestAppsCircles.WPF"
StartupUri="MainWindow.xaml">
<Application.Resources>

</Application.Resources>
</Application>
17 changes: 17 additions & 0 deletions src/TestAppsCircles.WPF/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace TestAppsCircles.WPF
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}
13 changes: 13 additions & 0 deletions src/TestAppsCircles.WPF/MainWindow.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<forms:FormsApplicationPage x:Class="TestAppsCircles.WPF.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:TestAppsCircles.WPF"
xmlns:forms="clr-namespace:Xamarin.Forms.Platform.WPF;assembly=Xamarin.Forms.Platform.WPF"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid>

</Grid>
</forms:FormsApplicationPage>
20 changes: 20 additions & 0 deletions src/TestAppsCircles.WPF/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using Xamarin.Forms;
using Xamarin.Forms.Platform.WPF;
using System.Windows;

namespace TestAppsCircles.WPF
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : FormsApplicationPage
{
public MainWindow()
{
InitializeComponent();
Forms.Init();
ImageCircle.Forms.Plugin.WPF.ImageCircleRenderer.Init();
LoadApplication(new TestAppsCircles.App());
}
}
}
25 changes: 25 additions & 0 deletions src/TestAppsCircles.WPF/OpenTK.dll.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<configuration>
<dllmap os="linux" dll="opengl32.dll" target="libGL.so.1"/>
<dllmap os="linux" dll="glu32.dll" target="libGLU.so.1"/>
<dllmap os="linux" dll="openal32.dll" target="libopenal.so.1"/>
<dllmap os="linux" dll="alut.dll" target="libalut.so.0"/>
<dllmap os="linux" dll="opencl.dll" target="libOpenCL.so"/>
<dllmap os="linux" dll="libX11" target="libX11.so.6"/>
<dllmap os="linux" dll="libXi" target="libXi.so.6"/>
<dllmap os="linux" dll="SDL2.dll" target="libSDL2-2.0.so.0"/>
<dllmap os="osx" dll="opengl32.dll" target="/System/Library/Frameworks/OpenGL.framework/OpenGL"/>
<dllmap os="osx" dll="openal32.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" />
<dllmap os="osx" dll="alut.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" />
<dllmap os="osx" dll="libGLES.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
<dllmap os="osx" dll="libGLESv1_CM.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
<dllmap os="osx" dll="libGLESv2.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
<dllmap os="osx" dll="opencl.dll" target="/System/Library/Frameworks/OpenCL.framework/OpenCL"/>
<dllmap os="osx" dll="SDL2.dll" target="libSDL2.dylib"/>
<!-- XQuartz compatibility (X11 on Mac) -->
<dllmap os="osx" dll="libGL.so.1" target="/usr/X11/lib/libGL.dylib"/>
<dllmap os="osx" dll="libX11" target="/usr/X11/lib/libX11.dylib"/>
<dllmap os="osx" dll="libXcursor.so.1" target="/usr/X11/lib/libXcursor.dylib"/>
<dllmap os="osx" dll="libXi" target="/usr/X11/lib/libXi.dylib"/>
<dllmap os="osx" dll="libXinerama" target="/usr/X11/lib/libXinerama.dylib"/>
<dllmap os="osx" dll="libXrandr.so.2" target="/usr/X11/lib/libXrandr.dylib"/>
</configuration>
Loading