[Lazarus] Deploying application with librarys

Graeme Geldenhuys graemeg.lists at gmail.com
Tue Aug 7 17:45:03 CEST 2012


Hi,

>
> You should not do it like this. Never every copy files to /usr/lib or so.
> If the user decides to install openal later, it will conflict with your
> install.

Michael van Canneyt is correct. Under Linux, that is a bad idea and
can cause all sorts of problems. As he pointed out, there are
alternatives.

Or....

Try and use /usr/local/* directory hierarchy. eg; /usr/local/bin and
/usr/local/lib
Most apps that install from source (not the packaging system) install
to /usr/local/*
Obviously, conflicts could still occur, but maybe your installer could
flag if a *.so already exists, and that flag will notify the uninstall
script to NOT delete that file.

You could also have a $HOME/bin and $HOME/lib directories, and the
.bashrc (or whatever terminal interface is used) adds $HOME/lib to the
users LD_LIBRARY_PATH environment variable, and $HOME/bin to the PATH
environment variable (the latter is normally done by the distro
already). But this means that your installed program will only work
for that user, not for the system wide users. But this is sometimes
desired anyway.

Extending on the second example above. Some Linux specification (for
single user setups) also recommed using the $HOME/.local/ directory
hierarchy which contains 'share', 'lib', 'bin', and the *.desktop
files go into $HOME/.local/share/applications/


-- 
Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://fpgui.sourceforge.net




More information about the Lazarus mailing list