Commit 0a47f40e authored by Martin Finkel's avatar Martin Finkel

add packaging for LibVLCSharp.Forms

parent ab260880
using LibVLCSharp.Forms.Platforms.Mac;
using LibVLCSharp.Forms.Shared;
using Xamarin.Forms;
using Xamarin.Forms.Platform.MacOS;
[assembly: ExportRenderer(typeof(VideoView), typeof(VideoViewRenderer))]
namespace LibVLCSharp.Forms.Platforms.Mac
{
public class VideoViewRenderer : ViewRenderer<LibVLCSharp.Forms.Shared.VideoView, LibVLCSharp.Platforms.Mac.VideoView>
{
LibVLCSharp.Platforms.Mac.VideoView _videoView;
protected override void OnElementChanged(ElementChangedEventArgs<VideoView> e)
{
base.OnElementChanged(e);
if(Control == null)
{
_videoView = new LibVLCSharp.Platforms.Mac.VideoView(Element.CliOptions);
SetNativeControl(_videoView);
Element.LibVLC = Control.LibVLC;
Element.MediaPlayer = Control.MediaPlayer;
}
if (e.OldElement != null)
{
}
if (e.NewElement != null)
{
}
}
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
_videoView.Dispose();
}
}
}
\ No newline at end of file
......@@ -3,27 +3,31 @@
<metadata>
<id>LibVLCSharp.Forms</id>
<title>LibVLCSharp.Forms</title>
<version>0.0.1-alpha1</version>
<version>0.0.1</version>
<authors>VideoLAN</authors>
<owners>VideoLAN</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<summary>Xamarin Forms integration for LibVLCSharp</summary>
<description>Xamarin Forms integration for LibVLCSharp</description>
<tags>libvlc vlc videolan native c/c++ video audio forms</tags>
<tags>libvlc vlc videolan native c/c++ video audio forms xamarin</tags>
<projectUrl>https://github.com/videolan/libvlcsharp</projectUrl>
<licenseUrl>https://github.com/videolan/libvlcsharp/blob/master/LICENSE</licenseUrl>
<iconUrl>https://raw.githubusercontent.com/videolan/libvlcsharp/master/Assets/icon.png</iconUrl>
<dependencies>
<group targetFramework="monoandroid8.1">
<dependency id="LibVLCSharp" version="0.0.1-alpha2"/>
<dependency id="LibVLCSharp" version="0.0.3"/>
<dependency id="Xamarin.Forms" version="3.0.0.446417"/>
</group>
<group targetFramework="xamarinios10">
<dependency id="LibVLCSharp" version="0.0.1-alpha2"/>
<dependency id="LibVLCSharp" version="0.0.3"/>
<dependency id="Xamarin.Forms" version="3.0.0.446417"/>
</group>
<group targetFramework="xamarinmac20">
<dependency id="LibVLCSharp" version="0.0.3"/>
<dependency id="Xamarin.Forms" version="3.0.0.446417"/>
</group>
<group targetFramework="netstandard2.0">
<dependency id="LibVLCSharp" version="0.0.1-alpha2"/>
<dependency id="LibVLCSharp" version="0.0.3"/>
<dependency id="Xamarin.Forms" version="3.0.0.446417"/>
</group>
</dependencies>
......@@ -34,6 +38,7 @@
<files>
<file src="LibVLCSharp.Forms\bin\Release\monoandroid81\LibVLCSharp.Forms.dll" target="lib\MonoAndroid81"/>
<file src="LibVLCSharp.Forms\bin\Release\xamarin.ios10\LibVLCSharp.Forms.dll" target="lib\Xamarin.iOS10"/>
<file src="LibVLCSharp.Forms\bin\Release\xamarin.mac20\LibVLCSharp.Forms.dll" target="lib\Xamarin.Mac20"/>
<file src="LibVLCSharp.Forms\bin\Release\netstandard2.0\LibVLCSharp.Forms.dll" target="lib\.NETStandard2.0"/>
</files>
</package>
\ No newline at end of file
......@@ -26,6 +26,7 @@
<Compile Include="Platforms\iOS\**\*.cs" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('Xamarin.Mac'))">
<Reference Include="netstandard" />
<Compile Include="Platforms\Mac\**\*.cs" />
</ItemGroup>
</Project>
\ No newline at end of file
$msbuild = '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe"'
iex ("& {0} {1}" -f $msbuild, "../LibVLCSharp.Forms/LibVLCSharp.Forms.csproj /t:Restore,Clean,Build /p:Configuration=Release")
..\nuget.exe pack ..\LibVLCSharp.Forms.nuspec
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment