2010-05-25 22:28 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)

* contrib/hbide/ideprojmanager.prg
    ! Fixed output directory issue without the need for an hbmk2 plugin.
      HBIDE was changing current dir when calling hbmk2, so the detected
      output filename needs to be rebased from that directory.

  * contrib/hbide/ideprojmanager.prg
  - contrib/hbide/idedetect.prg
  + contrib/hbide/resources/hbmk2_plugin_hbide.prg
    * Moved plugin to resources directory.
    - Commented plugin content.

  * utils/hbmk2/hbmk2.prg
    * Cleaned up path seps in plugin filenames.
This commit is contained in:
Viktor Szakats
2010-05-25 20:29:55 +00:00
parent 678f8c14ac
commit 924c97055e
4 changed files with 35 additions and 26 deletions

View File

@@ -17,6 +17,21 @@
past entries belonging to author(s): Viktor Szakats.
*/
2010-05-25 22:28 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbide/ideprojmanager.prg
! Fixed output directory issue without the need for an hbmk2 plugin.
HBIDE was changing current dir when calling hbmk2, so the detected
output filename needs to be rebased from that directory.
* contrib/hbide/ideprojmanager.prg
- contrib/hbide/idedetect.prg
+ contrib/hbide/resources/hbmk2_plugin_hbide.prg
* Moved plugin to resources directory.
- Commented plugin content.
* utils/hbmk2/hbmk2.prg
* Cleaned up path seps in plugin filenames.
2010-05-25 12:52 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
+ contrib/hbide/idedetect.prg
+ Added: -plugin= plugin to detect output target.
@@ -25,7 +40,7 @@
+ Implemented: -plugin=( hb_dirBase() + "idedetect.prg" ).
This implementation raises the barrier what was ailing hbIDE
since long to detect the executable properly.
since long to detect the executable properly.
Thanks Viktor, this is wonderful addition to hbMK2.

View File

@@ -1260,7 +1260,7 @@ METHOD IdeProjManager:buildProject( cProject, lLaunch, lRebuild, lPPO, lViaQt )
aadd( aHbp, "-info" )
aadd( aHbp, "-lang=en" )
aadd( aHbp, "-width=512" )
aadd( aHbp, "-plugin=" + hb_dirBase() + "idedetect.prg" )
aadd( aHbp, "-plugin=" + hb_dirBase() + "resources/hbmk2_plugin_hbide.prg" )
IF lRebuild
aadd( aHbp, "-rebuild" )
ENDIF
@@ -1372,13 +1372,6 @@ METHOD IdeProjManager:finished( nExitCode, nExitStatus, oProcess )
IF ::lLaunch
cTmp := ::oOutputResult:oWidget:toPlainText()
cExe := ""
IF empty( cExe )
cTkn := "TARGET (ABSOLUTE): "
IF ( n := at( cTkn, cTmp ) ) > 0
n1 := hb_at( Chr( 10 ), cTmp, n + len( cTkn ) )
cExe := StrTran( substr( cTmp, n + len( cTkn ), n1 - n - len( cTkn ) ), Chr( 13 ) )
ENDIF
ENDIF
IF empty( cExe )
cTkn := "hbmk2: Linking... "
IF ( n := at( cTkn, cTmp ) ) > 0
@@ -1394,6 +1387,8 @@ METHOD IdeProjManager:finished( nExitCode, nExitStatus, oProcess )
ENDIF
ENDIF
cExe := hbide_PathProc( cExe, hbide_pathToOSPath( ::oProject:location ) )
::outputText( " " )
IF empty( cExe )
::outputText( "<font color=red>" + "Executable could not been detected from linker output!" + "</font>" )

View File

@@ -25,18 +25,17 @@
*
*/
FUNCTION hbmk2_plugin_show_target( hbmk2 )
FUNCTION hbmk2_plugin_show_target( hbmk2 )
SWITCH hbmk2[ "cSTATE" ]
CASE "post_all"
SWITCH hbmk2[ "cSTATE" ]
CASE "post_all"
IF hbmk2[ "nErrorLevel" ] == 0
hbmk2_OutStd( hbmk2, "@@ TARGET: " + hbmk2[ "cTARGETTYPE" ] + " : " + hbmk2[ "cTARGETNAME" ] )
hbmk2_OutStd( hbmk2, "@@ TARGET (ABSOLUTE): " + hbmk2_PathMakeAbsolute( hbmk2[ "cTARGETNAME" ], hbmk2_Macro( hbmk2, "${hb_curdir}" ) ) )
ENDIF
EXIT
// IF hbmk2[ "nErrorLevel" ] == 0
// hbmk2_OutStd( hbmk2, "@@ TARGET: " + hbmk2[ "cTARGETTYPE" ] + " : " + hbmk2[ "cTARGETNAME" ] )
// hbmk2_OutStd( hbmk2, "@@ TARGET (ABSOLUTE): " + hbmk2_PathMakeAbsolute( hbmk2[ "cTARGETNAME" ], hbmk2_Macro( hbmk2, "${hb_curdir}" ) ) )
// ENDIF
EXIT
ENDSWITCH
RETURN ""
ENDSWITCH
RETURN ""

View File

@@ -2080,9 +2080,9 @@ FUNCTION hbmk2( aArgs, /* @ */ lPause )
CASE Left( cParamL, Len( "-plugin=" ) ) == "-plugin="
cParam := PathProc( MacroProc( hbmk, SubStr( cParam, Len( "-plugin=" ) + 1 ), aParam[ _PAR_cFileName ] ), aParam[ _PAR_cFileName ] )
IF ( tmp := FindInPathPlugIn( PathSepToSelf( cParam ) ) ) != NIL
AAdd( hbmk[ _HBMK_aPLUGIN ], PathSepToTarget( hbmk, tmp ) )
cParam := PathNormalize( PathProc( PathSepToSelf( MacroProc( hbmk, SubStr( cParam, Len( "-plugin=" ) + 1 ), aParam[ _PAR_cFileName ] ) ), aParam[ _PAR_cFileName ] ) )
IF ( tmp := FindInPathPlugIn( cParam ) ) != NIL
AAdd( hbmk[ _HBMK_aPLUGIN ], tmp )
ELSE
IF hbmk[ _HBMK_lInfo ]
hbmk_OutStd( hbmk, hb_StrFormat( I_( "Warning: Plugin not found: %1$s" ), cParam ) )
@@ -7267,9 +7267,9 @@ STATIC FUNCTION HBC_ProcessOne( hbmk, cFileName, nNestingLevel )
CASE Lower( Left( cLine, Len( "plugins=" ) ) ) == "plugins=" ; cLine := SubStr( cLine, Len( "plugins=" ) + 1 )
cLine := PathProc( MacroProc( hbmk, cLine, cFileName ), FN_DirGet( cFileName ) )
IF ( tmp := FindInPathPlugIn( PathSepToSelf( cLine ) ) ) != NIL
AAdd( hbmk[ _HBMK_aPLUGIN ], PathSepToTarget( hbmk, tmp ) )
cLine := PathNormalize( PathProc( PathSepToSelf( MacroProc( hbmk, cLine, cFileName ) ), FN_DirGet( cFileName ) ) )
IF ( tmp := FindInPathPlugIn( cLine ) ) != NIL
AAdd( hbmk[ _HBMK_aPLUGIN ], tmp )
ELSE
IF hbmk[ _HBMK_lInfo ]
hbmk_OutStd( hbmk, hb_StrFormat( I_( "Warning: Plugin not found: %1$s" ), cLine ) )