FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Interface visual para Harbour hbmk2.exe
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Interface visual para Harbour hbmk2.exe
Posted: Sun Mar 17, 2013 10:35 PM
Harbour proporciona una potente utilidad make hbmk2.exe pero esta dise帽ada para ser usado desde una ventana de consola, por lo que pens茅 en proporcionarle un interface visual para que su uso sea a煤n mas sencillo :-)

Este es un primer prototipo, muy incompleto, pero tal vez quieras probarlo, dar ideas, etc. gracias

vhb.prg
Code (fw): Select all Collapse
#include "FiveWin.ch"

//----------------------------------------------------------------------------//

function BuildWindow()

聽 聽local oDlg, oGet1, cPrgName := Space( 20 ), oSay3, oFld1, oSay2, oBtn1, oBtn2
聽 聽local cResult, oResult, cPath, nRetCode

聽 聽SetDlgGradient( { { 1, RGB( 199, 216, 237 ), RGB( 237, 242, 248 ) } } )
聽 聽
聽 聽DEFINE DIALOG oDlg TITLE "Visual make for Harbour" ;
聽 聽 聽 SIZE 600, 500

聽 聽@ 16, 聽16 SAY oSay2 PROMPT "Main PRG" SIZE 聽30, 9 PIXEL OF oDlg

聽 聽@ 25, 16 GET oGet1 VAR cPrgName SIZE 120, 12 PIXEL OF oDlg ;
聽 聽 聽 ACTION oGet1:VarPut( cGetFile( "*.prg" ) )

聽 聽@ 50, 聽16 SAY oSay3 PROMPT "Additional" SIZE 30, 9 PIXEL OF oDlg

聽 聽@ 60, 16 FOLDER oFld1 PROMPTS "PRGs", "OBJs", "LIBs" ;
聽 聽 聽 SIZE 200, 100 PIXEL OF oDlg

聽 聽@ 22, 230 BUTTON oBtn1 PROMPT "&Build" ;
聽 聽 聽 SIZE 60, 20 PIXEL OF oDlg ;
聽 聽 聽 ACTION ( MemoWrit( "go.bat", "set path=c:\bcc582\bin" + CRLF + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽"c:\harbour\bin\hbmk2 " + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽"-comp=bcc " + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽"-ic:\fwteam\include " + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽"-lfiveh.lib " + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽"-lfivehc.lib " + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽"-Lc:\fwteam\lib " + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽"-lc:\bcc582\lib\psdk\psapi.lib " + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽"xhb.hbc " + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽"-gtgui " + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽AllTrim( cPrgName ) ),;
聽 聽 聽 聽 聽 聽 聽 聽nRetCode := WaitRun( "go.bat > out.log", 0 ),;
聽 聽 聽 聽 聽 聽 聽 聽oResult:SetText( GetError( nRetCode ) + CRLF + MemoRead( "out.log" ) ),;
聽 聽 聽 聽 聽 聽 聽 聽WaitRun( cFileNoExt( cPrgName ) ),;
聽 聽 聽 聽 聽 聽 聽 聽hb_SetEnv( "path", cPath ) )

聽 聽@ 48, 230 BUTTON oBtn2 PROMPT "&Cancel" ;
聽 聽 聽 SIZE 60, 20 PIXEL OF oDlg ;
聽 聽 聽 ACTION oDlg:End()

聽 聽@ 170, 16 SAY oSay3 PROMPT "Result" SIZE 30, 9 PIXEL OF oDlg

聽 聽@ 180, 16 GET oResult VAR cResult MEMO ;
聽 聽 聽 SIZE 200, 60 PIXEL OF oDlg

聽 聽ACTIVATE DIALOG oDlg CENTERED

return oDlg

//----------------------------------------------------------------------------//

function GetError( nError )

聽 聽do case
聽 聽 聽 case nError == 0
聽 聽 聽 聽 聽 聽return "Ok"
聽 聽
聽 聽 聽 case nError == 2
聽 聽 聽 聽 聽 聽return "unknown compiler"
聽 聽 聽 聽 聽 聽
聽 聽 聽 case nError == 6
聽 聽 聽 聽 聽 聽return "failed in compilation (Harbour, C compiler, Resource compiler)"
聽 聽 聽 聽 聽
聽 聽 聽 case nError == 7
聽 聽 聽 聽 聽 聽return "failed in final assembly (linker or library manager)" 聽 聽 聽 聽 
聽 聽 聽 聽 聽
聽 聽endcase
聽 聽
return Str( nError )

//----------------------------------------------------------------------------//

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 132
Joined: Thu Mar 08, 2007 06:12 PM
Re: Interface visual para Harbour hbmk2.exe
Posted: Mon Mar 18, 2013 12:28 AM

Saludos !
Se puede usar tambien com el compilador Mingw ?

Harbour / Bcc / MinGW / Fwh 13.9
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: Interface visual para Harbour hbmk2.exe
Posted: Mon Mar 18, 2013 01:35 AM

Hola

esa herramienta se puede usar con cualquier compilador de C soportado por harbour

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Interface visual para Harbour hbmk2.exe
Posted: Mon Mar 18, 2013 09:06 AM
Versi贸n mejorada con soporte de m煤ltiples PRGs:



vhb.prg
Code (fw): Select all Collapse
#include "FiveWin.ch"
#include "xbrowse.ch"

static oBrwPrgs, aPrgs := { { "", "", "" } }

//----------------------------------------------------------------------------//

function Main()

聽 聽local oDlg, oGetName, cPrgName := Space( 20 ), oFldAdditional
聽 聽local oBtnBuild, oBtnCancel
聽 聽local cResult, oResult, cPath, nRetCode

聽 聽SetDlgGradient( { { 1, RGB( 199, 216, 237 ), RGB( 237, 242, 248 ) } } )
聽 聽
聽 聽DEFINE DIALOG oDlg TITLE "Visual make for Harbour" ;
聽 聽 聽 SIZE 600, 500

聽 聽@ 16, 聽16 SAY "Main PRG" SIZE 聽30, 9 PIXEL OF oDlg

聽 聽@ 25, 16 GET oGetName VAR cPrgName SIZE 120, 12 PIXEL OF oDlg ;
聽 聽 聽 ACTION oGetName:VarPut( cGetFile( "*.prg" ) )

聽 聽@ 50, 聽16 SAY "Additional" SIZE 30, 9 PIXEL OF oDlg

聽 聽@ 60, 16 FOLDER oFldAdditional PROMPTS "PRGs", "OBJs", "LIBs" ;
聽 聽 聽 SIZE 200, 100 PIXEL OF oDlg

聽 聽BuildBrwPrgs( oFldAdditional )

聽 聽@ 22, 230 BUTTON oBtnBuild PROMPT "&Build" ;
聽 聽 聽 SIZE 60, 20 PIXEL OF oDlg ;
聽 聽 聽 ACTION ( MemoWrit( "go.bat", "set path=c:\bcc582\bin" + CRLF + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽"c:\harbour\bin\hbmk2 " + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽"-comp=bcc " + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽"-ic:\fwteam\include " + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽"-lfiveh.lib " + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽"-lfivehc.lib " + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽"-Lc:\fwteam\lib " + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽"-lc:\bcc582\lib\psdk\psapi.lib " + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽"xhb.hbc " + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽"-gtgui " + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽AllTrim( cPrgName ) + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽AToStr( aPrgs ) ),;
聽 聽 聽 聽 聽 聽 聽 聽nRetCode := WaitRun( "go.bat > out.log", 0 ),;
聽 聽 聽 聽 聽 聽 聽 聽oResult:SetText( GetError( nRetCode ) + CRLF + MemoRead( "out.log" ) ),;
聽 聽 聽 聽 聽 聽 聽 聽WaitRun( cFileNoExt( cPrgName ) ) )

聽 聽@ 48, 230 BUTTON oBtnCancel PROMPT "&Cancel" ;
聽 聽 聽 SIZE 60, 20 PIXEL OF oDlg ;
聽 聽 聽 ACTION oDlg:End()

聽 聽@ 170, 16 SAY "Result" SIZE 30, 9 PIXEL OF oDlg

聽 聽@ 180, 16 GET oResult VAR cResult MEMO ;
聽 聽 聽 SIZE 200, 60 PIXEL OF oDlg

聽 聽ACTIVATE DIALOG oDlg CENTERED ;
聽 聽 聽 ON INIT BuildFldButtons( oFldAdditional )

return oDlg

//----------------------------------------------------------------------------//

function GetError( nError )

聽 聽do case
聽 聽 聽 case nError == 0
聽 聽 聽 聽 聽 聽return "Ok"
聽 聽
聽 聽 聽 case nError == 1
聽 聽 聽 聽 聽 聽return "unknown platform"
聽 聽
聽 聽 聽 case nError == 2
聽 聽 聽 聽 聽 聽return "unknown compiler"
聽 聽 聽 聽 聽 聽
聽 聽 聽 case nError == 3
聽 聽 聽 聽 聽 聽return "failed Harbour detection" 聽 聽 
聽 聽 聽 聽 聽 聽
聽 聽 聽 case nError == 5 
聽 聽 聽 聽 聽 聽return "failed stub creation" 聽 聽 
聽 聽 聽 聽 聽 聽
聽 聽 聽 case nError == 6
聽 聽 聽 聽 聽 聽return "failed in compilation (Harbour, C compiler, Resource compiler)"
聽 聽 聽 聽 聽
聽 聽 聽 case nError == 7
聽 聽 聽 聽 聽 聽return "failed in final assembly (linker or library manager)" 聽 聽 聽 聽 
聽 聽 聽 聽 聽
聽 聽 聽 case nError == 8 
聽 聽 聽 聽 聽 聽return "unsupported" 聽 
聽 聽 聽 聽 聽
聽 聽 聽 case nError == 9 
聽 聽 聽 聽 聽 聽return "failed to create working directory" 聽 
聽 聽 聽 聽 聽
聽 聽 聽 case nError == 10 
聽 聽 聽 聽 聽 聽return "dependency missing or disabled" 聽 
聽 聽 聽 聽 聽
聽 聽 聽 case nError == 19 
聽 聽 聽 聽 聽 聽return "help" 聽 
聽 聽 聽 聽 聽
聽 聽 聽 case nError == 20 
聽 聽 聽 聽 聽 聽return "plugin initialization"
聽 聽 聽 聽 聽 聽
聽 聽 聽 case nError == 30 
聽 聽 聽 聽 聽 聽return "too deep nesting" 聽 聽 
聽 聽 聽 聽 聽 聽
聽 聽 聽 case nError == 50 
聽 聽 聽 聽 聽 聽return "stop requested" 聽 聽 
聽 聽endcase
聽 聽
return Str( nError )

//----------------------------------------------------------------------------//

function BuildBrwPrgs( oFld )

聽 聽@ 0, 0 XBROWSE oBrwPrgs ARRAY aPrgs SIZE 300, 180 PIXEL OF oFld:aDialogs[ 1 ]

聽 聽// oBrwPrgs:SetFont( ::oFontBrw )

聽 聽ADD TO oBrwPrgs HEADER "Name" DATA oBrwPrgs:aArrayData[ oBrwPrgs:nArrayAt ][ 1 ] SIZE 200
聽 聽ADD TO oBrwPrgs HEADER "Size" DATA oBrwPrgs:aArrayData[ oBrwPrgs:nArrayAt ][ 2 ] SIZE 聽80
聽 聽ADD TO oBrwPrgs HEADER "Date" DATA oBrwPrgs:aArrayData[ oBrwPrgs:nArrayAt ][ 3 ] SIZE 聽70 

聽 聽oBrwPrgs:nMarqueeStyle = MARQSTYLE_HIGHLROW
聽 聽oBrwPrgs:nRowHeight 聽 聽= 17
聽 聽oBrwPrgs:bClrSel 聽 聽 聽 = { || { CLR_WHITE, CLR_BLUE } }

聽 聽oBrwPrgs:CreateFromCode()

聽 聽oFld:aDialogs[ 1 ]:SetControl( oBrwPrgs )
聽 聽
return oBrwPrgs

//----------------------------------------------------------------------------//

function BuildFldButtons( oFld )

聽 聽local cMask 聽:= { "*.prg", "*.obj", "*.lib" }[ oFld:nOption ]
聽 聽local cTitle := "Please select a " + { "PRG", "OBJ", "LIB" }[ oFld:nOption ] + " file" 
聽 聽local oBtn, cFileName

聽 聽@ 1, 350 BUTTON oBtn PROMPT "+" OF oFld SIZE 18, 18 PIXEL ;
聽 聽 聽 ACTION ( cFileName := cGetFile( cMask, cTitle ),;
聽 聽 聽 聽 聽 聽 聽 聽If( ! Empty( cFileName ),;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽( If( aPrgs[ 1 ][ 1 ] == "", ASize( aPrgs, 0 ),),;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽AAdd( aPrgs, { cFileName, Directory( cFileName )[ 1 ][ 2 ],;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 Directory( cFileName )[ 1 ][ 3 ] } ),;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽oFld:aDialogs[ 1 ]:aControls[ 1 ]:GoBottom(),;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽oFld:aDialogs[ 1 ]:aControls[ 1 ]:SetFocus() ), ) )

聽 聽oBtn:cTooltip = "Add"

聽 聽@ 1, 372 BUTTON "--" OF oFld SIZE 18, 18 PIXEL

return nil

//----------------------------------------------------------------------------//

function AToStr( aFiles )

聽 聽local cResult := ""
聽 聽
聽 聽AEval( aFiles, { | aFile | cResult += " " + aFile[ 1 ] } )
聽 聽
return cResult

//----------------------------------------------------------------------------//
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Interface visual para Harbour hbmk2.exe
Posted: Mon Mar 18, 2013 09:47 AM
Comenzamos la implementaci贸n de configuraci贸n:



vmh.prg
Code (fw): Select all Collapse
#include "FiveWin.ch"
#include "xbrowse.ch"

static oBrwPrgs, aPrgs := { { "", "", "" } }
static cHbmkPath := "c:\harbour\bin\hbmk2.exe"
static cCCompiler := "Borland"

//----------------------------------------------------------------------------//

function Main()

聽 聽local oDlg, oGetName, cPrgName := Space( 20 ), oFldAdditional
聽 聽local oBtnBuild, oBtnCancel
聽 聽local cResult, oResult, cPath, nRetCode

聽 聽SetDlgGradient( { { 1, RGB( 199, 216, 237 ), RGB( 237, 242, 248 ) } } )
聽 聽
聽 聽DEFINE DIALOG oDlg TITLE "Visual make for Harbour" ;
聽 聽 聽 SIZE 600, 500

聽 聽@ 16, 聽16 SAY "Main PRG" SIZE 聽30, 9 PIXEL OF oDlg

聽 聽@ 25, 16 GET oGetName VAR cPrgName SIZE 120, 12 PIXEL OF oDlg ;
聽 聽 聽 ACTION oGetName:VarPut( cGetFile( "*.prg" ) ) ;
聽 聽 聽 VALID If( Empty( cPrgName ), ( MsgAlert( "please select a PRG file" ), .F. ), .T. )

聽 聽@ 50, 聽16 SAY "Additional" SIZE 30, 9 PIXEL OF oDlg

聽 聽@ 60, 16 FOLDER oFldAdditional PROMPTS "PRGs", "OBJs", "LIBs" ;
聽 聽 聽 SIZE 200, 100 PIXEL OF oDlg

聽 聽BuildBrwPrgs( oFldAdditional )

聽 聽@ 22, 230 BUTTON oBtnBuild PROMPT "&Build" ;
聽 聽 聽 SIZE 60, 20 PIXEL OF oDlg ;
聽 聽 聽 ACTION ( If( ! File( "c:\harbour\bin\hbmk2.exe" ), MsgAlert( "can't find hbmk2.exe" ),),;
聽 聽 聽 聽 聽 聽 聽 聽MemoWrit( "go.bat", "set path=c:\bcc582\bin" + CRLF + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽cHbmkPath + " " + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽"-comp=" + If( cCCompiler == "Borland", "bcc", "" ) + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽If( cCCompiler == "Microsoft", "msvc", "" ) + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽If( cCCompiler == "MinGW", "mingw", "" ) + " " + ; 
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽"-ic:\fwteam\include " + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽"-lfiveh.lib " + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽"-lfivehc.lib " + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽"-Lc:\fwteam\lib " + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽"-lc:\bcc582\lib\psdk\psapi.lib " + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽"xhb.hbc " + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽"-gtgui " + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽AllTrim( cPrgName ) + ;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽AToStr( aPrgs ) ),;
聽 聽 聽 聽 聽 聽 聽 聽nRetCode := WaitRun( "go.bat > out.log", 0 ),;
聽 聽 聽 聽 聽 聽 聽 聽oResult:SetText( GetError( nRetCode ) + CRLF + MemoRead( "out.log" ) ),;
聽 聽 聽 聽 聽 聽 聽 聽If( nRetCode == 0, WaitRun( cFileNoExt( cPrgName ) ),) )

聽 聽@ 48, 230 BUTTON oBtnCancel PROMPT "&Cancel" ;
聽 聽 聽 SIZE 60, 20 PIXEL OF oDlg ;
聽 聽 聽 ACTION oDlg:End() CANCEL

聽 聽@ 74, 230 BUTTON "&Settings..." ;
聽 聽 聽 SIZE 60, 20 PIXEL OF oDlg ;
聽 聽 聽 ACTION ( Settings(), oGetName:SetFocus() ) CANCEL

聽 聽@ 170, 16 SAY "Result" SIZE 30, 9 PIXEL OF oDlg

聽 聽@ 180, 16 GET oResult VAR cResult MEMO ;
聽 聽 聽 SIZE 200, 60 PIXEL OF oDlg

聽 聽ACTIVATE DIALOG oDlg CENTERED ;
聽 聽 聽 ON INIT BuildFldButtons( oFldAdditional )

return oDlg

//----------------------------------------------------------------------------//

function GetError( nError )

聽 聽do case
聽 聽 聽 case nError == 0
聽 聽 聽 聽 聽 聽return "Ok"
聽 聽
聽 聽 聽 case nError == 1
聽 聽 聽 聽 聽 聽return "unknown platform"
聽 聽
聽 聽 聽 case nError == 2
聽 聽 聽 聽 聽 聽return "unknown compiler"
聽 聽 聽 聽 聽 聽
聽 聽 聽 case nError == 3
聽 聽 聽 聽 聽 聽return "failed Harbour detection" 聽 聽 
聽 聽 聽 聽 聽 聽
聽 聽 聽 case nError == 5 
聽 聽 聽 聽 聽 聽return "failed stub creation" 聽 聽 
聽 聽 聽 聽 聽 聽
聽 聽 聽 case nError == 6
聽 聽 聽 聽 聽 聽return "failed in compilation (Harbour, C compiler, Resource compiler)"
聽 聽 聽 聽 聽
聽 聽 聽 case nError == 7
聽 聽 聽 聽 聽 聽return "failed in final assembly (linker or library manager)" 聽 聽 聽 聽 
聽 聽 聽 聽 聽
聽 聽 聽 case nError == 8 
聽 聽 聽 聽 聽 聽return "unsupported" 聽 
聽 聽 聽 聽 聽
聽 聽 聽 case nError == 9 
聽 聽 聽 聽 聽 聽return "failed to create working directory" 聽 
聽 聽 聽 聽 聽
聽 聽 聽 case nError == 10 
聽 聽 聽 聽 聽 聽return "dependency missing or disabled" 聽 
聽 聽 聽 聽 聽
聽 聽 聽 case nError == 19 
聽 聽 聽 聽 聽 聽return "help" 聽 
聽 聽 聽 聽 聽
聽 聽 聽 case nError == 20 
聽 聽 聽 聽 聽 聽return "plugin initialization"
聽 聽 聽 聽 聽 聽
聽 聽 聽 case nError == 30 
聽 聽 聽 聽 聽 聽return "too deep nesting" 聽 聽 
聽 聽 聽 聽 聽 聽
聽 聽 聽 case nError == 50 
聽 聽 聽 聽 聽 聽return "stop requested" 聽 聽 
聽 聽endcase
聽 聽
return Str( nError )

//----------------------------------------------------------------------------//

function BuildBrwPrgs( oFld )

聽 聽@ 0, 0 XBROWSE oBrwPrgs ARRAY aPrgs SIZE 300, 180 PIXEL OF oFld:aDialogs[ 1 ]

聽 聽// oBrwPrgs:SetFont( ::oFontBrw )

聽 聽ADD TO oBrwPrgs HEADER "Name" DATA oBrwPrgs:aArrayData[ oBrwPrgs:nArrayAt ][ 1 ] SIZE 200
聽 聽ADD TO oBrwPrgs HEADER "Size" DATA oBrwPrgs:aArrayData[ oBrwPrgs:nArrayAt ][ 2 ] SIZE 聽80
聽 聽ADD TO oBrwPrgs HEADER "Date" DATA oBrwPrgs:aArrayData[ oBrwPrgs:nArrayAt ][ 3 ] SIZE 聽70 

聽 聽oBrwPrgs:nMarqueeStyle = MARQSTYLE_HIGHLROW
聽 聽oBrwPrgs:nRowHeight 聽 聽= 17
聽 聽oBrwPrgs:bClrSel 聽 聽 聽 = { || { CLR_WHITE, CLR_BLUE } }

聽 聽oBrwPrgs:CreateFromCode()

聽 聽oFld:aDialogs[ 1 ]:SetControl( oBrwPrgs )
聽 聽
return oBrwPrgs

//----------------------------------------------------------------------------//

function BuildFldButtons( oFld )

聽 聽local cMask 聽:= { "*.prg", "*.obj", "*.lib" }[ oFld:nOption ]
聽 聽local cTitle := "Please select a " + { "PRG", "OBJ", "LIB" }[ oFld:nOption ] + " file" 
聽 聽local oBtn, cFileName

聽 聽@ 1, 350 BUTTON oBtn PROMPT "+" OF oFld SIZE 18, 18 PIXEL ;
聽 聽 聽 ACTION ( cFileName := cGetFile( cMask, cTitle ),;
聽 聽 聽 聽 聽 聽 聽 聽If( ! Empty( cFileName ),;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽( If( aPrgs[ 1 ][ 1 ] == "", ASize( aPrgs, 0 ),),;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽AAdd( aPrgs, { cFileName, Directory( cFileName )[ 1 ][ 2 ],;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 Directory( cFileName )[ 1 ][ 3 ] } ),;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽oFld:aDialogs[ 1 ]:aControls[ 1 ]:GoBottom(),;
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽oFld:aDialogs[ 1 ]:aControls[ 1 ]:SetFocus() ), ) )

聽 聽oBtn:cTooltip = "Add"

聽 聽@ 1, 372 BUTTON "--" OF oFld SIZE 18, 18 PIXEL

return nil

//----------------------------------------------------------------------------//

function AToStr( aFiles )

聽 聽local cResult := ""
聽 聽
聽 聽AEval( aFiles, { | aFile | cResult += " " + aFile[ 1 ] } )
聽 聽
return cResult

//----------------------------------------------------------------------------//

function Settings()

聽 聽local oDlg, oHbmkPath, cMakePath := cHbmkPath
聽 聽local cCompiler := cCCompiler
聽 聽
聽 聽DEFINE DIALOG oDlg TITLE "Settings" SIZE 500, 400
聽 聽
聽 聽@ 15, 16 SAY "hbmk2.exe path" OF oDlg SIZE 80, 10 PIXEL

聽 聽@ 25, 16 GET oHbmkPath VAR cMakePath SIZE 120, 12 PIXEL OF oDlg ;
聽 聽 聽 ACTION oHbmkPath:VarPut( cGetFile( cHbmkPath ) ) ;
聽 聽 聽 VALID If( Empty( cHbmkPath ), ( MsgAlert( "please select hbmk2.exe path" ), .F. ), .T. )

聽 聽@ 49, 16 SAY "C compiler" OF oDlg SIZE 80, 10 PIXEL

聽 聽@ 59, 16 COMBOBOX oCbx VAR cCompiler ITEMS { "Borland", "Microsoft", "MinGW" } ;
聽 聽 聽 OF oDlg SIZE 120, 100 PIXEL

聽 聽@ 22, 180 BUTTON "&Save" ;
聽 聽 聽 SIZE 60, 20 PIXEL OF oDlg ;
聽 聽 聽 ACTION ( cHbmkPath := cMakePath, cCCompiler := cCompiler, oDlg:End() ) 

聽 聽@ 48, 180 BUTTON "&Cancel" ;
聽 聽 聽 SIZE 60, 20 PIXEL OF oDlg ;
聽 聽 聽 ACTION oDlg:End() CANCEL
聽 聽
聽 聽ACTIVATE DIALOG oDlg CENTERED
聽 聽
return nil 

//----------------------------------------------------------------------------//
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Interface visual para Harbour hbmk2.exe
Posted: Mon Mar 18, 2013 10:12 AM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Interface visual para Harbour hbmk2.exe
Posted: Mon Mar 18, 2013 09:06 PM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1144
Joined: Mon Feb 05, 2007 07:15 PM
Re: Interface visual para Harbour hbmk2.exe
Posted: Mon Mar 18, 2013 10:35 PM

Antonio y para xhb no funciona?

saludos.

Cesar Cortes Cruz

SysCtrl Software

Mexico



' Sin +- FWH es mejor "
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Interface visual para Harbour hbmk2.exe
Posted: Mon Mar 18, 2013 10:46 PM

C茅sar,

Si no me equivoco, xHarbour no proporciona la herramienta hbmk2.exe por lo que solo puedes usarlo con Harbour.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1144
Joined: Mon Feb 05, 2007 07:15 PM
Re: Interface visual para Harbour hbmk2.exe
Posted: Tue Mar 19, 2013 12:46 AM

Gracias Antonio,

de donde puedo bajar el Harbour y aprovechar esta herramienta?

gracias.

Cesar Cortes Cruz

SysCtrl Software

Mexico



' Sin +- FWH es mejor "
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: Interface visual para Harbour hbmk2.exe
Posted: Tue Mar 19, 2013 01:18 AM

Hola

para usarla debes usar harbour...

descarga el svn de harbour cuando construyas harbour esta se construye automaticamente tambien

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Interface visual para Harbour hbmk2.exe
Posted: Tue Mar 19, 2013 03:17 AM
C茅sar,

Desde aqui puedes descargar las versiones m谩s recientes de Harbour y xHarbour que nosotros vamos construyendo y usando:

https://code.google.com/p/harbour-and-xharbour-builds/downloads/list
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Interface visual para Harbour hbmk2.exe
Posted: Tue Mar 19, 2013 08:58 AM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 729
Joined: Tue Oct 18, 2005 06:49 PM
Re: Interface visual para Harbour hbmk2.exe
Posted: Tue Mar 19, 2013 02:13 PM
Antonio,
Gracias por haber iniciado el desarrollo de este utilitario.
De seguro sera beneficioso para todos los que usamos Harbour y FWH.

Por otro lado, estoy tratando de compilar el ejemplo samples\alert.prg pero consigo el siguiente mensaje:
Code (fw): Select all Collapse
failed in compilation (Harbour, C compiler, Resource compiler)
C:\_VisualMake>set path=c:\bcc582\bin 
C:\_VisualMake>c:\harbour\bin\hbmk2.exe -comp=bcc -ic:\fwteam\include -lfiveh.lib -lfivehc.lib -Lc:\fwteam\lib -lc:\bcc582\lib\psdk\psapi.lib xhb.hbc -gtgui C:\fwh\samples\alert.prg 聽 
Harbour 3.2.0dev (Rev. 18881)
Copyright (c) 1999-2013, http://harbour-project.org/
Compiling 'C:\fwh\samples\alert.prg'...

He revisado los paths y parecen estar correctos.
Si uso el archivo buildh.bat, que esta dentro del folder fwh\samples, el programa compila correctamente.

Existe alguna forma de conseguir mas informacion sobre el error generado en VisualMake?
Alguna sugerencia?

George
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Interface visual para Harbour hbmk2.exe
Posted: Tue Mar 19, 2013 02:44 PM

George,

En el c贸digo fuente de vmh.prg cambia esto:

-ic:\fwteam\include

por:

-ic:\fwh\include

de ahi el error. Se nos pas贸 modificarlo

regards, saludos

Antonio Linares
www.fivetechsoft.com