Thread: iLiad Question to Adam. B
View Single Post
Old 04-18-2007, 01:31 AM   #16
smoogle
That dude with the thing
smoogle once ate a cherry pie in a record 7 seconds.smoogle once ate a cherry pie in a record 7 seconds.smoogle once ate a cherry pie in a record 7 seconds.smoogle once ate a cherry pie in a record 7 seconds.smoogle once ate a cherry pie in a record 7 seconds.smoogle once ate a cherry pie in a record 7 seconds.smoogle once ate a cherry pie in a record 7 seconds.smoogle once ate a cherry pie in a record 7 seconds.smoogle once ate a cherry pie in a record 7 seconds.smoogle once ate a cherry pie in a record 7 seconds.smoogle once ate a cherry pie in a record 7 seconds.
 
Posts: 20
Karma: 1904
Join Date: Apr 2007
Device: iLiad
Hey, Adam B,

I'm yet to recieve my shell account, so can't try this for myself; but does the iLiad have the appropriate libraries to call getexecname()

Could you just attempt to run this simple program on the iLiad?

---

#include <stdlib.h>
#include <stdio.h>

int main(int argc, char** argv) {
char const* ename = getexecname();
if(ename) {
printf("%s",ename);
}
}

---

Given your sources to fbreader that you have modified, I can make an adjusted version that will not require a fixed installation directory- I believe this would simplify things?

Basically the idea is, in all these programs that make use of certain defines, in the case of fbreader BASEDIR/HOMEDIR, for fbreader it does so in zlibrary/abstract/application;
ZLApplicationBase::BaseDirectory

By adjusting this to dynamically look for the location of the executable, we can then produce self-contained versions of the program, an example structure:

Programs
- fbreader
--- fbreader [ executable ]
--- _data
-----... usual contents of share/etc go in here ...


I would say applying this to other applications, for instance AbiWord, would be of immense benefit - as then installing any application would not at all touch the root filesystem.

The disadvantage to this method is cases where applications share data; as in suppose AbiWord uses fbreader's icons (I have just made up this dependancy for example's sake); in which case due to our self-contained structure they would not reference each other and we'd need two copies of the data.

This could of course be fixed by having AbiWord dynamically resolve where fbreader is installed- which could be done by adjusting the above structure, but I think baby steps first.

Last edited by smoogle; 04-18-2007 at 01:34 AM.
smoogle is offline   Reply With Quote