为 Linux 分发二进制应用程序的最佳方式是什么? [英] What’s the best way to distribute a binary application for Linux?

查看:17
本文介绍了为 Linux 分发二进制应用程序的最佳方式是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚将一个应用程序从 Windows 移植到 Linux.
我必须创建应用程序的安装程序.
该应用程序不是开源 => 我应该分发应用程序的二进制文件(可执行文件、一对 .so 文件、帮助文件和图像).

I just finished porting an application from Windows into Linux.
I have to create an installer of the application.
The application is not open source => I should distribute the application's binaries (executable file, couple .so files, help files and images).

我找到了几种方法:
- RPM 和 DEB 包;
- .sh 文件中的安装程序;
- 自动打包.

I found several methods to do it:
- RPM and DEB packages;
- installer in .sh files;
- Autopackage.

我不喜欢第一种方法(RPM 和 DEB 包),因为我不想为不同的 Linux 发行版维护不同的包.

I don't like first method (RPM and DEB packages) because I don't want to mantain different packages for different Linux distros.

为 Linux 分发二进制应用程序的最佳方式是什么?

What is the best way to distribute a binary application for Linux?

推荐答案

在商业产品上经历过几次这种情况后,我认为最好的答案是为每个受支持的平台使用本机安装程序.其他任何事情都会给最终用户带来不愉快的体验,并且实际上您必须在您想要支持的每个平台上进行测试,因此为每个平台维护包并不是一个很大的负担.您可以创建一个可以在所有平台上正常工作"的二进制文件,包括一些你甚至从未听说过的平台,这种想法真的不能很好地工作.

Having been through this a couple of times with commercial products, I think the very best answer is to use the native installer for each supported platform. Anything else produces an unpleasant experience for the end-user, and in practice you have to test on every platform you want to support anyway, so it's not really a significant burden to maintain packages for each. The idea that you can create a binary that can "just work" on every platform out there, including some you've never even heard of, just really doesn't work all that well.

我的建议是您首先选择一两个平台来支持(我的建议是 Red Hat 和 Ubuntu),然后让用户需求驱动创建其他安装包.也许让人们知道您愿意以适当的费用支持其他平台,该费用涵盖了您在该平台上进行打包和测试的时间和精力.如果一个平台被证明非常不同,您可能需要为持续支持收取更多费用.

My recommendation is that you pick a platform or two to support initially (Red Hat and Ubuntu would be my suggestions) and then let user demand drive the creation of additional installation packages. Perhaps make it known that you're willing to support additional platforms, for a modest fee that covers your time and effort in packaging and testing on that platform. If a platform proves to be very different, you may need to charge more for ongoing support.

哦,我不能过分强调虚拟机在这种情况下的价值.您需要为您支持的每个平台构建 VM,并且每个平台可能需要多个 VM,以便轻松测试不同的配置.

Oh, and I cannot overemphasize the value of virtual machines for scenarios like this. You need to build VMs for each platform you support, and perhaps multiple VMs per platform to make it easy to test different configurations.

这篇关于为 Linux 分发二进制应用程序的最佳方式是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆