Viktor Szakáts wrote: > > Sorry, but I can't see what you mean by "respected". > You can read them using GETENV( "APPDATA" ). > > While the cmdline configuration option you mention above > is nice, it's still not a solution to this problem. > > Instead IMO you could do something like this: > > FUNCTION DetectIniPath() > > IF ! hb_FileExists( hb_dirBase() + "hbide.ini" ) > #if defined( __PLATFORM__WINDOWS ) > RETURN GetEnv( "APPDATA" ) + "\hbide\" > #elif defined( __PLATFORM_UNIX ) > RETURN GetEnv( "HOME" ) + "/.hbide/" > #endif > ENDIF > > RETURN hb_dirBase() > > And use the returned path as the base path for > hbide.ini, .viz and the rest. > > For the project base dir (and other default user > directories), you should use GetEnv( "HOME" ) > on *nix and GetEnv( "HOMEDRIVE" ) + GetEnv( "HOMEPATH" ) > for Windows. >
Thanks, this seems to be right solution. One point, however is, what if this path does not exists. What function is appropriate for creating folder ? ----- enjoy hbIDEing... Pritpal Bedi http://hbide.vouch.info/ -- View this message in context: http://n2.nabble.com/hbide-create-and-testing-package-on-Ubuntu-tp4934285p4937341.html Sent from the harbour-devel mailing list archive at Nabble.com. _______________________________________________ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour