Hi Pritpal,

It looks fine.

One more thing, not critical: it'd be better to 
use 'hbide_DirAddPathSep( GetEnv( "..." ) ) + "hbide\"'
instead of 'GetEnv( "..." ) + "\hbide\"', to avoid 
adding double slashes, in case the envvar already 
has it. (for *nix and win branches as well)

Viktor

On 2010 Apr 21, at 17:21, Pritpal Bedi wrote:

> 
> Viktor 
> 
> Here is the modified version.
> Please let me know if it needs refinements:
> 
> FUNCTION hbide_getIniPath( cHbideIni )
>   LOCAL cPath, cIni
> 
>   IF empty( cHbideIni )
>      IF ! hb_FileExists( cIni := hb_dirBase() + "hbide.ini" )
>      #if defined( __PLATFORM__WINDOWS )
>         cPath := GetEnv( "APPDATA" ) + "\hbide\"
>      #elif defined( __PLATFORM_UNIX )
>         cPath := GetEnv( "HOME" ) + "/.hbide/"
>      #endif
>         IF ! hb_dirExists( cPath )
>            MakeDir( cPath )
>         ENDIF
>         cIni := cPath + "hbide.ini"
>      ENDIF
>   ELSE
>      cIni := cHbideIni
>   ENDIF
> 
>   RETURN cIni
> 
> 
> The previous implementation was:
> 
>   IF empty( cHbideIni )
>      IF hb_fileExists( "hbide.ini" )
>         cHbideIni := "hbide.ini"
>      ELSE
>         cHbideIni := hb_dirBase() + "hbide.ini"
>      ENDIF
>   ENDIF
>   oIde:cProjIni := cHbideIni
> 
> new :
>   oIde:cProjIni := hbide_DetectIniPath( cHbideIni )
> 
> cHbideIni  is command-line supplied ini path.
> 
> -----
>     enjoy hbIDEing...
>        Pritpal Bedi 
> http://hbide.vouch.info/
> -- 
> View this message in context: 
> http://n2.nabble.com/hbide-create-and-testing-package-on-Ubuntu-tp4934285p4937623.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

_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to