Przemyslaw Czerpak wrote:
> On Tue, 17 Feb 2009, Maurilio Longo wrote:
> 
> Hi Maurilio,
> 
>> hb_DirBase() is empty if I don't write the full path to hbmk2.exe when 
>> calling
>> it (either absolute or relative).
>> It seems that argv[0] does not contain executable path, but just executable
>> name (I did just a quick test).
> 
> Please look at source/vm/cmdarg.c and function hb_cmdargInit().
> We are trying her to replicate DOS argv[0] behavior in different
> platform. If OS2 has sth like GetModuleFileName() in Windows then
> please add support for it and overload the 1-st parameter by the
> result kept in static s_szAppName buffer. I guess that in OS2
> the .exe extension is not added to argv[0] so the PATH scan does
> not work. If I'm right then it should work if you call it using:
> hbmk2.exe. In such case if OS2 does not have function like MS-Win
> GetModuleFileName() then you may try to set the default extension.
> Before:
>             while( pNextPath )
>             {
> 
> add this lines:
> 
> #ifdef HB_OS_OS2
>             if( !pFName->szExt )
>                pFName->szExt = ".exe";
> #endif

Przemyslaw,

as usual you're right, calling hbmk2.exe makes it work :)

I'll try to fix this issue.

Thanks.

Maurilio.


-- 
 __________
|  |  | |__| Maurilio Longo
|_|_|_|____| farmaconsult s.r.l.


_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to