Re: Registry file

Stephane Bonhomme (Stephane.Bonhomme@imag.fr)
Mon, 01 Dec 1997 18:57:39 +0100

> When I build my application based on Thot library (by doing app),
> the execution of this application produce the warning telling that
> "System wide thot.ini not found at /...MY_HOME_DIR.../config/thot.ini"
> Where can I tell (in simple way) to my application that Thot Registry
> is elsewhere ($THOTDIR/config/thot.ini for example).
> In Apiman, I can read :
>
> void TtaInitialize(char *applicationName)
> Parameter:
> applicationName: name of the application that requires services
> from the tool kit.
> - This name is used for accessing the ressources defined in the
> - Registry.
> I don't understand this last sentence (denoted by -). How it is done.
>
> Best Regards, Ali.
>

Unfortunately the path to thot.ini file is harcoded from the location of the
application binary. (the config directory *MUST* be located two directories
higher than your binary actually is) so the best is to move the binary in the
same directory than thot binary (e.g. $THOTDIR/$MACHINE/bin) or any directory
two levels under your THOTDIR ($THOTDIR/myappli/bin should work).

Anyway Thot manages symbolic links upon startup so you can link from the
original place of your application to the moved binary. (I agree that this
strategy is not the best one, and I hope we'll have the time to find something
better for the next release:)

Anyway, there is nothing to do with TtaInitialize which is called from the
app-generated EDITOR.c file. If you want to patch the acces to the registry
file see TtaInitializeAppRegistry from thotlib/base/registry.c we would be
glad to have help on supporting this code :))

Stephane.