2021年3月5日星期五

How do I ship VLC into my Operating System Dependent VLCJ Application?

I am creating a Java application that uses VLCJ. However, because it uses VLC, it means that I need to find a way to download VLC for the user so that VLCJ can detect the binaries and find the files necessary. Unfortunately, VLC has operating system-dependent binaries, meaning that each operating system will have different types of binaries to use.

For Windows, I've managed to fetch a direct download from the zip file located on the VideoLAN site which contains the binaries. For Mac, I was able to find a way to zip the application's binaries and host them somewhere for my application to fetch and download. This means that for Mac and Windows, I am all set.

For Linux, however, it is significantly harder. I cannot use simply the command to install VLC, because it requires the use of the keyword sudo, which often requires a password if not set (which is by default set to have one for most Linux distros). Due to the running environment, my application will be running in, the user is unable to enter their password (for more details, I am running a plugin on a server where the server is hosted by a company. The users will not necessarily know the password of the server, which causes this to be an issue).

Trying to find a solution, I tried taking a look here. I wanted to find the packages and binaries to support the main types of Linux (RedHat distros, Ubuntu, etc). I ended up searching for the package listed there on the package hosting mirrors and downloading them. I ended up using them for my application, however, I noticed that some of the packages don't have the binaries. In fact, they just contain information about the app, but none of the binaries. Take a look at this rpm file: https://github.com/PulseBeat02/VLC-Release-Mirror/blob/master/linux/vlc-3.0.12-1.3.aarch64.rpm . It doesn't have the included binaries, but it is still a package.

After taking a look at the VideoLAN website again, I noticed they used snap files to mainly distribute the software around on Linux. More specifically, Snapcraft, which handles the software to be downloaded itself. Unfortunately, this requires a command which also requires sudo in order to install the package.

This makes me run out of ideas. I have been thinking for a week about solutions but I am not sure what other possibilities I could try. Does anyone have any suggestions or ideas to help me out?

https://stackoverflow.com/questions/66501700/how-do-i-ship-vlc-into-my-operating-system-dependent-vlcj-application March 06, 2021 at 10:06AM

没有评论:

发表评论