Linux "package installers"

Archives Forums/Linux Discussion/Linux "package installers"

Brucey(Posted 2009) [#1]
Well, after several hours of faffing around I've managed to create a Linux .deb package file for my RadioBaH application.

Obviously, having your application install itself into the system properly makes things look at least a little bit professional - rather than unzipping it somewhere, and having the user double-click on the executable in the file-browser.
It's certainly nice to see it appear in the applications menu :



But... it's such a lot of work to set up the "build" folder, and edit all the package text files.

You'd think, after all this time, there would be some kind of semi-helpful GUI tool which could take away some of the pain of having to know too much about the Linux filesystem.

Mind you, in some ways, it does force you to understand a bit more, and in turn has you putting your resource files into places like : /usr/share/appname/xxxx
rather than some local folder you unzipped.

Because I needed a custom shared-object, I ended up writing a shell script which is installed in /usr/bin, which sets up LD_LIBRARY_PATH before running the actual binary itself - launching via script is similar to how many other applications work.

Anyhoo... I'm just whinging about the level of difficulty and effort involved in creating a .deb package. So don't mind me.

Users "of" the .deb file of course have it easy... :-p


SLotman(Posted 2009) [#2]
Awww... and I was thinking you would indicate some great solution you found to make an installer on Linux... :(

Would be pretty sweet if the game I'm making could create an icon on the desktop, and an entry in the applications menu, just like yours... but if it's too complicated, I'll stick with .tar.gz :P~

Can you post at least some resources you found about how to do it?


Brucey(Posted 2009) [#3]
Well, I was hoping for a great solutions - maybe one day GiftWrap will do it all - but there's nothing (that I could find).

However, I did find a video which led me through all the bits and pieces :

http://showmedo.com/videotutorials/video?name=linuxJensMakingDeb

Took me about 4 or 5 attempts, making some code changes to use the "resources" location to find the locale texts. Thankfully, wxMax has a built-in cross-platform function to do this properly :-)

I suppose, it shouldn't actually be too hard to create an app to do all this for you - at least in a BlitzMax context of binaries, data and shared objects.
GiftWrap expects source that it can compile up itself. Well, the packaging system does too, but you can get around that.


markcw(Posted 2009) [#4]
Well this is certainly the first time I've heard anyone actually created a .deb for a BMax app so that's encouraging.

Were there any pitfalls missed out by the video? Things you had to solve yourself?


Brucey(Posted 2009) [#5]
I couldn't get my libbass.so to install into /usr/lib for whatever reason - I thought I'd done everything to have it copy it into the correct folder, but it wasn't having any of it.

Talking of this shared object, one of the nice things during the creation of the .deb is that it tells you which shared-objects you are "requiring" although aren't actually using - which means I think I need to remove three entries from the wxMax links. It also couldn't find the .so during the process, so I had to set LD_LIBRARY_PATH before performing the "build". (It would have worked without this, but I prefer not to have warnings if I can help it!)

So I ended up having it installed in the apps's share lib folder. Not ideal, perhaps, but it works from there.

Still... I think it *really* wants a little helper app to make the process a lot less effort. I can't imagine having to go through this every time I want to create a new Linux app...


... and of course, I think something like Book I would appear a little more professional were it "self installing" on Linux ;-)