Forum Xamarin.Mac

Announcement:

The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

How can I install FFMPEG package on client machine?

codergcoderg Member ✭✭

My MacOs application has a dependency on FFMpeg. How can I install FFMpeg package on the client machine using my application?
As of now, I am trying to install BREW and then FFMPEG using System.Diagnostics.Process.Start. The BREW package stops as it's expecting a user input 'ENTER' command and I am not sure how do I execute ENTER command using System.Diagnostics.Process.Start.

Answers

  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai

    I would suggest bundling the required software in your application bundle as a dependency. That way you don't have to worry about the global install being the wrong version / not installed / broken.

    Else, you could have a first launch dialog that if it is not installed prompts the user to install before continuing.

  • codergcoderg Member ✭✭

    @ChrisHamons said:
    I would suggest bundling the required software in your application bundle as a dependency. That way you don't have to worry about the global install being the wrong version / not installed / broken.

    Else, you could have a first launch dialog that if it is not installed prompts the user to install before continuing.

    Is it possible to share some reference on how to bundle dependencies using Xamarin for in MacOS apps?

  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai

    You can add files (or folders) to your project and use the BuildResource build action or copy them into your bundle as part of a build step using something like this sample:

    https://github.com/xamarin/mac-samples/tree/master/UseMSBuildToCopyFilesToBundleExample

    Then you can use something like this to find the path inside your bundle:

    https://docs.microsoft.com/en-us/dotnet/api/foundation.nsbundle.pathforresource?view=xamarin-ios-sdk-12

    However, if your library/application in question can't run from inside a read only bundle resources folder, you'll need to look into installing system wide. I don't have any specific knowledge on that specific library here.

Sign In or Register to comment.