From 7298be02bd722fcfe5f6f6e14c81cf71cd754d26 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 11 May 2009 23:15:14 +0000 Subject: [PATCH] 2009-05-12 01:13 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * utils/hbmk2/hbmk2.prg + Added -beep/nobeep/beep- options to enable beep signal when build is finished. In case of error a double beep will be heard. * INSTALL * Minor formatting. --- harbour/ChangeLog | 9 +++++++++ harbour/INSTALL | 6 +++--- harbour/utils/hbmk2/hbmk2.prg | 28 ++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 3 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 9d56082364..2e8d78634d 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,15 @@ past entries belonging to these authors: Viktor Szakats. */ +2009-05-12 01:13 UTC+0200 Viktor Szakats (harbour.01 syenar hu) + * utils/hbmk2/hbmk2.prg + + Added -beep/nobeep/beep- options to enable beep signal + when build is finished. In case of error a double beep + will be heard. + + * INSTALL + * Minor formatting. + 2009-05-11 21:21 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/compiler/gencc.c ! added missing HB_GENC_LABEL() call in hb_p_pushtimestamp diff --git a/harbour/INSTALL b/harbour/INSTALL index 938f931489..5c234504ce 100644 --- a/harbour/INSTALL +++ b/harbour/INSTALL @@ -6,9 +6,9 @@ HARBOUR ======= "The Harbour Project is a Free Open Source Software effort to build - a multiplatform Clipper language compiler. Harbour consists of the - xBase language compiler and the runtime libraries with different - terminal plugins and different databases (not just DBF)" + a multiplatform Clipper language compiler. Harbour consists of the + xBase language compiler and the runtime libraries with different + terminal plugins and different databases (not just DBF)" http://www.harbour-project.org/ diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index 4c7dd973c7..2a889a57aa 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -322,6 +322,7 @@ FUNCTION hbmk( aArgs ) LOCAL s_lINC := .F. LOCAL s_lCLEAN := .F. LOCAL s_nJOBS := 1 + LOCAL s_lBEEP := .F. LOCAL aCOMPDET LOCAL aCOMPDET_LOCAL @@ -1094,6 +1095,9 @@ FUNCTION hbmk( aArgs ) CASE cParamL == "-map" ; s_lMAP := .T. CASE cParamL == "-map-" .OR. ; cParamL == "-nomap" ; s_lMAP := .F. + CASE cParamL == "-beep" ; s_lBEEP := .T. + CASE cParamL == "-beep-" .OR. ; + cParamL == "-nobeep" ; s_lBEEP := .F. CASE cParamL == "-rebuild" ; s_lINC := .T. ; s_lREBUILD := .T. CASE cParamL == "-clean" ; s_lINC := .T. ; s_lCLEAN := .T. CASE cParamL == "-inc" ; s_lINC := .T. @@ -3370,6 +3374,11 @@ FUNCTION hbmk( aArgs ) ENDIF ENDIF + IF s_lBEEP + DoBeep( nErrorLevel == 0 ) + s_lBEEP := .F. + ENDIF + IF s_lRUN .AND. ! lCreateLib .AND. ! lCreateDyn #if defined( __PLATFORM__UNIX ) IF Empty( FN_DirGet( s_cPROGNAME ) ) @@ -3394,8 +3403,26 @@ FUNCTION hbmk( aArgs ) hbmk_OutStd( hb_StrFormat( I_( "Running time: %1$ss" ), hb_ntos( TimeElapsed( nStart, Seconds() ) ) ) ) ENDIF + IF s_lBEEP + DoBeep( nErrorLevel == 0 ) + ENDIF + RETURN nErrorLevel +STATIC PROCEDURE DoBeep( lSuccess ) + LOCAL nRepeat := iif( lSuccess, 1, 2 ) + LOCAL tmp + + IF hb_gtInfo( HB_GTI_ISGRAPHIC ) + FOR tmp := 1 TO nRepeat + Tone( 800, 3.5 ) + NEXT + ELSE + OutStd( Replicate( Chr( 7 ), nRepeat ) ) + ENDIF + + RETURN + STATIC FUNCTION CompileCLoop( aTODO, cBin_CompC, cOpt_CompC, cWorkDir, cObjExt, nJob, nJobs ) LOCAL lResult := .T. LOCAL cCommand @@ -5524,6 +5551,7 @@ STATIC PROCEDURE ShowHelp( lLong ) { "-[no]map" , I_( "create (or not) a map file" ) },; { "-[no]strip" , I_( "strip (no strip) binaries" ) },; { "-[no]trace" , I_( "show commands executed" ) },; + { "-[no]beep" , I_( "beep (or don't) when finished" ) },; { "-traceonly" , I_( "show commands to be executed, but don't execute them" ) },; { "-[no]compr[=lev]" , I_( "compress executable/dynamic lib (needs UPX)\n can be: min, max, def" ) },; { "-[no]run" , I_( "run/don't run output executable" ) },;