简体   繁体   English

如何将 VLC 发送到我的操作系统相关 VLCJ 应用程序中?

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

I am creating a Java application that uses VLCJ.我正在创建一个使用 VLCJ 的 Java 应用程序。 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.但是,因为它使用 VLC,这意味着我需要为用户找到一种下载 VLC 的方法,以便 VLCJ 可以检测二进制文件并找到必要的文件。 Unfortunately, VLC has operating system-dependent binaries, meaning that each operating system will have different types of binaries to use.不幸的是,VLC 有依赖于操作系统的二进制文件,这意味着每个操作系统都有不同类型的二进制文件可供使用。

For Windows, I've managed to fetch a direct download from the zip file located on the VideoLAN site which contains the binaries.对于 Windows,我设法从位于包含二进制文件的 VideoLAN 站点上的 zip 文件中直接下载。 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.对于 Mac,我能够找到一种方法来 zip 应用程序的二进制文件并将它们托管在某个地方供我的应用程序获取和下载。 This means that for Mac and Windows, I am all set.这意味着对于 Mac 和 Windows,我已经准备好了。

For Linux, however, it is significantly harder.然而,对于 Linux,它明显更难。 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).我不能简单地使用命令来安装 VLC,因为它需要使用关键字sudo ,如果未设置,通常需要密码(默认情况下,大多数 Linux 发行版都设置有密码)。 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).我想找到支持 Linux(RedHat 发行版、Ubuntu 等)主要类型的软件包和二进制文件。 I ended up searching for the package listed there on the package hosting mirrors and downloading them.我最终搜索了 package 托管镜像上列出的 package 并下载了它们。 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 .看看这个 rpm 文件: 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.它没有包含的二进制文件,但它仍然是 package。

After taking a look at the VideoLAN website again, I noticed they used snap files to mainly distribute the software around on Linux.再次查看VideoLAN网站后,我注意到他们使用快照文件主要在Linux上分发软件。 More specifically, Snapcraft, which handles the software to be downloaded itself.更具体地说,Snapcraft,它自己处理要下载的软件。 Unfortunately, this requires a command which also requires sudo in order to install the package.不幸的是,这需要一个命令,该命令也需要sudo才能安装 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?有没有人有任何建议或想法来帮助我?

I'm afraid you don't have many options here.恐怕你在这里没有太多选择。 You will likely always need admin rights when installing software on a machine.在机器上安装软件时,您可能总是需要管理员权限。

Maybe this helps https://askubuntu.com/questions/339/how-can-i-install-a-package-without-root-access也许这有助于https://askubuntu.com/questions/339/how-can-i-install-a-package-without-root-access

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在我的操作系统上设置点网 6 sdk - how do I setup the dot net 6 sdk on my operating system 如何在 Python 中检查操作系统? - How do I check the operating system in Python? 如何在任何操作系统中保护我的应用程序数据? - How to protect my application data in any operating system? 使用其他人的应用程序代码时,我需要运行Cmake以获得操作系统的项目结构。 - When using someone else's application code do I need to run Cmake to get the project structure for my operating system. 如何在没有操作系统中介的情况下访问我的系统资源? - how can i access my system resources without the operating system intermediation? 为什么“可执行文件”操作系统依赖? - Why are “Executable files” operating system dependent? 如何在Linux操作系统重启时执行脚本功能 - How can I execute my script function on the Linux Operating system restart 在Windows操作系统中建立了一个网站,在Linux中造成了变形。 我如何解决它 - Built a website in windows Operating system and distorted in linux. How do i fix it 如何开始在类似Unix的操作系统(如Linux)中编写守护进程? - How do I get started writing a daemon process in a Unix-like operating system, like Linux? 如何使VLC 2.x在Linux下运行? - How do i get the VLC 2.x working under my Linux?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM