diff --git a/harbour/ChangeLog b/harbour/ChangeLog index a20efb697b..02ba8eedb4 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,26 @@ The license applies to all entries newer than 2009-04-28. */ +2011-01-29 00:12 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * contrib/make.hbs + + Defined _HB_BUILD_=yes to tell .hbp files we're building + for a Harbour build. + + * contrib/hbnetio/utils/hbnetio/hbnetioc.hbp + * contrib/hbformat/utils/hbformat.hbp + + Tweak to not build in -shared mode when directly building + the .hbp file (and not as part of Harbour build). + + * contrib/hbnetio/utils/hbnetioq/hbnetioq.hbp + * contrib/hbide/hbide.hbp + + Added tweak to build in shared mode when building as + part of Harbour build. This will make the distro size + noticeably smaller. + + * contrib/hbnetio/utils/hbnetio/netiosrv.prg + * contrib/hbnetio/utils/hbnetio/netiocon.prg + + Show server config feature converted to client-server. + 2011-01-28 23:35 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbplist + Added hbnetioc to tools automatically built. diff --git a/harbour/contrib/hbformat/utils/hbformat.hbp b/harbour/contrib/hbformat/utils/hbformat.hbp index 7a31257d50..8ea4e9e45b 100644 --- a/harbour/contrib/hbformat/utils/hbformat.hbp +++ b/harbour/contrib/hbformat/utils/hbformat.hbp @@ -12,7 +12,7 @@ hbformat.prg # Always build in shared mode for these platforms because the # tool is included in std distro and we want to minimize its size. -{!(HB_BUILD_DYN='no')&(win|wce|os2)}-shared +{_HB_BUILD_&(!(HB_BUILD_DYN='no')&(win|wce|os2))}-shared -ldflag={allmsvc}-nxcompat -ldflag={allmsvc}-dynamicbase diff --git a/harbour/contrib/hbide/hbide.hbp b/harbour/contrib/hbide/hbide.hbp index 27e73e6a6a..53767270a2 100644 --- a/harbour/contrib/hbide/hbide.hbp +++ b/harbour/contrib/hbide/hbide.hbp @@ -88,3 +88,7 @@ format.ui hbide.qrc -3rd=hbide_file=hbide.ch + +# Always build in shared mode for these platforms because the +# tool is included in std distro and we want to minimize its size. +{_HB_BUILD_&(!(HB_BUILD_DYN='no')&(win|wce|os2))}-shared diff --git a/harbour/contrib/hbnetio/utils/hbnetio/hbnetioc.hbp b/harbour/contrib/hbnetio/utils/hbnetio/hbnetioc.hbp index 130c83af11..73a6b98876 100644 --- a/harbour/contrib/hbnetio/utils/hbnetio/hbnetioc.hbp +++ b/harbour/contrib/hbnetio/utils/hbnetio/hbnetioc.hbp @@ -13,4 +13,4 @@ netiocon.prg # Always build in shared mode for these platforms because the # tool is included in std distro and we want to minimize its size. -{!(HB_BUILD_DYN='no')&(win|wce|os2)}-shared +{_HB_BUILD_&(!(HB_BUILD_DYN='no')&(win|wce|os2))}-shared diff --git a/harbour/contrib/hbnetio/utils/hbnetio/netiocon.prg b/harbour/contrib/hbnetio/utils/hbnetio/netiocon.prg index 45ba274c29..5cf886c705 100644 --- a/harbour/contrib/hbnetio/utils/hbnetio/netiocon.prg +++ b/harbour/contrib/hbnetio/utils/hbnetio/netiocon.prg @@ -62,6 +62,7 @@ PROCEDURE hbnetiocon_cmdUI( cIP, nPort, cPassword ) "connect" => { "[]]" , "Connect." , {| cCommand | cmdConnect( cCommand, @pConnection, @cIP, @nPort ) } },; "disconnect" => { "" , "Disconnect." , {|| cmdDisconnect( @pConnection ) } },; "sysinfo" => { "" , "Show system/build information." , {|| cmdSysInfo( pConnection ) } },; + "showconf" => { "" , "Show server configuration." , {|| cmdServerConfig( pConnection ) } },; "show" => { "" , "Show list of connections." , {|| cmdConnInfo( pConnection, .F. ) } },; "showadmin" => { "" , "Show list of management connections." , {|| cmdConnInfo( pConnection, .T. ) } },; "noconn" => { "" , "Disable incoming connections." , {|| cmdConnEnable( pConnection, .F. ) } },; @@ -414,6 +415,19 @@ STATIC PROCEDURE cmdSysInfo( pConnection ) RETURN +STATIC PROCEDURE cmdServerConfig( pConnection ) + LOCAL cLine + + IF Empty( pConnection ) + QQOut( "Not connected.", hb_eol() ) + ELSE + FOR EACH cLine IN netio_funcexec( pConnection, "hbnetiomgm_serverconfig" ) + QQOut( cLine, hb_eol() ) + NEXT + ENDIF + + RETURN + STATIC PROCEDURE cmdConnStop( pConnection, cCommand ) LOCAL aToken diff --git a/harbour/contrib/hbnetio/utils/hbnetio/netiosrv.prg b/harbour/contrib/hbnetio/utils/hbnetio/netiosrv.prg index 904a3c86f6..06864b8e0b 100644 --- a/harbour/contrib/hbnetio/utils/hbnetio/netiosrv.prg +++ b/harbour/contrib/hbnetio/utils/hbnetio/netiosrv.prg @@ -197,6 +197,7 @@ PROCEDURE Main( ... ) { "hbnetiomgm_ping" => {| ... | .T. } ,; "hbnetiomgm_setclientinfo" => {| ... | netiomgm_rpc_setclientinfo( netiomgm, ... ) } ,; "hbnetiomgm_sysinfo" => {| ... | netiomgm_rpc_sysinfo() } ,; + "hbnetiomgm_serverconfig" => {| ... | netiomgm_rpc_serverconfig( netiosrv, netiomgm ) } ,; "hbnetiomgm_clientinfo" => {| ... | netiomgm_rpc_clientinfo( netiosrv, netiomgm, ... ) } ,; "hbnetiomgm_shutdown" => {| ... | netiomgm_rpc_shutdown( netiosrv ) } ,; "hbnetiomgm_conninfo" => {| ... | netiomgm_rpc_conninfo( netiosrv ) } ,; @@ -248,6 +249,20 @@ PROCEDURE Main( ... ) RETURN +STATIC FUNCTION netiosrv_config( netiosrv, netiomgm ) + LOCAL aArray := {; + "Listening on: " + netiosrv[ _NETIOSRV_cIFAddr ] + ":" + hb_ntos( netiosrv[ _NETIOSRV_nPort ] ),; + "Root filesystem: " + netiosrv[ _NETIOSRV_cRootDir ],; + "RPC support: " + iif( netiosrv[ _NETIOSRV_lRPC ], "enabled", "disabled" ),; + "Encryption: " + iif( netiosrv[ _NETIOSRV_lEncryption ], "enabled", "disabled" ),; + "RPC filter module: " + iif( Empty( netiosrv[ _NETIOSRV_hRPCFHRB ] ), iif( netiosrv[ _NETIOSRV_lRPC ], "not set (WARNING: unsafe open server)", "not set" ), netiosrv[ _NETIOSRV_cRPCFFileName ] ) } + + IF ! Empty( netiomgm[ _NETIOSRV_pListenSocket ] ) + AAdd( aArray, "Management iface: " + netiomgm[ _NETIOSRV_cIFAddr ] + ":" + hb_ntos( netiomgm[ _NETIOSRV_nPort ] ) ) + ENDIF + + RETURN aArray + /* Server connect callback */ STATIC FUNCTION netiosrv_callback( netiosrv, pConnectionSocket ) @@ -357,6 +372,9 @@ STATIC FUNCTION netiomgm_rpc_sysinfo() "C Compiler: " + hb_Compiler() ,; "Memory (KB): " + hb_ntos( Memory( 0 ) ) } +STATIC FUNCTION netiomgm_rpc_serverconfig( netiosrv, netiomgm ) + RETURN netiosrv_config( netiosrv, netiomgm ) + STATIC FUNCTION netiomgm_rpc_logconn( netiosrv, lValue ) LOCAL lOldValue := netiosrv[ _NETIOSRV_lShowConn ] @@ -548,14 +566,7 @@ STATIC FUNCTION FileSig( cFile ) STATIC PROCEDURE ShowConfig( netiosrv, netiomgm ) - QQOut( "Listening on: " + netiosrv[ _NETIOSRV_cIFAddr ] + ":" + hb_ntos( netiosrv[ _NETIOSRV_nPort ] ), hb_eol() ) - QQOut( "Root filesystem: " + netiosrv[ _NETIOSRV_cRootDir ], hb_eol() ) - QQOut( "RPC support: " + iif( netiosrv[ _NETIOSRV_lRPC ], "enabled", "disabled" ), hb_eol() ) - QQOut( "Encryption: " + iif( netiosrv[ _NETIOSRV_lEncryption ], "enabled", "disabled" ), hb_eol() ) - QQOut( "RPC filter module: " + iif( Empty( netiosrv[ _NETIOSRV_hRPCFHRB ] ), iif( netiosrv[ _NETIOSRV_lRPC ], "not set (WARNING: unsafe open server)", "not set" ), netiosrv[ _NETIOSRV_cRPCFFileName ] ), hb_eol() ) - IF ! Empty( netiomgm[ _NETIOSRV_pListenSocket ] ) - QQOut( "Management iface: " + netiomgm[ _NETIOSRV_cIFAddr ] + ":" + hb_ntos( netiomgm[ _NETIOSRV_nPort ] ), hb_eol() ) - ENDIF + AEval( netiosrv_config( netiosrv, netiomgm ), {| tmp | QQOut( tmp, hb_eol() ) } ) RETURN diff --git a/harbour/contrib/hbnetio/utils/hbnetioq/hbnetioq.hbp b/harbour/contrib/hbnetio/utils/hbnetioq/hbnetioq.hbp index 75eb0319ca..40836de201 100644 --- a/harbour/contrib/hbnetio/utils/hbnetioq/hbnetioq.hbp +++ b/harbour/contrib/hbnetio/utils/hbnetioq/hbnetioq.hbp @@ -17,3 +17,8 @@ netiosrq.prg netiosrq.qrc + +# Always build in shared mode for these platforms because the +# tool is included in std distro and we want to minimize its size. +{_HB_BUILD_&(!(HB_BUILD_DYN='no')&(win|wce|os2))}-shared + diff --git a/harbour/contrib/make.hbs b/harbour/contrib/make.hbs index 70820cdc85..f4d0eaefe2 100755 --- a/harbour/contrib/make.hbs +++ b/harbour/contrib/make.hbs @@ -67,6 +67,9 @@ STATIC s_cReBase PROCEDURE Main( ... ) LOCAL hProjectList + /* Signal that we're doing a Harbour build */ + hb_setenv( "_HB_BUILD_", "yes" ) + s_cBase := "" s_cReBase := "" IF Empty( GetEnv( "HB_HOST_BIN_DIR" ) )