2010-05-25 12:52 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)

+ contrib/hbide/idedetect.prg
    + Added: -plugin= plugin to detect output target.

  * contrib/hbide/ideprojmanager.prg
    + Implemented: -plugin=( hb_dirBase() + "idedetect.prg" ).

      This implementation raises the barrier what was ailing hbIDE
      since long to detect the executable properly. 

      Thanks Viktor, this is wonderful addition to hbMK2.
This commit is contained in:
Pritpal Bedi
2010-05-25 19:56:03 +00:00
parent 3458d7e9e7
commit 678f8c14ac
3 changed files with 62 additions and 19 deletions

View File

@@ -17,6 +17,18 @@
past entries belonging to author(s): Viktor Szakats.
*/
2010-05-25 12:52 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
+ contrib/hbide/idedetect.prg
+ Added: -plugin= plugin to detect output target.
* contrib/hbide/ideprojmanager.prg
+ Implemented: -plugin=( hb_dirBase() + "idedetect.prg" ).
This implementation raises the barrier what was ailing hbIDE
since long to detect the executable properly.
Thanks Viktor, this is wonderful addition to hbMK2.
2010-05-25 21:12 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* utils/hbmk2/hbmk2.prg
* '-plug=' option renamed to '-plugin='

View File

@@ -0,0 +1,42 @@
/*
* $Id$
*/
/*
* Harbour Project source code:
*
* Copyright 1999-2010 Viktor Szakats (harbour.01 syenar.hu)
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit
* their web site at http://www.gnu.org/).
*
*/
FUNCTION hbmk2_plugin_show_target( hbmk2 )
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
ENDSWITCH
RETURN ""

View File

@@ -1260,6 +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" )
IF lRebuild
aadd( aHbp, "-rebuild" )
ENDIF
@@ -1371,6 +1372,13 @@ 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
@@ -1439,25 +1447,6 @@ METHOD IdeProjManager:launchProject( cProject, cExe )
ENDIF
cTargetFN := hbide_pathToOSPath( cTargetFN )
#if 0
IF !empty( cExe )
hb_fNameSplit( cExe, , , @cExt )
ENDIF
IF !empty( cExt ) .AND. lower( cExt ) == ".exe"
cTargetFN := cExe
ELSE
cTargetFN := hbide_pathFile( oProject:destination, iif( empty( oProject:outputName ), "_temp", oProject:outputName ) )
#ifdef __PLATFORM__WINDOWS
IF oProject:type == "Executable"
cTargetFN += '.exe'
ENDIF
#endif
IF !hb_FileExists( cTargetFN )
cTargetFN := oProject:launchProgram
ENDIF
ENDIF
#endif
IF ! hb_FileExists( cTargetFN )
cTmp := "Launch error: file not found - " + cTargetFN