Slashdot Mirror


Installing Everywhere?

PlainBlack queries: "Our company has been developing an open source project for a couple years now that has gotten pretty popular. The one thing we haven't yet figured out how to do well is packaging. It seems like every operating system has it's own standards for packaging, and installers, and for each OS we support, we end up adding a lot of time to our packaging process. So my question is, what do all of you do to package your apps? Do you just release source tarballs? Do you manually package your RPMs, EXEs, DEBs, DMGs, BINs, PKGs, [and MSIs] by hand? Do you have an automated build process that creates all the packages? If so, how does it work? Is it available for other developers to use?" There are tons of installers listed on SourceForge, but which one allows the creation of OS packages without too much hassle? Duplicating work, especially software installation procedures, across all supported OSes, is time consuming. Is there an easier way?

22 of 62 comments (clear)

  1. self-extraction by aminorex · · Score: 2, Informative

    A self-extracting installer can be produced for every platform. Unless your application needs to become a part of the platform, it should be isolable, and installation should be as simple as expanding a self-expanding archive. Such archives can be produced for every popular platform. Using dependency=tracking packages is not feasible if you require that your installation model be cross-platform, but that's really no big loss: by including all of the dependencies for each application within the applications own directory, dependency conflicts are effectively eliminated.

    Or you can do it all in Java, and it doesn't matter what your platform is. Webstart rocks these days.

    --
    -I like my women like I like my tea: green-
    1. Re:self-extraction by moncyb · · Score: 2, Interesting

      Please no self extractors. Especially in Linux. In my experience, 90% of the Linux ones never work. I especially love the ones who say "can't install -- need at least version 2.2.x of GNU libc" when I have 2.3.x (which is backwards compatible). Luckily they're usually bash scripts in front of a tarball, so I can just find the start of the archive and untar it. Even though I can do it, it sucks bigtime.

      I also like to know what the package is going to do and what files it will create before it installs. You can't do that with self extractors. Self extractors are a PITA.

      Your suggestion of including the dependencies (at least the less common ones) with the package is a good idea though.

  2. JAR by trompete · · Score: 2, Interesting

    I've seen .JAR files (Java) that worked on every platform. I think it was part of SourceForge's JEdit project.

    1. Re:JAR by Scottm87 · · Score: 2, Informative

      The concept behind them is fairly simple. Basically, you create a self-executing jar which executes java code which it contains to extract itself. It is basically like a executable zip file.

  3. Try Ant by adamy · · Score: 4, Informative


    Seems that there are two ways people go on this.

    1) Put everything into one huge directory. Create all the symlinks and path extensions etc.

    2) Out things in the 'correct' directories (/usr/bin for exectuables, /ur/lib for libraries etc).

    THe first ie easier to install and for the user to find and wipe out. The second is easier for users that have many apps on theri system (especially if config files for $app are in /etc/$app).

    On windows you don't really have that option, but you don't tend to run as many apps from the command line (which is the real reason there is a space in c:\Program Files\) And the tendancy is to put config stuff in the registry.

    Check out Ant. As part of a build process it knows about jars, rpms , cabs and zips. I'll bet there is a taks out there for creating .debs as well. I realize this is a "hand rolled solution" but it is probably the most extansible.

    --
    Open Source Identity Management: FreeIPA.org
  4. Only 2 options. by BrookHarty · · Score: 2, Insightful

    I rather download my win32 programs in .zip format, and unix files in .tar.bz. Thats it, installers are overkill.

    Why do developers force the users to put applications when they don't know the system. How many windows apps install in C: with your program files is on D: or another partition. Stop forcing the users, and make your programs run out of its own directory.

    Just look at how many people only download mozilla in the .zip/.gz formats, so they don't have to mess with the installers? Lots.

    And to top it off, no installer means no extra work get the program out the door. And makes a certain level of support, if they cant unzip the file, they need to pay for your premium support package.

    Final thought, no install script means registry or other files I have to backup on a reinstall. Just give me a directory with .conf/.ini files I can backup. Makes it easy for me to restore the system. Having to restore the entire OS for an application is shitty design. Bad enough in windows I have to take registry snapshots to save the registry keys. In unix symlinks pointing to symlinks just to point to a .conf file in another directory. I think some developers have been sitting in front of their computer too long to know what the real environment of a production system is...

    1. Re:Only 2 options. by AnamanFan · · Score: 2, Insightful

      I don't want to say your reasons are invalid, because they are valid, but you're forgetting the non-l33t users.

      When you're releasing to the general public, you have to make it easy as sin to install. Though all of us here can think unziping a zip/gz file and placing its contents to its home is easy, this goes way beyond 'normal' users. Installers are needed for the general public.

      This is a proplem with the OSS community; in order to be sucessful and adopted, the general public needs to be able to use the software. The closest that comes into my mind is Mozzila, but they are no where near being completly normal-user-friendly.

      However, I do belive there is a way to make an installer that can easilly pop between 'easy' and 'expert' modes, even with out a concious seperation. I don't think it hurts to but in a 'chouse your install location' diolge box for instance.

      It's a matter of being smart and understanding your target audience. Not having a gz file of PHP is perfectly alright. Having a gz file for a end-user web browser is not.

      --
      AnamanFan - Trying to find the Truth, one post at a time.
    2. Re:Only 2 options. by benjamindees · · Score: 2, Insightful
      In unix symlinks pointing to symlinks just to point to a .conf file in another directory.

      I used to think this was stupid, too; like SCO's hellish directory structure. It's invaluable, though, if you find you need to configure a package on a read-only filesystem, like Knoppix, for instance.

      --
      "I assumed blithely that there were no elves out there in the darkness"
    3. Re:Only 2 options. by secolactico · · Score: 2, Informative

      Why do developers force the users to put applications when they don't know the system. How many windows apps install in C: with your program files is on D: or another partition. Stop forcing the users, and make your programs run out of its own directory.

      That's an easy one. A lot of users aren't even aware of their Program Files directory. Poorly designed installers will default to "c:\program files", but I believe there's a registry key that says where your program files is (after all, the name varies also with the language).

      Most of the time, installers will default to this location but give you the choice to change the path. Also, it gives a good oportunity to display license agreements.

      But your point is valid, every app should run from it's own directory. It really bugs me when apps *have* to install something in you system32 dir or somesuch, specially when your system partition is nearly full.

      --
      No sig
    4. Re:Only 2 options. by N8w8 · · Score: 2, Interesting

      If I need an app, and there's a Debian package available, I use that. Later on I can remove the package with a simple apt-get command.
      If there isn't a deb available, and I get the tarball and do the "./configure && make install" thingy, the files end up everywhere in /usr/local, which makes it harder to remove.

      I agree with you that if the packaging isn't done 100% correctly (as often happens with Windows apps), you indeed might get bald because of pulling out your own hair. Fortunately, the obvious and simple workaround for that is shaving your head. Works for me.

    5. Re:Only 2 options. by tsvk · · Score: 2, Informative
      Why do developers force the users to put applications when they don't know the system. How many windows apps install in C: with your program files is on D: or another partition. Stop forcing the users, and make your programs run out of its own directory.
      That's an easy one. A lot of users aren't even aware of their Program Files directory. Poorly designed installers will default to "c:\program files", but I believe there's a registry key that says where your program files is (after all, the name varies also with the language).

      The folder is at least present in an environment variable: %ProgramFiles% (check it out along with all other variables for example by typing 'set' in a command prompt). It's set probably in the registry, too somewhere.

  5. Easy Package Manager by grotgrot · · Score: 5, Informative
    Easy Package Manager (from the same people who brought you CUPS) solves all your UNIX needs. It can produce a package that is in the native format of each platform, in addition to having its own self extracting GUI installer.

    InnoSetup on Windows is really good, although some people also swear by NSIS (NullSoft Installer (brought to you by the same people who did winamp.

  6. To install or not to install by Kvorg · · Score: 3, Informative

    If you really feel you need to do something original, you could as well not install at all, or use Zero Install (Covered on Sweetcode recently).

    But in general (if you are not running under an interpreter or emulation layer) all applications should install in a compatible way on any system, even when that is quite different from a system to another. So on Unix install in a reloctable directory tree with /usr/local/ as default (bin/, lib/, man/ etc/ etc.), and provide packages for distributions.

    The usual way to do that is to prepare make targets (such as "make debian" and "make redhat" and use the defualt packaging system everywhere. Not that I would know how to do that on Windows...

    You will have to distribute sources or build it yourself on each platform, and that represents the real problem. Getting the make targets right is the easy part - many free software applications contain that, and all distributions come with nice examples.

    (Besides, Debian's Package Builder makes for an excellent multiarchitecture (11!) compilation cluster and should be a good reason to provide and mantain debian packages.)

    --
    -Kvorg
  7. Re:Speaking of Packaging. by darkpurpleblob · · Score: 2, Interesting
    Can anyone offer some input on how a programmer can redistrubute updated code to the users.
    You could use update software. PowerUpdate, Update Server, RTPatch, and vBuild are a few commercial offerings.
  8. Re:Pardon my Naievity... by NanoGator · · Score: 2, Informative

    "Now, you may not have troubles doing this, but there are plenty of non-technical users out there that will. "

    Is that pretty much the reason? So it provides an uninstall path too?

    I can see that. Little surprised I got modded as overrated, though. Then again, I come from the Windows world. Installing apps = bigger registry. Bigger registry = slower Windows. Slower Windows = reinstall once a year. Those of us that'd like to put that reinstall off like apps that don't touch the registry, even to install.

    Oh, to answer my own question, I chewed on this a bit myself and came up with an embarrasingly simple answer: file extensions. A lot of apps have some sort of project file to open. For that to work, you need to set up it's unique extension to run that particular app.

    --
    "Derp de derp."
  9. portability before packaging by hubertf · · Score: 4, Insightful

    Speaking as someone who worked a lot on NetBSD's 3rd party software system, pkgsrc, which today has ~4.000 pkgs:

    It's less important for software to come "pre-packages" properly, but that both the code and the build infrastructure are written with portability in mind in the first stop.

    * Make sure your software compiles on non-i386 non-Linux (don't #include , don't assume /proc is the same on all Systems, don't use clone(2), etc).
    * Make sure it can be relocated (configure --prefix=/foo working properly if you have to use GNU autoconf).
    * Don't assume everyone uses GNU make
    * Don't assume /bin/sh == Bash
    * Don't depend on obscure non-easy to install software components (that again may not be present on non-i386 non-Linux - think Java!).

    If that is done, your software can be added to any 3rd party package systems easily.

    - Hubert

  10. distro's job by Anonymous Coward · · Score: 3, Insightful
    it's the distro's job to do the binary packaging.

    You should focus on the source code, and work with red hat, debian, gentoo, *bsd, etc to make sure your code is easy enough to compile and for them to package.

  11. Some advice for Unix systems by reynaert · · Score: 3, Insightful
    On Unix, I would only create binary packages if:
    • your program has a particular appeal to newbies and it is not included with most distributions,
    • the build procedure is unusually complex, or
    • your program takes ridiculously long to build.
    I think most experienced Unix people are comfortable with building from source, and many people just don't trust third-party packages, as they're often badly packaged or out of date.

    If you decide to do it anyway, one tool that can help you is checkinstall. It monitors the standard make install process and can create several kinds of packages. I doubt the quality of the generated packages is very good though, and you still have to take in account that different distributions have different policies.

    Also, make sure you don't waste effort creating packages for distributions that already include your program. You mention DEBs, but whatever your program is, I'm pretty sure Debian already includes it :)

  12. Makeself is nice for Unix. by bruthasj · · Score: 2, Informative

    The Loki Installer stuff is pretty sweet: http://www.megastep.org/makeself/

    Never used it for windows.

  13. Other than source, release Slackware packages. by Rev.+Null · · Score: 2, Informative

    If you must release binaries, do it in the Slackware format. They're just tarballs with install scripts. Everyone's got tar.

    --
    -- My comment is above.
  14. Re:Easy, plus A-A-P complete solution, overviews by Kvorg · · Score: 2, Insightful

    Hey, Easy Package Manager looks great. It's comparative table of existing installer/packager formats is a good answer to this topic. And it even has a FLTK graphical frontend (I love FLTK for its speed, lack of bloat and beautul API). However, it does not support Windows, which is raher logical from the design point of view.

    But I found a nice list of existing packaging tools at the A-A-P which "makes it easy to locate, download, build and install software. It also supports browsing source code, developing programs, managing different versions and distribution of software and documentation." Definitely worth a look!

    --
    -Kvorg
  15. Why "install" at all. by baadfood · · Score: 2, Interesting

    I am a great fan of software that you simply extract into a directory, and run from there. Ideally, any further installation would be done by the application itself when it is run and detects that its being run for the first time.