Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2019-11

Installer/uninstaller on Linux for fpc/lazarus programs?

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Bo Berglund

I am wondering how exactly I should package the program I am developing for Raspberry Pi so it can be uniformly installed and uninstalled on new RPi units...

It is an Arm binary for RPi3 or Rpi4 type units running Raspbian Buster. So I could stuff the binary into /usr/bin I suppose, but it also needs a config file (below /etc, right?) and some data files which go into a new directory tree somewhere (where?). The dir (which needs to be created) shall be populated with some example files and such.

And this is a pure command line application meant to be run from cron or possibly as a service. Not sure yet.

On Windows for my previous Delphi applications I used InnoSetup but that is not valid on Linux of course.

My aim is to get a way to install which will help the production and service people when we move away from using Windows PC as a platform.

Needless to say I am not so familiar with everyday use/maintenance of Linux computers. I have only used RPi boxes for dev work and experimentation so far....

Or should I simply write some FPC command line utility to do the job? Or maybe an install script and put that into a tgz file?

What do people normally do?

Bo Berglund Developer in Sweden

Reply by email

Andreas Schneider
to Bo Berglund
Bo Berglund wrote 32 lines
I am wondering how exactly I should package the program I am developing for Raspberry Pi so it can be uniformly installed and uninstalled on new RPi units... It is an Arm binary for RPi3 or Rpi4 type units running Raspbian Buster. So I could stuff the binary into /usr/bin I suppose, but it also needs a config file (below /etc, right?) and some data files which go into a new directory tree somewhere (where?). The dir (which needs to be created) shall be populated with some example files and such. And this is a pure command line application meant to be run from cron or possibly as a service. Not sure yet. On Windows for my previous Delphi applications I used InnoSetup but that is not valid on Linux of course. My aim is to get a way to install which will help the production and service people when we move away from using Windows PC as a platform. Needless to say I am not so familiar with everyday use/maintenance of Linux computers. I have only used RPi boxes for dev work and experimentation so far.... Or should I simply write some FPC command line utility to do the job? Or maybe an install script and put that into a tgz file? What do people normally do? -- Bo Berglund Developer in Sweden

That totally depends. Many applications are user space applications. Treat them as such. Users are not administrators and should not require admin rights to setup their application. I would either go with a statically linked application that has no dependencies beyond its own executable or if that is unavoidable pack it into an AppImage.

If the application is a system wide tool (or some daemon, service, etc.) you will have to package it distribution specific. Focus on CentOS/RedHat (RPM) and Debian/Ubuntu (DEB). It would also help to offer a "simple" binary distribution (tgz) for all the other maintainers out there to adopt them easily to their distributions and for people who want to setup your service (again) without admin rights, as part of a CI/CD pipeline, in docker, or whatever.

Speaking of docker: that would probably be also another good fit for a service/daemon. That way it is completely distribution (and even OS) agnostic.

Reply by email