The Binary is the Network
The user experience that we wanted to create with the LINA installer has always been the same — native installers for user’s operating systems that were indistinguishable from the installers they were used to using.
But the architecture has changed dramatically. When we originally begin coding the installer, I personally imagined that it could only be available as a service. The program LINA Package (”lina-package”) would take the univeral Linux binary, the XML file, and the image files and send them to the service on our site.
The service on our site would then send those files to a group of machines (a Windows machine, a Mac OS X machine, and a Linux machine) to create the native installers. This was fairly complicated and would have required significance maintenance and possibly significant network traffic.
The first change we made was to work on making it possible to generate the installers on Linux so that the service would not require the Windows and Mac OS X machines. To accomplish this, we created installer templates for each operating system that comprised:
- a Mac OS X Template DMG that contained a Templated Mac OS X pkg file
- a self-extracting Windows installer using NSIS
The key to making this work was several small insights - like creating the proprietary .bom file in the preflight script on Mac OS X - and great Open Source programs like NSIS that enable us to make Windows installers on Linux.
About halfway through the coding process, it became clear that - if the service only required a Linux machine, then it didn’t need to be a service at all. LINA, after all, can run Linux programs on any operating system. Since the Installer Service was a collection of Linux programs, resources, and kernel modules, that meant that if it was converted into a LINA binary, it would be able to run cross-platform on any operating system.
And that is how the complex network of Windows, Mac OS X, and Linux machine that defined the LINA installer service became the LINA Package (”lina-package”) binary that can run on any end-users operating system. Instead of providing access to a network of computers, we can simply send user’s a universal cross-platform Linux binary that can generate installers for any platform.
What I find so beautiful about this is it’s illustration of the power of the LINA platform. In many ways, LINA Package is the first program written specifically for LINA and it solves problems in a way that are practically impossible on the JAVA and .NET platforms. In particular, it integrates several resources that normally cannot run cross-platform including:
- Linux kernel modules to mount the HFS+ DMG partition
- The NSIS program as a native Linux C program
- Tools like tar and gunzip that are part of the LINA Package universal binary but invisible to the end user
- User space in which all of these programs can run and interact.
LINA enabled us to convert our initial requirements from a network of different operating systems to a single binary. The code is in our repository and can be found in the directories src/toolkit/lina-tools/lina-package, templates/installer, and src/libraries.
































