Jump to content

  • Log In with Google      Sign In   
  • Create Account


Installer for Linux?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
17 replies to this topic

#1 DvDmanDT   Members   -  Reputation: 855

Like
2Likes
Like

Posted 02 July 2014 - 05:14 AM

Hi everyone,

 

I have an application that we've sold for Windows for years, but we are just now launching a Linux version. It's a graphical .NET/mono application. We've released to partners/testers as a plain .zip containing just our application files. This means the users have had to run "mono <ourapp>.exe" in order to start it. This seems suboptimal.

 

What is the best way to release a closed source commercial app for Linux? What about adding entries to their application launcher of choice (ie kickstart menu on KDE or whatever)?

 



Sponsor:

#2 Tribad   Members   -  Reputation: 841

Like
2Likes
Like

Posted 02 July 2014 - 05:28 AM

there are some different package managers out there that are used in various distributions.

So you should support these package managers.

 

debian/ubuntu

redhat

suse

 

are the one I know in a hurry.



#3 ColinDuquesnoy   Members   -  Reputation: 1105

Like
4Likes
Like

Posted 02 July 2014 - 05:58 AM

As mentioned above, there are a few different package manager in use. You should at least support .deb, .rpm to target the most widely used distros (i.e. Ubuntu and Fedora). You can also provides packages for archlinux based distributions through the AUR.

 

For debian packages, I recommend using a PPA. There might be an equivalent service for building and distributing rpm but I personally don't know any (I am an arch linux user)

 

 

What about adding entries to their application launcher of choice (ie kickstart menu on KDE or whatever)?

 

You do that with desktop entries: http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html. This will work regardless of the desktop environment.



#4 Bregma   Crossbones+   -  Reputation: 4985

Like
8Likes
Like

Posted 02 July 2014 - 06:41 AM

What is the best way to release a closed source commercial app for Linux? What about adding entries to their application launcher of choice (ie kickstart menu on KDE or whatever)?

Firstly, don't try to force a Windows-centric view of software distribution onto a non_window platform.  That's like a book publisher finding they have a monster hit of English literature and look to expand their market to South America and ask how they can get all those people to learn to read English so they will buy the book.  It tends to be the wrong question.
 
Part of the problem stems from the misbelief that Linux is an operating system.  It's not, it's a OS kernel.  The think people think of as 'Linux' is actually the distribution like Red Hat, Fedora, Debian, Ubuntu, SuSE, and myriad others:  they're the OSes.  You don't target to 'Linux' you target to a distribution.  Few distributions are truly compatible at the package or binary level.  Following the book simile, the publisher now wants to translate the work into South American to improve sales.  The next step will be to complain that there should a central authority in South America to dictate what language people speak and that it should look and sound like English, just like Jesus used in the Bible.
 
Anyway, there are two approaches to commercial distribution on Linux.

 

(1) Use the native package manager for your target distribution.  You'll want to specify a limited set of distributions you target, and make debs/rpms available.  Users download and install the software using their native package manager, and your software uses the local version of dependent libraries.  The package managers take care of making sure dependencies are installed and configured correctly.  You still need to test on all your supported platforms.  This is generally the preferred method.

 

(2) Use the Macintosh approach of creating a standalone bundle of everything you need (all binaries, executables, assets, shared libraries, the works).  You will still need to specify a limited set of distributions you target and make the bundles available for download.  You will probably need to write a bespoke installer, or at least a custom wrapper, and integrate it into the OS.  You will still need to test on all your supported platforms.  This is the method Steam uses for its games. 

 

You should follow the freedesktop.org standards for integrating your stuff into the launch system(s).  See ColinDuquesnoy's reply above.


Stephen M. Webb
Professional Free Software Developer

#5 xenobrain   Members   -  Reputation: 647

Like
1Likes
Like

Posted 02 July 2014 - 06:04 PM

While I have not created installers with it, as a user I'm always happy to install software that's using http://nixstaller.sourceforge.net/.  Works on every distro and can even create native packages for most of them so it plays well with the native package manager!  Also handles dependencies in a slick way, only installing them if needed and putting them into their own directory to avoid conflicts on the host OS.

 

IMO it's very slick.  Hopefully it's easy to use too smile.png


Edited by xenobrain, 02 July 2014 - 06:05 PM.


#6 TheChubu   Crossbones+   -  Reputation: 4075

Like
0Likes
Like

Posted 02 July 2014 - 08:37 PM

I'm preeety sure you can just get away with putting your stuff in /usr/share and /usr/bin. Then make a .desktop file so the application appears in the menu. It should work on most distros out there. Provide the regular .zip if the installer doesn't works on the user's *nix flavour.


"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"

 

My journals: dustArtemis ECS framework and Making a Terrain Generator


#7 swiftcoder   Senior Moderators   -  Reputation: 9856

Like
2Likes
Like

Posted 02 July 2014 - 08:44 PM


I'm preeety sure you can just get away with putting your stuff in /usr/share and /usr/bin.

I would hunt you down and kill you if you did that. The contents of /usr are exclusively the province of my package manager, and if you go mucking around in there, you will break something.

 

Realistically, your two options are to either (a) integrate properly with my package manager, or (b) provide your software as a stand-alone zip/tar archive with no system dependencies.


Tristam MacDonald - Software Engineer @Amazon - [swiftcoding]


#8 TheChubu   Crossbones+   -  Reputation: 4075

Like
0Likes
Like

Posted 02 July 2014 - 09:21 PM


I would hunt you down and kill you if you did that. The contents of /usr are exclusively the province of my package manager, and if you go mucking around in there, you will break something.
Lets reach a compromise here, /opt ?

"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"

 

My journals: dustArtemis ECS framework and Making a Terrain Generator


#9 DvDmanDT   Members   -  Reputation: 855

Like
0Likes
Like

Posted 03 July 2014 - 04:00 AM

I don't suppose there's by any chance some tool to create native packages from Windows/cygwin? That would have made my life soooooo much easier.

 

Installing into /opt currently seems like a rather reasonable approach since we currently need all files in the same directory. nixstaller seems pretty nice, but it bothers me somewhat that it hasn't really been updated since 2009. It also borders on the issue Bregma brought up, seems a bit like the Windows way of doing stuff.

 

I should probably mention that it's a development tool for rather advanced users, so it doesn't have to be super fool-proof.



#10 Bregma   Crossbones+   -  Reputation: 4985

Like
1Likes
Like

Posted 03 July 2014 - 05:09 AM

Installing into /opt currently seems like a rather reasonable approach since we currently need all files in the same directory. nixstaller seems pretty nice, but it bothers me somewhat that it hasn't really been updated since 2009. It also borders on the issue Bregma brought up, seems a bit like the Windows way of doing stuff.

It is the Windows way of doing stuff, but most people won't care.  The purists will, but they'll either reject your product because it's not Free or they'll be really vehemently vocal in forums on the internet but can be safely ignored.  The rest just want to install and use your software and don't care about such issues.

 

The real danger/disadvantage to having a complete bundle is (1) you will have to take care of your own security updates -- only really an issue if you have networked functionality or protect user assets in some way, and (b) if you have any external dependencies at all (eg. C or other language runtimes) your product could break on the next system upgrade.  Unlike Windows, most Linux distros upgrade on a regular basis.

 

It really sounds like the single bundle is your best option.  It does work well for Steam, although they have their own installer and automated update mechanism to alleviate the problems I outlined above.  Have you considered going through Steam?


Stephen M. Webb
Professional Free Software Developer

#11 jjd   GDNet+   -  Reputation: 2075

Like
1Likes
Like

Posted 03 July 2014 - 05:19 AM

 


I would hunt you down and kill you if you did that. The contents of /usr are exclusively the province of my package manager, and if you go mucking around in there, you will break something.
Lets reach a compromise here, /opt ?

 

 

Or /usr/local

 

-Josh


--www.physicaluncertainty.com
--linkedin
--irc.freenode.net#gdnet


#12 swiftcoder   Senior Moderators   -  Reputation: 9856

Like
1Likes
Like

Posted 03 July 2014 - 05:40 AM

You also have to keep i mind what the users on a given platform expect from the software installation process.

 

Windows users are used to GUI installers. Mac users are familiar with standardised installers via Apple's installation tool, but they'd mostly prefer that your software is sold through the App Store, or delivered as a simple zip/diskimage (in that order).

 

Linux users are used to package managers and raw source code. It drives me up the wall that Eclipse delivers binaries that require a custom shell script to install - if your software isn't delivered by PPA, or in source code form with a working make install, there is a good chance I won't install it.


Tristam MacDonald - Software Engineer @Amazon - [swiftcoding]


#13 realh   Members   -  Reputation: 185

Like
1Likes
Like

Posted 03 July 2014 - 05:48 AM

I agree about using .deb. You should look at the available distributions between at least Debian stable and Ubuntu LTS and build on whichever is the older at the time. Then, generally, you'll have a single package that's compatible with both of those and anythng newer, although occasionally backwards compatibility breaks. Where possible use libraries from the distro instead of including your own copies.

 

Similarly you should think about building a .rpm on RedHat (I think that's the most conservative RPM distro) which should work on all common RPM-based distros.

 

There's a program called alien which can convert .rpm to .deb but the resultant packages might not be very high quality in terms of using approved scripts etc to integrate into Debian/Ubuntu the Proper Way.

 

Finally, continue to make a tarball or zip available for users to install manually on other distros. But do include a .desktop file and/or wrapper script for the mono command, and make it flexible about where it's installed. If you can't avoid hardwired paths use /usr/local for the tarball. Packages should use /usr, but /opt is acceptable for 3rd party packages, and probably preferable if it isn't FHS-compliant.



#14 DvDmanDT   Members   -  Reputation: 855

Like
0Likes
Like

Posted 03 July 2014 - 05:52 AM

 

Installing into /opt currently seems like a rather reasonable approach since we currently need all files in the same directory. nixstaller seems pretty nice, but it bothers me somewhat that it hasn't really been updated since 2009. It also borders on the issue Bregma brought up, seems a bit like the Windows way of doing stuff.

It is the Windows way of doing stuff, but most people won't care.  The purists will, but they'll either reject your product because it's not Free or they'll be really vehemently vocal in forums on the internet but can be safely ignored.  The rest just want to install and use your software and don't care about such issues.

 

The real danger/disadvantage to having a complete bundle is (1) you will have to take care of your own security updates -- only really an issue if you have networked functionality or protect user assets in some way, and (b) if you have any external dependencies at all (eg. C or other language runtimes) your product could break on the next system upgrade.  Unlike Windows, most Linux distros upgrade on a regular basis.

 

It really sounds like the single bundle is your best option.  It does work well for Steam, although they have their own installer and automated update mechanism to alleviate the problems I outlined above.  Have you considered going through Steam?

 

 

We rely on Mono and most distributions appear to ship fairly stable packages of it, so I'm not too worried about that. I'm currently looking at the open build service, it appears capable of building packages for most major distributions with a single setup, which is nice. It's not really meant for the things we are doing though..

 

Going through steam does not seem suitable for this tool. It's a non-game related premium (as in thousands of dollars per user) development tool.



#15 Matias Goldberg   Crossbones+   -  Reputation: 3137

Like
2Likes
Like

Posted 03 July 2014 - 10:12 AM

You do that with desktop entries: http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html. This will work regardless of the desktop environment.

This! THIS! A million times this. If you want to do it on your own, adhere to the freedesktop standard and the Filesystem Hierarchy Standard (i.e. if you install into /usr/bin you will be haunted down).

 

Delivering deb and rpm packages provides the most native experience. However on personal experience, maintaining these packages is a lot of work (i.e. you need to check it still works with each new Ubuntu/Debian release; sometimes it breaks or complains of something new; or some dependency that is still there but changed its version numbering system and now can't install, or forces to download 1GB worth of updates to install your software, etc etc etc) which is the reason you always have to provide a zip file just in case the deb/rpm didn't work.



#16 Bregma   Crossbones+   -  Reputation: 4985

Like
2Likes
Like

Posted 03 July 2014 - 11:00 AM

Delivering deb and rpm packages provides the most native experience. However on personal experience, maintaining these packages is a lot of work (i.e. you need to check it still works with each new Ubuntu/Debian release; sometimes it breaks or complains of something new; or some dependency that is still there but changed its version numbering system and now can't install, or forces to download 1GB worth of updates to install your software, etc etc etc) which is the reason you always have to provide a zip file just in case the deb/rpm didn't work.

If your software no longer works on an up-to-date system, it's better to find out and fix it early on.  Or, you can not do it and just leave it completely broken for end users.  The release of new distro versions is never a surprise and the dates are almost always known 6 months in advance, and the prerelease versions are available for many months in advance just so you can update your stuff.  In the case of a commercial tool , you may find you want to update that often anyway.
 
Generally dependency version break their scheme because they have an ABI break.  In that case, you probably want to update your packages to use the new ABI, so it's a good thing.  Most important packages will also provide a coinstallable backwards-compatible version to ease the transition.
 
If you need to download 1 GB worth of dependencies for your software if it's properly packaged using the native package manager, then your ZIP file is going to be at least that big as well.  There is no shortcut.


Stephen M. Webb
Professional Free Software Developer

#17 Matias Goldberg   Crossbones+   -  Reputation: 3137

Like
1Likes
Like

Posted 04 July 2014 - 01:41 PM

If your software no longer works on an up-to-date system, it's better to find out and fix it early on.

It's not the software that breaks on an up-to-date system, it's the installer package that thinks it does. If the software is manually unpacked and executed, it runs perfectly fine. That's what I'm talking about.

This happens with common popular commercial software like Skype, Opera, CodeXL, AMD Drivers, NVIDIA drivers...
 

The release of new distro versions is never a surprise and the dates are almost always known 6 months in advance, and the prerelease versions are available for many months in advance just so you can update your stuff.  In the case of a commercial tool , you may find you want to update that often anyway.

That is part of the problem. Not everyone migrates immediately from Ubuntu 12 to 13, and from 13 to 14.04
Reasons are varied: Stability (Somewhere in a chance 4 out of 5 something breaks when updating the kernel. Usually it's the gpu driver, but ALSA also breaks ocassionally, or the WiFi card, or the VM kernel driver, and it takes time to get them running again); Bandwidth (it takes time to update, specially when the user doesn't have good bandwidth), Breaking changes to the software he uses, etc.
For Server stations, this makes perfect: they don't use any of what usually breaks, and fixing security vulnerabilities is top priority. But for Desktop it's a lot of nuissance.

We can have the following scenarios:

  • The OP packages his deb for one version of Ubuntu. Miraculously it works on all versions. Everyone's happy. This happens, but is somewhat rare.
  • The OP's packages his deb for one version of Ubuntu. It doesn't install some versions of Ubuntu. However unzipping the SW shows it works fine. This is very common.
  • The OP creates a package for three different Ubuntu versions (14, 13 & 12) for each release he makes. Users must download the deb for his specific version.
  • The OP's has packaged his deb for an older version of Ubuntu, but didn't package a new one yet. The latest users must use ZIP until the OP releases a newer version.
  • The latest software release by OP is a bit buggy. So its users prefer using a previous version. But the deb package is naturally, an old one. Thus likely to be incompatible with the latest version of Ubuntu.

Now multiply this with the number of distros the OP wants to support. This quickly becomes an explosion. Sure, you can hire an expert guy for each OS distro that can do miracles and put you in best case scenario almost every time. If you're very lucky you find an expert in two different distros.
But doesn't change the fact you need to allocate a disproportionate amount of resources to just keep an installer going. Which makes sense when a particular distro is your core market.
 
 

If you need to download 1 GB worth of dependencies for your software if it's properly packaged using the native package manager, then your ZIP file is going to be at least that big as well.  There is no shortcut.

Because the OP's package depends on XX, which wasn't installed, apt installs the latest version 1.2.1-svn1 (instead of 1.2.1-svn0; the packages were recently updated) it triggers a domino-effect of dependencies to update almost everything to the latest version. If you're unlucky, it triggers the kernel, X11 and/or Mesa to update too. And after reboot you have to fix the side-effects.
You can give me a lecture of how I should keep everything up to date to fix the latest vulnerabilities and other reasons. And you will be right.

But it doesn't change the fact that I just wanted to get work done with the OP's product, and now have to download 1 GB of updates, potentially break my system's boot (or another tool); and all of this would've been avoided if I'd installed the OP's software one week ago before the package 1.2.1-svn1 went live (forcing me to update everything).
From a Desktop user's perspective, this is user hostile.

Unzipping the program shows the software still works. May be I needed to paste the SO files of XX 1.2.1 I got somewhere else (or was just included with the zip). Or may be the program works fine except for the functionality that was provided by XX.

I'm an avid Linux user. But this is what I like from Windows. I can grab an installer written in 2003 for Windows XP and still works in 7.
I can't say the same for most deb packages from just 3 years ago.

Well, in short; I still advise the .deb package because when it works, it rocks. Despite the drawbacks, it will solve your problems for the ~80% of your user base. But this doesn't replace the Zip, which can be useful for that other 20%.
Many of us go for the .deb first. If that doesn't work, retry with the zip.
And if for some reason you go out of business (hope you don't!) your deb packages will break eventually (same can be said on Windows though, I can't expect much from an installer or its software written for Windows 98 to work on Windows 7 x64...). But Zips have a longer lifespan (specially if you bundle them with all necessary SO files).



#18 Sik_the_hedgehog   Crossbones+   -  Reputation: 1605

Like
0Likes
Like

Posted 04 July 2014 - 06:01 PM


It's not the software that breaks on an up-to-date system, it's the installer package that thinks it does. If the software is manually unpacked and executed, it runs perfectly fine. That's what I'm talking about.

Don't forget that Ubuntu has the annoying custom of removing anything it thinks is outdated when updating to a newer version, even if there isn't any replacement for it, without giving you the choice to avoid it. That's how I ended up with Wings 3D being uninstalled -_-' If Ubuntu decides that some package you need is outdated, expect old programs to break even if manually unpacking them would have worked normally.


Don't pay much attention to "the hedgehog" in my nick, it's just because "Sik" was already taken =/ By the way, Sik is pronounced like seek, not like sick.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS