View Single Post
Old 04-19-2007, 11:00 AM   #24
mtas
Enthusiast
mtas doesn't littermtas doesn't litter
 
Posts: 42
Karma: 145
Join Date: Oct 2006
Device: iLiad
Quote:
Originally Posted by Henry Loenwind
For applications that the user does not need to click on in the Content Lister, /usr/local/bin would be the usual way to go. Apps he has to click on to start, I proposed the /media/*/programs (symlinked from /usr/local/programs) for. However, whether to place the whole app there or just a manifest and starter script, mmmh, I'm not sure. Putting all in one directory allows the user to "uninstall" an app by deleting without leaving too many traces behind.

ipkg remove could be included in the GUI frontend. But that's a feature for version 2 or so...
Enough talk . I've now created two scripts that should be interesting.

The first one does the following:
  • Creates the directory additional_progs in the root of the file system from where it is run
  • Creates the hidden directory _local under additional progs
  • Creates the directory home under additional_progs/_local and a file named environment in that directory. This file contains environment variables that should be common for all locally installed programs.
  • Finally it makes a symlink from /usr/local to additional_progs/_local
This should set-up a reasonable "skeleton" for installing local applications.

The other one is an ipkg file embedded in a shell script. In this way you can simply select this script with the content lister and the ipkg package will be installed in /usr/local and a directory will be created in additional_progs. This directory contains the usual manifest.xml, icon and a script to execute the installed program. The script also sources the file /usr/local/home/environment mentioned above so that DISPLAY and LD_LIBRARY_PATH is set correctly.

So, now that I've stolen an hour of my employers time I'll go home and test it. If it works out OK I'll post it tomorrow.
mtas is offline   Reply With Quote