diff --git a/harbour/ChangeLog b/harbour/ChangeLog index fc801d3b52..9a33b0bc17 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,19 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-05-16 19:01 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * config/postinst.prg + + Added new experimental envvar: + HB_BUILD_ADDONS=prj1.hbp prj2.hbp prjn.hbp + Harbour build process will initiate the build of the passed + .hbp files at 'install' phase. + % Simplification to other hbmk2 invocation commands. + + * contrib/hbwin/win_svc.c + ! Fixed to set running status only if entry function + is valid and able to reenter HVM. + + Added trace message when entry function cannot be found. + 2010-15-16 05:47 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * contrib/hbqt/hbqt_hbqplaintextedit.cpp * contrib/hbqt/hbqt_hbqplaintextedit.h diff --git a/harbour/config/postinst.prg b/harbour/config/postinst.prg index 4a5a0871cd..1be575d44b 100644 --- a/harbour/config/postinst.prg +++ b/harbour/config/postinst.prg @@ -79,8 +79,37 @@ PROCEDURE Main() FOR EACH tmp IN PackageList( "contrib\*", GetEnv( "HB_CONTRIBLIBS" ), GetEnv( "HB_CONTRIB_ADDONS" ) ) IF hb_FileExists( "contrib\" + tmp + "\" + tmp + ".hbi" ) hb_processRun( GetEnv( "HB_HOST_BIN_DIR" ) + _PS_ + "hbmk2" +; - " @" + "contrib\" + tmp + "\" + tmp + ".hbi " +; - "-o${HB_LIB_INSTALL}/" ) + " -quiet -lang=en " +; + " @contrib/" + tmp + "/" + tmp + ".hbi" +; + " -o${HB_LIB_INSTALL}/" ) + ENDIF + NEXT + ENDIF + + /* Converting build options to hbmk2 options */ + + cOptions := "" + IF GetEnv( "HB_BUILD_MODE" ) == "cpp" + cOptions += " -cpp=yes" + ELSEIF GetEnv( "HB_BUILD_MODE" ) == "c" + cOptions += " -cpp=no" + ENDIF + IF GetEnv( "HB_BUILD_DEBUG" ) == "yes" + cOptions += " -debug" + ENDIF + + /* Creating extra binaries */ + + IF ! Empty( GetEnv( "HB_BUILD_ADDONS" ) ) + + OutStd( "! Making binaries for .hbp project addons..." + hb_osNewLine() ) + + FOR EACH tmp IN hb_ATokens( GetEnv( "HB_BUILD_ADDONS" ),, .T. ) + IF ! Empty( tmp ) + hb_processRun( GetEnv( "HB_HOST_BIN_DIR" ) + _PS_ + "hbmk2" +; + " -quiet -lang=en -q0 " + cOptions +; + " " + Chr( 34 ) + StrTran( tmp, "\", "/" ) + Chr( 34 ) +; + " -o${HB_BIN_INSTALL}/" ) ENDIF NEXT ENDIF @@ -91,16 +120,6 @@ PROCEDURE Main() !( GetEnv( "HB_BUILD_DLL" ) == "no" ) .AND. ; !( GetEnv( "HB_BUILD_SHARED" ) == "yes" ) - cOptions := "" - IF GetEnv( "HB_BUILD_MODE" ) == "cpp" - cOptions += " -cpp=yes" - ELSEIF GetEnv( "HB_BUILD_MODE" ) == "c" - cOptions += " -cpp=no" - ENDIF - IF GetEnv( "HB_BUILD_DEBUG" ) == "yes" - cOptions += " -debug" - ENDIF - OutStd( "! Making shared version of Harbour binaries..." + hb_osNewLine() ) FOR EACH tmp IN Directory( "utils\*", "D" ) @@ -110,12 +129,11 @@ PROCEDURE Main() hb_FileExists( "utils\" + tmp[ F_NAME ] + "\" + tmp[ F_NAME ] + ".hbp" ) hb_processRun( GetEnv( "HB_HOST_BIN_DIR" ) + _PS_ + "hbmk2" +; - " -quiet -q0 -lang=en -shared" + cOptions +; - " " + Chr( 34 ) + "-o" + GetEnv( "HB_BIN_INSTALL" ) + _PS_ + tmp[ F_NAME ] + "-dll" + Chr( 34 ) +; - " " + Chr( 34 ) + StrTran( "utils\" + tmp[ F_NAME ] + "\" + tmp[ F_NAME ] + ".hbp", "\", _PS_ ) + Chr( 34 ) ) + " -quiet -lang=en -q0 -shared" + cOptions +; + " utils/" + tmp[ F_NAME ] + "/" + tmp[ F_NAME ] + ".hbp" +; + " -o${HB_BIN_INSTALL}/" + tmp[ F_NAME ] + "-dll" ) ENDIF NEXT - ENDIF /* Creating install packages */ diff --git a/harbour/contrib/hbwin/win_svc.c b/harbour/contrib/hbwin/win_svc.c index df1ef95a12..77ed64fc9c 100644 --- a/harbour/contrib/hbwin/win_svc.c +++ b/harbour/contrib/hbwin/win_svc.c @@ -96,10 +96,6 @@ static VOID WINAPI hbwin_SvcMainFunction( DWORD dwArgc, LPTSTR * lpszArgv ) { PHB_DYNS pDynSym = hb_dynsymFindName( s_szHarbourEntryFunc ); - /* We report the running status to SCM. */ - s_ServiceStatus.dwCurrentState = SERVICE_RUNNING; - SetServiceStatus( s_hStatus, &s_ServiceStatus ); - if( pDynSym ) { if( hb_vmRequestReenter() ) @@ -107,6 +103,10 @@ static VOID WINAPI hbwin_SvcMainFunction( DWORD dwArgc, LPTSTR * lpszArgv ) DWORD i; int iArgCount = 0; + /* We report the running status to SCM. */ + s_ServiceStatus.dwCurrentState = SERVICE_RUNNING; + SetServiceStatus( s_hStatus, &s_ServiceStatus ); + hb_vmPushSymbol( hb_dynsymSymbol( pDynSym ) ); hb_vmPushNil(); @@ -128,6 +128,10 @@ static VOID WINAPI hbwin_SvcMainFunction( DWORD dwArgc, LPTSTR * lpszArgv ) hb_vmRequestRestore(); } } + else + { + HB_TRACE( HB_TR_DEBUG, ("Harbour service entry function not found") ); + } } else {