开发者

Shipping a cross platform desktop application

We are trying to ship a cross platform desktop application to the 3 major platforms (Windows, MacOSX and Linux). On windows, distribution is very common through an exe installer and a dmg on MacOSX. My question is, what to distribute on Linux?

I've seen companies distributing .sh bina开发者_运维技巧ries. Is that the best way to ship for Linux?

Thanks


Some companies, like Mozilla, distribute one tar.gz per architecture:

  • large, statically linked,
  • not updatable by standard tools,
  • hard to maintain centrally (in an organization),
  • dead easy to install
  • simple to release.

Other companies, like Google, distribute multiple package formats, or at least .rpm and .deb, aimed at major versions of major distributions.

  • compact, common dependencies are handled by package manager,
  • uses standard package manager, can be easily centrally maintained,
  • needs privileges to install,
  • needs to closely watch compatibility with supported disto releases,
  • needs complex packaging infrastructure.


Although .rpm and .deb packages are the standard for many Linux distributions, as mentioned by 9000, you would be forced to maintain multiple formats and also worry about differences in different versions of the package managers. For example, RPM packages targeting 4.x won't work on 3.x:

http://fedora.linuxsir.org/fedoradocs/rpm-guide/en/ch-rpm-evolution.html

and in many cases the way RPM dependencies between distributions are quite big. If your application is a popular open source app, then it is less of an issue, because distribution maintainers will take care of creating packages for it. Things change if you are a commercial or closed source company, in particular if you also need to support Windows and OS X

Sometimes it is more convenient to have a single installer that will work on top of different Linux distributions or in some cases you need more flexibility when asking required information to your end user before the actual installation of your application. The shell scripts used by some companies (internally packing a tar.gz) may workaround this limitation of the native packages but are still very limited in its UI and very complex to maintain (most of the logic must be included in the shell script, must be portable among different shells...). They also require pre-unpacking the bundled tar.gz.

There are some tools that allow creating binary executable installer, independent of the Linux version and highly customizable. These tools have the advantages of being easier to maintain and install but depending on the tool may require some prerequisites in the target machine such as Java.

You could try our BitRock InstallBuilder (disclaimer, I'm one of the developers), that creates binary installers that run in any Linux version without any external dependencies or pre-requisites. The generated installers add a minimal size overhead to the packed files and are really easy to customize. Also, the same project file can be shared to generate multiple platforms so you could have the three platforms with very little incremental work. We also support generating .rpm and .deb packages but as mentioned above you would lose flexibility. I want to note that we offer free licenses for open source projects.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜