Something else: Haiku app packages?







TL; DR : can Haiku get proper support for application packages, such as application directories (like .app



on Mac) and / or application images (Linux AppImage



)? It seems to me that this will be a worthy addition, which is easier to implement correctly than in other systems, since most of the infrastructure is already there.







A week ago, I discovered Haiku, an unexpectedly good system. Well, since I have long been interested in catalogs and application images (inspired by the simplicity of the Macintosh), it is not surprising that an idea came to my mind ...







For a complete understanding: I am the creator and author of AppImage, a Linux application distribution format aimed at the simplicity of the Mac and providing complete control to application authors and end users (want to know more - see the wiki and documentation ).







What if we do an AppImage for Haiku?



Let's think a little, purely theoretically: what needs to be done in order to get an AppImage , or something similar, on Haiku? It is not necessary to create something right now, because the system that is already in Haiku works amazingly, but an imaginary experiment would turn out to be nice. He also demonstrates the sophistication of Haiku, compared to Linux desktop environments where such things are terribly difficult (I have the right to say this: I've been debugging for 10 years now).









On Macintosh System 1, each application was a separate file, "managed" in the Finder. Using AppImage I try to recreate the same user experience on Linux.







First, what is AppImage? This is a system for releasing third-party applications (for example, Ultimaker Cura ), which allows you to release applications when and how they hunt: you don’t need to know the features of various distributions, build policies or build infrastructure, they do not need support from maintainers, and they do not indicate to users that (not) can be installed on computers. AppImage should be understood as something similar to a package for Mac in .app



format inside a .dmg



disk image. The main difference is that applications are not copied, but always remain inside AppImage, much like the Haiku .hpkg



packages are installed, and are never installed in the usual sense.







For more than 10 years of its existence, AppImage gained some appeal and popularity: Linus Torvalds himself publicly approved it, and widespread projects (for example, LibreOffice, Krita, Inkscape, Scribus, ImageMagick) took it as the main way to distribute continuous or nightly assemblies, not interfering with installed or non-installed user applications. However, Linux desktops and distributions most often still cling to the traditional, centralized distribution model based on the maintainers and / or promote their own corporate business and / or engineering programs based on Flatpak (RedHat, Fedora, GNOME) and Snappy (Canonical, Ubuntu) . Comes to funny .







How does it work





















Everything seems to be simple.







And these things complicate things:











The storage location for the cross-desktop specifications used by GNOME , KDE, and Xfce is freedesktop.org







Achieving a level of sophistication deeply woven into Haiku's work environment is difficult, if not impossible, because of the XDG specifications from freedesktop.org for cross-desktop, as well as implementations of desktop managers based on these specifications. As an example, we can cite one system-wide Firefox icon: apparently, the authors of XDG did not even think that the user can have several versions of the same application.









Icons of different versions of Firefox







I was wondering what the Linux world could learn from Mac OS X so as not to mess with system integration. If you have the time and you are doing this, be sure to read what Arno Gourdol, one of the first Mac OS X engineers said:







We wanted to install the application as easy as dragging the application icon from somewhere (server, external drive) onto the disk of your computer. To do this, all information is stored in the application package, including icons, version, file type being processed, type of URL schemes that the system must know to process the application. This also includes information for 'centralized storage' in the Icon Services and Launch Services database. To maintain performance, applications are 'discovered' in several 'well-known' places: in the system and user directory Applications, as well as in some others automatically if the user has moved to the Finder to the directory containing the application. In practice, this worked very well.

https://youtu.be/qQsnqWJ8D2c

Apple WWDC 2000 Session 144 - Mac OS X: Packaging Applications and Printing Documents.







There is nothing like this infrastructure on Linux desktops, so we are looking for workarounds around structural constraints in the AppImage project.









Is Haiku in a hurry to help?







And one more thing: Linux platforms as the basis of working environments, as a rule, are so unspecified that many things that are very simple in a consistent system with a full stack disappoint Linux fragmentation and complexity. I devoted a whole report to issues related to the Linux platform for working environments (knowledgeable developers have confirmed: everything will remain so for a very long time).









My report on Linux desktop environments in 2018







Even Linus Torvalds admitted that it was because of fragmentation that the idea of ​​working environments failed.







Nice to see Haiku!







With Haiku, everything is amazingly simple.



Although the naive approach to porting AppImage to Haiku is to simply attempt to build (mainly runtime.c and service) its components (which may even be possible!), It will not bring much benefit to Haiku. Because in fact most of these problems have been resolved by Haiku and conceptually justified. Haiku provides exactly those bricks for the system infrastructure that I have been looking for in Linux desktop environments for so long and could not believe that they are not there. Namely:









Believe it or not, many Linux users cannot overcome this. At Haiku, everything is done automatically!











Two png files. Pay attention to different icons showing that they will be opened by different applications by double-clicking. Also pay attention to the drop-down menu "Open with:", where the user can select a separate application. How easy!







It looks like many of the crutches and workarounds needed by AppImage on Linux become unnecessary on Haiku, which is based on simplicity and sophistication, thanks to which it copes with most of our needs.







Do Haiku need application packages in the end?



This leads to a big question. If it would be an order of magnitude easier to create a system like AppImage on Haiku than on Linux, would it be worth it? Or has Haiku with its hpkg package system virtually eliminated the need to develop such an idea? Well, for the answer you need to look at the motivation for the existence of AppImages.







View from the user



Take a look at our end user:









One of the developers writes:







In essence, the rationale is this: the use case is so rare that optimization does not make sense to it; handling it as a special case at HaikuPorts seems more than acceptable.




Developer Comment:







Technically, this is already possible with the mount command. Of course, we will make a GUI for this as soon as enough interested users are gathered.






Numerous versions of AppImages running side by side on a single Linux







View from the side of the application developer



Let's look from the perspective of an application developer:











Normal application download page. What to place here for Haiku?







Will bundles (existing as application directories like AppDir or .app



in Apple style) and / or images (as heavily modified Apple's AppImages or .dmg



) be useful additions to the Haiku desktop? Or will it dilute the whole picture and lead to fragmentation, and therefore add complexity? I am torn: on the one hand, the beauty and sophistication of Haiku is based on the fact that there is usually one way to do something, not a lot. , / , , .







mr. waddlesplash







Linux ( , — . ) . Haiku .


?



...



, : — Haiku:









Haiku,







, , , Macintosh Finder. , QtCreator "QtCreator", ?







:







, , ? , - ?

Haiku, ? , .







mr. waddlesplash:







, : , , - . BeOS R5 Haiku — ...

!







Haiku?



hpkg, :









mr. waddlesplash :







, , — /system/apps



, Deskbar , /system/apps



, ( MacOS). Haiku , , , .




mr. waddlesplash:







. "" pkgman .

hpkg, . , .







Conclusion



Haiku , , , Linux. .hpkg



— , . , Haiku . — , Haiku, , . Haiku . , , , Haiku. , «-». 10 Linux, Haiku, , , . , , Haiku , , — . , , hpkg



, . , Haiku , , ( ) "". , ?







Try it yourself! Haiku DVD USB, .

Have a question? telegram- .







: C C++. Haiku OS







: Haiku.







:








All Articles