使用 Qt 创建 Linux 软件:发行版、桌面环境和其他决策

发布于 2024-08-24 14:47:28 字数 508 浏览 3 评论 0原文

我想开始一个个人项目,并且希望使其跨平台。我所有的 Linux 工作都是为商业客户完成的,所以目标发行版是提前指定的,但这是不同的。

该项目将是开源的并使用 Qt。这就是我想知道的:

  1. 如果我在一个发行版上进行开发+测试就足够了,还是应该在多个发行版上进行测试?根据我的经验,如果没有经过测试,它就不起作用, 但另一方面,我负担不起建造和建造的费用。对每个发行版进行测试,特别是因为它将是一个业余爱好项目。

  2. 假设我选择使用 KDE 的发行版 X。您认为使用带有 Gnome 的发行版 Y 的人使用我的程序有多困难?

  3. 使用 Gnome 的人会使用我的 Qt 程序,还是会因为它是用 Qt 编写的而感到厌烦?让我们假设他们发现它有用。 Qt-Gnome 集成有多好?

  4. 我也必须发送二进制文件吗?现在的趋势是什么:源代码还是源代码+ bin?

我希望了解有关在 Linux 上使用 Qt 开源项目的个人例子。 谢谢。

I want to start working on a personal project and I want to make it cross-platform. All of my Linux work was done for business customers, so the target distro was specified in advance, but this is different.

The project will be open source and use Qt. Here's what I'm wondering:

  1. Is it enough if I do my dev + testing on one distro or should I test on multiple ones? In my experience, if it's not tested it doesn't work,
    but on the other hand I can't afford to build & test for every distro out there, especially since it will be a hobby project.

  2. Let's say that I pick distro X that uses KDE. How difficult would you say it is for someone that uses distro Y with Gnome to use my program?

  3. Will people that use Gnome use my Qt program or be put off by the fact that it's written with Qt? Let's assume that they find it useful. How good is the Qt-Gnome integration?

  4. Do I have to ship the binaries too? What is the current trend nowadays: source or source + bin?

I would appreciate personal examples about working with Qt open source projects on Linux.
Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

这个俗人 2024-08-31 14:47:28
  1. 我会使用不同的包装系统(apt、rpm 等)在几个不同的发行版上进行测试。其他任何事情都应该根据具体情况进行。

  2. Qt 应用程序的一个示例是 umbrello UML 建模工具。 ubuntu 用户所需要做的就是sudo apt-get install umbrello。即使您没有准备好软件包,也可以使用类似的命令来设置 Qt,以便执行您的二进制文件。

  3. 我的印象是,人们倾向于坚持使用一个小部件工具包(GTK 用于 gnome,Qt 用于 KDE),但另一方面,我会惊讶地发现有人没有使用他/她需要的优秀应用程序只是因为工具包。

  4. 源代码和二进制文件的单独包。二进制文件与用户文档一起使用,源代码与开发文档一起使用。

  1. I would test on a a few different distributions using different packaging systems (apt, rpm etc.) Anything else should be on a case-by-case basis.

  2. An example of a Qt application is the umbrello UML modeling tool. All a ubuntu user has to do is sudo apt-get install umbrello. Even if you don't have a package ready, a similar command could set up Qt so that your binary can be executed.

  3. My impression is that people tend to stick to one widget toolkit (GTK for gnome and Qt for KDE), but on the other hand, I would be surprised to see that someone isn't using a good application he/she needs just because of the toolkit.

  4. Separate packages for source and binaries. Binaries go with user docs, source with dev docs.

烙印 2024-08-31 14:47:28
  1. 我认为你应该在不同的发行版上测试它。可能会坚持使用最流行的:Ubuntu、Fedora、OpenSuse、Slackware、CentOS/RHE。您可以使用 VirtualBox 或 VMWare 播放器以及免费可用的虚拟机来测试其他发行版(而不是使用 5 个以上的独立分区)。另一种选择是仅提供您正在开发的发行版的二进制文件以及其他发行版的源代码+说明(如何构建)。

  2. 如果您使用某些软件包管理器(RPM、APT-GET)来分发二进制文件,如果尚未安装,它将安装缺少的软件包(例如:默认情况下使用 Gnome 的发行版上的 Qt4)。看看 CheckInstall ,它可以轻松地为 Debian、RedHat 和 Slackware 生成软件包.

  3. 我不认为这是一个阻碍。如果您的应用程序功能强大、设计良好且有用,那么桌面外观集成应该不是问题...您还可以使用 QtGtKStyle 确保您的应用程序在 Gnome 上看起来正确。

  4. 大多数开源项目为最流行的发行版提供二进制文件,也为其他发行版提供源代码(以便他们可以手动构建应用程序)。

    大多数开源项目

  1. I think you should test it on different distro. May be stick with the most popular : Ubuntu, Fedora, OpenSuse, Slackware, CentOS/RHE. You can use VirtualBox or VMWare player and freely available virtual machines to test other distros (instead of having 5+ separate partitions). Another alternative, is to provide only the binaries for the distro you are developping on and source code + instructions (how-to build) for the other distros.

  2. If you use some package manager (RPM, APT-GET) to distribute your binaries, it will install missing packages if they are not already installed (ex: Qt4 on a distro using Gnome by default). Have a look at CheckInstall which can be used to produce packages for Debian, RedHat and Slackware with little effort.

  3. I don't think it is a show stopper. If your application is robust, well designed and useful, desktop look-and-feel integration should not be a problem... You could also use QtGtKStyle to make sure your application look right on Gnome.

  4. Most Open Source project offer binaries for the most popular distros and also the source code for the other distros (so they can build the application by hand).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文