From 504f829813d8a3a480ba86c1c2dc95aa3a9dcd25 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sun, 17 Jun 2012 00:55:46 +0000 Subject: [PATCH] 2012-06-17 02:51 UTC+0200 Viktor Szakats (harbour syenar.net) * contrib/hbrun/hbrun.hbp * restored to embed headers in hbrun * utils/hbmk2/hbmk2.prg ! minor cleanups in runner UI ! fixed to open .dbf using cmd 'hbmk2 test.dbf' (emulating old hbrun behavior) + shows error messages when dynamic library failed to load --- harbour/ChangeLog | 10 +++++++++ harbour/contrib/hbrun/hbrun.hbp | 2 ++ harbour/utils/hbmk2/hbmk2.prg | 39 +++++++++++++++++++-------------- 3 files changed, 34 insertions(+), 17 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index af8901e85b..c85bfea80b 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,16 @@ The license applies to all entries newer than 2009-04-28. */ +2012-06-17 02:51 UTC+0200 Viktor Szakats (harbour syenar.net) + * contrib/hbrun/hbrun.hbp + * restored to embed headers in hbrun + + * utils/hbmk2/hbmk2.prg + ! minor cleanups in runner UI + ! fixed to open .dbf using cmd 'hbmk2 test.dbf' (emulating + old hbrun behavior) + + shows error messages when dynamic library failed to load + 2012-06-17 02:20 UTC+0200 Viktor Szakats (harbour syenar.net) * contrib/hbcurl/hbcurl.hbp ! stupid typo in prev diff --git a/harbour/contrib/hbrun/hbrun.hbp b/harbour/contrib/hbrun/hbrun.hbp index d63eb25593..a4e78075c6 100644 --- a/harbour/contrib/hbrun/hbrun.hbp +++ b/harbour/contrib/hbrun/hbrun.hbp @@ -8,6 +8,8 @@ -static +-DHBMK_WITH_ALL_EMBEDDED_HEADERS + hbct.hbc -request=__HBEXTERN__HBCT__ hbexpat.hbc -request=__HBEXTERN__HBEXPAT__ hbmemio.hbc -request=__HBEXTERN__HBMEMIO__ diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index a5f4f517cc..6a7cf6c977 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -586,7 +586,7 @@ PROCEDURE _APPMAIN( ... ) IF ( Right( Lower( hb_FNameName( hb_argv( 0 ) ) ), 5 ) == "hbrun" .OR. ; Left( Lower( hb_FNameName( hb_argv( 0 ) ) ), 5 ) == "hbrun" .OR. ; hb_PValue( 1 ) == "." .OR. ; - "|" + Lower( hb_FNameExt( hb_PValue( 1 ) ) ) + "|" $ "|.hb|.hrb|" ) .AND. ; + "|" + Lower( hb_FNameExt( hb_PValue( 1 ) ) ) + "|" $ "|.hb|.hrb|.dbf|" ) .AND. ; !( ! Empty( hb_PValue( 1 ) ) .AND. ; ( Left( hb_PValue( 1 ), 6 ) == "-hbreg" .OR. ; Left( hb_PValue( 1 ), 8 ) == "-hbunreg" ) ) @@ -12502,22 +12502,27 @@ STATIC PROCEDURE __hbshell_ext_init( aExtension ) FUNCTION hbshell_ext_load( cName ) LOCAL cFileName LOCAL hLib + LOCAL tmp IF ! Empty( cName ) IF hb_Version( HB_VERSION_SHARED ) IF !( cName $ s_hLibExtDyn ) - cFileName := FindInPath( hb_libName( cName + hb_libPostfix() ),; + cFileName := FindInPath( tmp := hb_libName( cName + hb_libPostfix() ),; iif( hb_Version( HB_VERSION_UNIX_COMPAT ), GetEnv( "LD_LIBRARY_PATH" ), GetEnv( "PATH" ) ) ) - IF ! Empty( cFileName ) + IF Empty( cFileName ) + OutErr( hb_StrFormat( I_( "'%1$s' (%2$s) not found." ), cName, tmp ) + _OUT_EOL ) + ELSE hLib := hb_libLoad( cFileName ) - IF ! Empty( hLib ) + IF Empty( hLib ) + OutErr( hb_StrFormat( I_( "Error loading '%1$s' (%2$s)." ), cName, cFileName ) + _OUT_EOL ) + ELSE s_hLibExtDyn[ cName ] := hLib RETURN .T. ENDIF ENDIF ENDIF ELSE - OutErr( hb_StrFormat( I_( "Cannot load %1$s. Requires -shared %2$s build." ), cName, _SELF_NAME_ ) + _OUT_EOL ) + OutErr( hb_StrFormat( I_( "Cannot load '%1$s'. Requires -shared %2$s build." ), cName, _SELF_NAME_ ) + _OUT_EOL ) ENDIF ENDIF @@ -12778,6 +12783,16 @@ STATIC PROCEDURE __hbshell_prompt( aParams, cCommand ) AAdd( s_aHistory, PadR( "quit", HB_LINE_LEN ) ) nHistIndex := Len( s_aHistory ) + 1 + hb_gtInfo( HB_GTI_RESIZEMODE, HB_GTI_RESIZEMODE_ROWS ) + + SetKey( K_ALT_V, {|| hb_gtInfo( HB_GTI_CLIPBOARDPASTE ) } ) + + Set( _SET_EVENTMASK, hb_bitOr( INKEY_KEYBOARD, HB_INKEY_GTEVENT ) ) + + s_nRow := 3 + + __hbshell_Exec( "?? hb_Version()" ) + IF HB_ISSTRING( cCommand ) AAdd( s_aHistory, PadR( cCommand, HB_LINE_LEN ) ) __hbshell_Info( cCommand ) @@ -12786,18 +12801,8 @@ STATIC PROCEDURE __hbshell_prompt( aParams, cCommand ) cCommand := "" ENDIF - hb_gtInfo( HB_GTI_RESIZEMODE, HB_GTI_RESIZEMODE_ROWS ) - - SetKey( K_ALT_V, {|| hb_gtInfo( HB_GTI_CLIPBOARDPASTE ) } ) - - Set( _SET_EVENTMASK, hb_bitOr( INKEY_KEYBOARD, HB_INKEY_GTEVENT ) ) - - s_nRow := 2 + iif( Empty( hbshell_ext_get_list() ), 0, 1 ) - plugins := __hbshell_plugins_load( __hbshell_plugins(), aParams ) - __hbshell_Exec( "? hb_Version()" ) - DO WHILE .T. IF cLine == NIL @@ -12880,7 +12885,7 @@ STATIC PROCEDURE __hbshell_prompt( aParams, cCommand ) ENDIF IF s_nRow >= MaxRow() - Scroll( 2 + iif( Empty( hbshell_ext_get_list() ), 0, 1 ), 0, MaxRow(), MaxCol(), 1 ) + Scroll( 3, 0, MaxRow(), MaxCol(), 1 ) s_nRow := MaxRow() - 1 ENDIF ENDIF @@ -13007,7 +13012,7 @@ STATIC PROCEDURE __hbshell_Exec( cCommand ) Eval( bBlock ) s_nRow := Row() s_nCol := Col() - nRowMin := 2 + iif( Empty( hbshell_ext_get_list() ), 0, 1 ) + nRowMin := 3 IF s_nRow < nRowMin s_nRow := nRowMin ENDIF