From 386ddf62943cf855be4b8d30939ef05eb9991b2f Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sat, 26 Jun 2010 12:52:55 +0000 Subject: [PATCH] 2010-06-26 14:48 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * contrib/gtalleg/gtallegs/Makefile * contrib/gtalleg/gtallegs.hbp ! Fixed regression: disabled for pocc again. * contrib/hbqt/plug_moc.prg * contrib/hbide/resources/hbmk2_plugin_uip.prg ! Fixed to not build in -clean mode. * contrib/hbqt/plug_moc.prg ! Fixed to honor 'HB_WITH_QT=no' setting. * contrib/hbqt/utils/hbqtui.prg ! Fixed to not RTE in various error situations. + contrib/hbnf/ftint86.c * contrib/hbnf/Makefile * contrib/hbnf/hbnf.hbp + Added dummy FT_INT86() function to make the .dll link properly. Many functions are relying on this call, which makes them not work and makes their implementation DOS specific. * contrib/makefile.prg ! Fixed clean mode to not create a build, too. + SETCANCEL( .F. ) (trying to solve not working break key) + Don't attempt to build dynlib versions of contribs not having an .hbc file. * contrib/hbtip/hbtipssl.hbp ! Fixed typo in hbssl.hbc reference. * contrib/hbide/resources/hbmk2_plugin_uip.prg + Added hbqtui location detection. (HBQTUI_BIN envvar, Harbour bin dir and PATH) * contrib/hbqt/hbqt_common.hbm - contrib/hbqt/plug_moc.prg + contrib/hbqt/hbmk2_plugin_moc.prg + Renamed. Not sure this will be the final one, anyways keeping consistency. --- harbour/ChangeLog | 42 +++++++++++++++++++ harbour/contrib/gtalleg/gtallegs.hbp | 2 +- harbour/contrib/gtalleg/gtallegs/Makefile | 2 +- .../hbide/resources/hbmk2_plugin_uip.prg | 23 +++++++++- harbour/contrib/hbnf/Makefile | 1 + harbour/contrib/hbnf/ftint86.c | 11 +++++ harbour/contrib/hbnf/hbnf.hbp | 1 + .../{plug_moc.prg => hbmk2_plugin_moc.prg} | 12 ++++-- harbour/contrib/hbqt/hbqt_common.hbm | 2 +- harbour/contrib/hbqt/utils/hbqtui.prg | 27 +++++++----- harbour/contrib/hbtip/hbtipssl.hbp | 2 +- harbour/contrib/makefile.prg | 10 +++-- 12 files changed, 111 insertions(+), 24 deletions(-) create mode 100644 harbour/contrib/hbnf/ftint86.c rename harbour/contrib/hbqt/{plug_moc.prg => hbmk2_plugin_moc.prg} (90%) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 51121e489b..93fdbbaede 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,48 @@ The license applies to all entries newer than 2009-04-28. */ +2010-06-26 14:48 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * contrib/gtalleg/gtallegs/Makefile + * contrib/gtalleg/gtallegs.hbp + ! Fixed regression: disabled for pocc again. + + * contrib/hbqt/plug_moc.prg + * contrib/hbide/resources/hbmk2_plugin_uip.prg + ! Fixed to not build in -clean mode. + + * contrib/hbqt/plug_moc.prg + ! Fixed to honor 'HB_WITH_QT=no' setting. + + * contrib/hbqt/utils/hbqtui.prg + ! Fixed to not RTE in various error situations. + + + contrib/hbnf/ftint86.c + * contrib/hbnf/Makefile + * contrib/hbnf/hbnf.hbp + + Added dummy FT_INT86() function to make the .dll link + properly. Many functions are relying on this call, which + makes them not work and makes their implementation DOS + specific. + + * contrib/makefile.prg + ! Fixed clean mode to not create a build, too. + + SETCANCEL( .F. ) (trying to solve not working break key) + + Don't attempt to build dynlib versions of contribs not + having an .hbc file. + + * contrib/hbtip/hbtipssl.hbp + ! Fixed typo in hbssl.hbc reference. + + * contrib/hbide/resources/hbmk2_plugin_uip.prg + + Added hbqtui location detection. (HBQTUI_BIN envvar, + Harbour bin dir and PATH) + + * contrib/hbqt/hbqt_common.hbm + - contrib/hbqt/plug_moc.prg + + contrib/hbqt/hbmk2_plugin_moc.prg + + Renamed. Not sure this will be the final one, anyways keeping + consistency. + 2010-06-26 13:14 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + contrib/makefile.prg + Added new control script which is meant to orchestrate diff --git a/harbour/contrib/gtalleg/gtallegs.hbp b/harbour/contrib/gtalleg/gtallegs.hbp index 81d40ff46d..e712e53d19 100644 --- a/harbour/contrib/gtalleg/gtallegs.hbp +++ b/harbour/contrib/gtalleg/gtallegs.hbp @@ -4,7 +4,7 @@ gtalleg.hbp --stop{!msvc&!pocc} +-stop{!msvc} -o${hb_name} -workdir=${hb_work}/${hb_plat}/${hb_comp}/${hb_name} diff --git a/harbour/contrib/gtalleg/gtallegs/Makefile b/harbour/contrib/gtalleg/gtallegs/Makefile index 9e800f64cb..c2844cdc0c 100644 --- a/harbour/contrib/gtalleg/gtallegs/Makefile +++ b/harbour/contrib/gtalleg/gtallegs/Makefile @@ -18,7 +18,7 @@ _DET_DSP_NAME := allegro _DET_VAR_INC_ := HB_INC_ALLEGRO _DET_VAR_HAS_ := HB_HAS_ALLEGRO _DET_FLT_PLAT := -_DET_FLT_COMP := msvc pocc +_DET_FLT_COMP := msvc _DET_INC_DEFP := /usr/include /opt/local/include _DET_INC_HEAD := /allegro.h include $(TOP)$(ROOT)config/detfun.mk diff --git a/harbour/contrib/hbide/resources/hbmk2_plugin_uip.prg b/harbour/contrib/hbide/resources/hbmk2_plugin_uip.prg index 9d299736de..2ca11e68c7 100644 --- a/harbour/contrib/hbide/resources/hbmk2_plugin_uip.prg +++ b/harbour/contrib/hbide/resources/hbmk2_plugin_uip.prg @@ -14,7 +14,7 @@ FUNCTION hbmk2_plugin_uip( hbmk2 ) LOCAL cRetVal := "" - LOCAL cHBQTUI_BIN := "hbqtui" + LOCAL cHBQTUI_BIN LOCAL aUI LOCAL aUI_Dst @@ -41,6 +41,25 @@ FUNCTION hbmk2_plugin_uip( hbmk2 ) IF ! Empty( aUI ) + /* Detect 'hbqtui' tool location */ + + IF Empty( GetEnv( "HBQTUI_BIN" ) ) + cHBQTUI_BIN := hbmk2_FindInPath( "hbqtui", GetEnv( "PATH" ) ) + IF Empty( cHBQTUI_BIN ) + hbmk2_OutErr( hbmk2, "HBQTUI_BIN not set, could not autodetect" ) + RETURN NIL + ENDIF + hbmk2_OutStd( hbmk2, "Using 'hbqtui' executable: " + cHBQTUI_BIN + " (autodetected)" ) + ELSE + IF hb_FileExists( GetEnv( "HBQTUI_BIN" ) ) + cHBQTUI_BIN := GetEnv( "HBQTUI_BIN" ) + hbmk2_OutStd( hbmk2, "Using 'hbqtui' executable: " + cHBQTUI_BIN ) + ELSE + hbmk2_OutErr( hbmk2, "HBQTUI_BIN points to non-existent file. Make sure to set it to full path and filename of hbqtui executable." ) + RETURN NIL + ENDIF + ENDIF + /* Execute 'hbqtui' commands on input files */ FOR EACH tmp IN aUI @@ -55,7 +74,7 @@ FUNCTION hbmk2_plugin_uip( hbmk2 ) lBuildIt := .T. ENDIF - IF lBuildIt + IF lBuildIt .AND. ! hbmk2[ "lCLEAN" ] cCommand := cHBQTUI_BIN +; " " + hbmk2_FNameEscape( hbmk2_PathSepToTarget( hbmk2, tmp ), hbmk2[ "nCmd_Esc" ], hbmk2[ "nCmd_FNF" ] ) +; diff --git a/harbour/contrib/hbnf/Makefile b/harbour/contrib/hbnf/Makefile index ae4fd5ac67..6aa41ea920 100644 --- a/harbour/contrib/hbnf/Makefile +++ b/harbour/contrib/hbnf/Makefile @@ -16,6 +16,7 @@ C_SOURCES := \ dispc.c \ ftattr.c \ ftidle.c \ + ftint86.c \ ftisprn.c \ fttext.c \ ftshadow.c \ diff --git a/harbour/contrib/hbnf/ftint86.c b/harbour/contrib/hbnf/ftint86.c new file mode 100644 index 0000000000..92bbe09d35 --- /dev/null +++ b/harbour/contrib/hbnf/ftint86.c @@ -0,0 +1,11 @@ +/* + * $Id$ + */ + +#include "hbapi.h" + +HB_FUNC( FT_INT86 ) +{ +#if defined( HB_OS_DOS ) +#endif +} diff --git a/harbour/contrib/hbnf/hbnf.hbp b/harbour/contrib/hbnf/hbnf.hbp index fa6524b225..3241dc3e32 100644 --- a/harbour/contrib/hbnf/hbnf.hbp +++ b/harbour/contrib/hbnf/hbnf.hbp @@ -19,6 +19,7 @@ descendn.c dispc.c ftattr.c ftidle.c +ftint86.c ftisprn.c fttext.c ftshadow.c diff --git a/harbour/contrib/hbqt/plug_moc.prg b/harbour/contrib/hbqt/hbmk2_plugin_moc.prg similarity index 90% rename from harbour/contrib/hbqt/plug_moc.prg rename to harbour/contrib/hbqt/hbmk2_plugin_moc.prg index 0f5a9b3b3a..04bf5bd4b5 100644 --- a/harbour/contrib/hbqt/plug_moc.prg +++ b/harbour/contrib/hbqt/hbmk2_plugin_moc.prg @@ -48,10 +48,14 @@ FUNCTION hbmk2_plugin_moc( hbmk2 ) IF Empty( cMOC_BIN ) IF Empty( GetEnv( "HB_QT_MOC_BIN" ) ) IF hbmk2[ "cPLAT" ] == "win" - cMOC_BIN := GetEnv( "HB_WITH_QT" ) + "\..\bin\moc.exe" - IF ! hb_FileExists( cMOC_BIN ) - hbmk2_OutErr( hbmk2, "HB_WITH_QT points to incomplete QT installation. moc executable not found." ) + IF GetEnv( "HB_WITH_QT" ) == "no" RETURN NIL + ELSE + cMOC_BIN := GetEnv( "HB_WITH_QT" ) + "\..\bin\moc.exe" + IF ! hb_FileExists( cMOC_BIN ) + hbmk2_OutErr( hbmk2, "HB_WITH_QT points to incomplete QT installation. moc executable not found." ) + RETURN NIL + ENDIF ENDIF ELSE cMOC_BIN := hbmk2_FindInPath( "moc", GetEnv( "PATH" ) + hb_osPathListSeparator() + "/opt/qtsdk/qt/bin" ) @@ -89,7 +93,7 @@ FUNCTION hbmk2_plugin_moc( hbmk2 ) lBuildIt := .T. ENDIF - IF lBuildIt + IF lBuildIt .AND. ! hbmk2[ "lCLEAN" ] cCommand := cMOC_BIN +; " " + hbmk2_FNameEscape( hbmk2_PathSepToTarget( hbmk2, tmp ), hbmk2[ "nCmd_Esc" ], hbmk2[ "nCmd_FNF" ] ) +; " -o " + hbmk2_FNameEscape( hbmk2_PathSepToTarget( hbmk2, cDst ), hbmk2[ "nCmd_Esc" ], hbmk2[ "nCmd_FNF" ] ) diff --git a/harbour/contrib/hbqt/hbqt_common.hbm b/harbour/contrib/hbqt/hbqt_common.hbm index 580776a979..a0a9857562 100644 --- a/harbour/contrib/hbqt/hbqt_common.hbm +++ b/harbour/contrib/hbqt/hbqt_common.hbm @@ -10,7 +10,7 @@ -stop{dos|watcom|bcc|pocc|pocc64|poccarm|msvcia64} --plugin=plug_moc.prg +-plugin=hbmk2_plugin_moc.prg -depkeyhead=qt:QtCore/qglobal.h -depcontrol=qt:${HB_WITH_QT} diff --git a/harbour/contrib/hbqt/utils/hbqtui.prg b/harbour/contrib/hbqt/utils/hbqtui.prg index 13232d2116..1e7d086d3d 100644 --- a/harbour/contrib/hbqt/utils/hbqtui.prg +++ b/harbour/contrib/hbqt/utils/hbqtui.prg @@ -88,6 +88,8 @@ PROCEDURE Main( ... ) LOCAL lToPath := .f. LOCAL lDelUic := .t. + LOCAL aResult + FOR EACH s IN hb_aParams() cL := lower( alltrim( s ) ) @@ -142,12 +144,15 @@ PROCEDURE Main( ... ) oGen := HbUIGen():new( hb_memoread( cUic ) ) oGen:cFuncName := "ui" + upper( left( cFile, 1 ) ) + lower( substr( cFile, 2 ) ) - s := "" - aeval( oGen:create(), {|e| s += e + hb_osNewLine() } ) - hb_memowrit( StrTran( cPrg, "/", hb_osPathSeparator() ), s ) + aResult := oGen:create() + IF ISARRAY( aResult ) + s := "" + aeval( aResult, {|e| s += e + hb_osNewLine() } ) + hb_memowrit( StrTran( cPrg, "/", hb_osPathSeparator() ), s ) + ENDIF IF lDelUic - ferase( cUic ) + FErase( cUic ) ENDIF NEXT @@ -175,7 +180,7 @@ CLASS HbUIGen METHOD HbUIGen:new( cFile ) - ::cFile := cFile + ::cFile := cFile RETURN Self @@ -191,14 +196,14 @@ METHOD HbUIGen:create( cFile ) ::cFile := cFile IF empty( ::cFile ) - RETURN Self + RETURN NIL ENDIF IF hb_fileExists( ::cFile ) ::org := hb_ATokens( StrTran( hb_MemoRead( ::cFile ), Chr( 13 ) ), Chr( 10 ) ) ELSEIF len( ::cFile ) > 256 ::org := hb_ATokens( StrTran( ::cFile, Chr( 13 ) ), Chr( 10 ) ) ELSE - RETURN Self /* RTE will be generated on appln level */ + RETURN NIL ENDIF aCommands := {} @@ -207,7 +212,7 @@ METHOD HbUIGen:create( cFile ) /* Pullout the widget */ n := ascan( ::org, {|e| "void setupUi" $ e } ) IF n == 0 - RETURN Self + RETURN NIL ENDIF s := alltrim( ::org[ n ] ) n := at( "*", s ) @@ -329,9 +334,9 @@ METHOD HbUIGen:create( cFile ) ENDIF NEXT - prg_:={} + prg_ := {} - hbq_addCopyRight( @prg_ ) + hbq_addCopyRight( prg_ ) aadd( prg_, "" ) aadd( prg_, "FUNCTION " + ::cFuncName + "( qParent )" ) @@ -364,7 +369,7 @@ METHOD HbUIGen:create( cFile ) aadd( prg_, " qObj[ " + PAD_30( STRINGIFY( a_[ 2 ] ) ) + " ] := " + strtran( a_[ 4 ], "o[", "qObj[" ) ) ENDIF NEXT - aadd( prg_, " " ) + aadd( prg_, "" ) FOR EACH a_ IN aCommands cNam := a_[ 1 ] diff --git a/harbour/contrib/hbtip/hbtipssl.hbp b/harbour/contrib/hbtip/hbtipssl.hbp index 61f252d541..ec8fdccc62 100644 --- a/harbour/contrib/hbtip/hbtipssl.hbp +++ b/harbour/contrib/hbtip/hbtipssl.hbp @@ -7,6 +7,6 @@ hbtip.hbp -o${hb_name} -workdir=${hb_work}/${hb_plat}/${hb_comp}/${hb_name} -../../hbssl/hbssl.hbc +../hbssl/hbssl.hbc -DHB_HAS_OPENSSL diff --git a/harbour/contrib/makefile.prg b/harbour/contrib/makefile.prg index 97613b478c..d9b676f92b 100644 --- a/harbour/contrib/makefile.prg +++ b/harbour/contrib/makefile.prg @@ -156,6 +156,8 @@ PROCEDURE Main( ... ) RETURN ENDIF + SetCancel( .F. ) + /* Converting build options to hbmk2 options */ IF GetEnv( "HB_BUILD_MODE" ) == "cpp" @@ -222,11 +224,13 @@ PROCEDURE Main( ... ) ! Empty( GetEnv( cInstallDirVar ) ) .AND. ; ( ! ( cType == "implib" ) .OR. GetEnv( "HB_BUILD_IMPLIB" ) == "yes" ) call_hbmk2( cBase + cProject, cTargetDir, cOptions + " -instpath=${" + cInstallDirVar + "}", .F. ) - ELSE + ELSEIF !( Len( aParams ) == 1 .AND. aParams[ 1 ] == "clean" ) call_hbmk2( cBase + cProject, cTargetDir, cOptions + " -inc", .F. ) ENDIF - IF cType == "lib" .AND. GetEnv( "HB_BUILD_CONTRIB_DLL" ) == "yes" + IF cType == "lib" .AND. GetEnv( "HB_BUILD_CONTRIB_DLL" ) == "yes" .AND. ; + hb_FileExists( FN_ExtSet( cBase + cProject, ".hbc" ) ) + IF AScan( aParams, "clean" ) > 0 call_hbmk2( cBase + cProject, cTargetDir, cOptions + " -clean", .T. ) ENDIF @@ -234,7 +238,7 @@ PROCEDURE Main( ... ) ! Empty( GetEnv( cInstallDirVar ) ) .AND. ; ( ! ( cType == "implib" ) .OR. GetEnv( "HB_BUILD_IMPLIB" ) == "yes" ) call_hbmk2( cBase + cProject, cTargetDir, cOptions + " -instpath=${" + cInstallDirVar + "}", .T. ) - ELSE + ELSEIF !( Len( aParams ) == 1 .AND. aParams[ 1 ] == "clean" ) call_hbmk2( cBase + cProject, cTargetDir, cOptions + " -inc", .T. ) ENDIF ENDIF