2010-10-17 16:05 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)

* package/winuni/mpkg_win_uni.bat
  * package/winuni/mpkg_win_uni.nsi
    * Renamed QT license file (now shows "LGPL").
    + Added uic.exe and rcc.exe to Windows unified build.
    + Added QT implibs for mingw compiler.
    ; It means that now default Windows unified package can
      be used to create QT apps without installing QT package
      separately. Please someone verify this is in compliance
      with LGPL QT license.

  * contrib/hbqt/hbqt_hbmk2_plugin.hbs
    - Removed support for compatibility setting HB_QT_MOC_BIN.
    + Will now autodetect uic/rcc/moc if present next to hbmk2
      (only on win/os2 systems). This will be the case when
      using unified Windows package. Only lightly tested.

  * contrib/hbide/idemisc.prg
  * contrib/hbide/idemain.prg
  * contrib/hbide/hbide.ch
    * Cleaned/optimized loading of UI.
    - Deleted reference to HbQtUi() so that the static lib
      QtUiTools is not required to build hbide. (it was not
      actively used anyway)

  ; TOFIX: QUiLoader class should be moved to a separated lib
           from hbqtgui.
This commit is contained in:
Viktor Szakats
2010-10-17 14:07:27 +00:00
parent b749037bd8
commit 0d6c3b319b
7 changed files with 107 additions and 153 deletions

View File

@@ -16,6 +16,34 @@
The license applies to all entries newer than 2009-04-28.
*/
2010-10-17 16:05 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* package/winuni/mpkg_win_uni.bat
* package/winuni/mpkg_win_uni.nsi
* Renamed QT license file (now shows "LGPL").
+ Added uic.exe and rcc.exe to Windows unified build.
+ Added QT implibs for mingw compiler.
; It means that now default Windows unified package can
be used to create QT apps without installing QT package
separately. Please someone verify this is in compliance
with LGPL QT license.
* contrib/hbqt/hbqt_hbmk2_plugin.hbs
- Removed support for compatibility setting HB_QT_MOC_BIN.
+ Will now autodetect uic/rcc/moc if present next to hbmk2
(only on win/os2 systems). This will be the case when
using unified Windows package. Only lightly tested.
* contrib/hbide/idemisc.prg
* contrib/hbide/idemain.prg
* contrib/hbide/hbide.ch
* Cleaned/optimized loading of UI.
- Deleted reference to HbQtUi() so that the static lib
QtUiTools is not required to build hbide. (it was not
actively used anyway)
; TOFIX: QUiLoader class should be moved to a separated lib
from hbqtgui.
2010-10-17 16:40 UTC+0200 Petr Chornyj (myorg63 at mail.ru)
* harbour/ChangeLog
! Fixed date in my today's commits.

View File

@@ -54,13 +54,10 @@
#include "hbtrace.ch"
//#define __VIA_UIC__
//#define __VIA_UI__
#define __VIA_FUNC__
#define UI_MODE_UIC 0
#define UI_MODE_FUNC 1
#define UI_MODE_FUNC 0
#define UI_MODE_UIC 1
#define UI_MODE_UI 2
#define UI_MODE_DEFAULT UI_MODE_FUNC
#define _EOL Chr( 10 )

View File

@@ -302,7 +302,7 @@ CLASS HbIde
DATA lClosing INIT .f.
DATA lStatusBarVisible INIT .t.
DATA nModeUI INIT UI_MODE_UIC
DATA nModeUI INIT UI_MODE_DEFAULT
DATA oSys
DATA oSysMenu
@@ -362,16 +362,6 @@ METHOD HbIde:new( aParams )
METHOD HbIde:create( aParams )
LOCAL qPixmap, qSplash, cView
#ifdef __VIA_UIC__
::nModeUI := 0
#endif
#ifdef __VIA_FUNC__
::nModeUI := UI_MODE_FUNC
#endif
#ifdef __VIA_UI__
::nModeUI := UI_MODE_UI
#endif
qPixmap := QPixmap( ":/resources" + hb_ps() + "hbidesplash.png" )
qSplash := QSplashScreen()
* qSplash:setWindowFlags( hb_bitOr( Qt_WindowStaysOnTopHint, qSplash:windowFlags() ) )

View File

@@ -2124,92 +2124,36 @@ FUNCTION hbide_SetWrkFolderLast( cPathFile )
/*----------------------------------------------------------------------*/
FUNCTION hbide_getUI( cUI, qParent )
LOCAL nModeUI := hbide_setIde():nModeUI
LOCAL oUI
cUI := lower( cUI )
SWITCH cUI
CASE "findinfilesex"
oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_Findinfilesex( qParent ), NIL )
EXIT
CASE "updown"
oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_UpDown( qParent ), NIL )
EXIT
CASE "updown_v"
oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_UpDown_v( qParent ), NIL )
EXIT
CASE "searchreplace"
oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_SearchReplace( qParent ), NIL )
EXIT
CASE "finddialog"
oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_FindDialog( qParent ), NIL )
EXIT
CASE "environments"
oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_Environments( qParent ), NIL )
EXIT
CASE "environ"
oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_Environ( qParent ), NIL )
EXIT
CASE "shortcuts"
oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_Shortcuts( qParent ), NIL )
EXIT
CASE "docwriter"
oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_Docwriter( qParent ), NIL )
EXIT
CASE "toolsutilities"
oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_Toolsutilities( qParent ), NIL )
EXIT
CASE "funclist"
oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_Funclist( qParent ), NIL )
EXIT
CASE "docviewgenerator"
oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_Docviewgenerator( qParent ), NIL )
EXIT
CASE "selectproject"
oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_Selectproject( qParent ), NIL )
EXIT
CASE "projectpropertiesex"
oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_Projectpropertiesex( qParent ), NIL )
EXIT
CASE "selectionlist"
oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_Selectionlist( qParent ), NIL )
EXIT
CASE "themesex"
oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_Themesex( qParent ), NIL )
EXIT
CASE "setup"
oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_Setup( qParent ), NIL )
EXIT
CASE "mainwindow"
oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_Mainwindow( qParent ), NIL )
EXIT
CASE "skeletons"
oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_Skeletons( qParent ), NIL )
EXIT
CASE "editor"
oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_Editor( qParent ), NIL )
EXIT
CASE "dbstruct"
oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_DbStruct( qParent ), NIL )
EXIT
CASE "fetchdate"
oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_FetchDate( qParent ), NIL )
EXIT
CASE "tables"
oUI := iif( nModeUI == UI_MODE_FUNC, hbqtui_Tables( qParent ), NIL )
EXIT
ENDSWITCH
IF empty( oUI )
IF nModeUI == UI_MODE_UI
oUI := HbQtUI():new( hbide_ui( cUI ), qParent ):create()
ELSE
oUI := HbQtUI():new( hbide_uic( cUI ), qParent ):create()
ENDIF
IF hbide_setIde():nModeUI == UI_MODE_FUNC
SWITCH Lower( cUI )
CASE "findinfilesex" ; RETURN hbqtui_Findinfilesex( qParent )
CASE "updown" ; RETURN hbqtui_UpDown( qParent )
CASE "updown_v" ; RETURN hbqtui_UpDown_v( qParent )
CASE "searchreplace" ; RETURN hbqtui_SearchReplace( qParent )
CASE "finddialog" ; RETURN hbqtui_FindDialog( qParent )
CASE "environments" ; RETURN hbqtui_Environments( qParent )
CASE "environ" ; RETURN hbqtui_Environ( qParent )
CASE "shortcuts" ; RETURN hbqtui_Shortcuts( qParent )
CASE "docwriter" ; RETURN hbqtui_Docwriter( qParent )
CASE "toolsutilities" ; RETURN hbqtui_Toolsutilities( qParent )
CASE "funclist" ; RETURN hbqtui_Funclist( qParent )
CASE "docviewgenerator" ; RETURN hbqtui_Docviewgenerator( qParent )
CASE "selectproject" ; RETURN hbqtui_Selectproject( qParent )
CASE "projectpropertiesex" ; RETURN hbqtui_Projectpropertiesex( qParent )
CASE "selectionlist" ; RETURN hbqtui_Selectionlist( qParent )
CASE "themesex" ; RETURN hbqtui_Themesex( qParent )
CASE "setup" ; RETURN hbqtui_Setup( qParent )
CASE "mainwindow" ; RETURN hbqtui_Mainwindow( qParent )
CASE "skeletons" ; RETURN hbqtui_Skeletons( qParent )
CASE "editor" ; RETURN hbqtui_Editor( qParent )
CASE "dbstruct" ; RETURN hbqtui_DbStruct( qParent )
CASE "fetchdate" ; RETURN hbqtui_FetchDate( qParent )
CASE "tables" ; RETURN hbqtui_Tables( qParent )
ENDSWITCH
ENDIF
RETURN oUI
RETURN NIL
/*----------------------------------------------------------------------*/

View File

@@ -125,7 +125,7 @@ FUNCTION hbmk2_plugin_qt( hbmk2 )
ENDIF
ENDIF
IF ! Empty( hbmk2[ "vars" ][ "aMOC_Src" ] )
hbmk2[ "vars" ][ "cMOC_BIN" ] := qt_tool_detect( hbmk2, "moc", "MOC_BIN", "HB_QT_MOC_BIN" )
hbmk2[ "vars" ][ "cMOC_BIN" ] := qt_tool_detect( hbmk2, "moc", "MOC_BIN" )
IF Empty( hbmk2[ "vars" ][ "cMOC_BIN" ] )
cRetVal := I_( "Required QT tool not found" )
ENDIF
@@ -325,64 +325,53 @@ FUNCTION hbmk2_plugin_qt( hbmk2 )
RETURN cRetVal
STATIC FUNCTION qt_tool_detect( hbmk2, cName, cEnvQT, cEnvHB )
STATIC FUNCTION qt_tool_detect( hbmk2, cName, cEnvQT )
LOCAL cBIN
LOCAL aEnvList
aEnvList := { "HB_QTPATH", "HB_QTPOSTFIX" }
IF ! Empty( cEnvHB )
AAdd( aEnvList, cEnvHB )
ENDIF
cBIN := GetEnv( cEnvQT )
IF Empty( cBIN )
IF Empty( cEnvHB ) .OR. Empty( GetEnv( cEnvHB ) )
cName += GetEnv( "HB_QTPOSTFIX" )
IF Empty( GetEnv( "HB_QTPATH" ) ) .OR. ;
! hb_FileExists( cBIN := GetEnv( "HB_QTPATH" ) + cName )
cName += GetEnv( "HB_QTPOSTFIX" )
IF Empty( GetEnv( "HB_QTPATH" ) ) .OR. ;
! hb_FileExists( cBIN := GetEnv( "HB_QTPATH" ) + cName )
cBIN := ""
IF hbmk2[ "cPLAT" ] $ "win|os2"
cBIN := ""
IF hbmk2[ "cPLAT" ] $ "win|os2"
hb_AIns( aEnvList, 1, "HB_WITH_QT", .T. )
hb_AIns( aEnvList, 1, "HB_WITH_QT", .T. )
IF ! Empty( GetEnv( "HB_WITH_QT" ) )
IF ! Empty( GetEnv( "HB_WITH_QT" ) )
IF GetEnv( "HB_WITH_QT" ) == "no"
/* Return silently. It shall fail at dependency detection inside hbmk2 */
RETURN NIL
ELSE
IF ! hb_FileExists( cBIN := hbmk2_PathNormalize( GetEnv( "HB_WITH_QT" ) + "\..\bin\" + cName + ".exe" ) )
hbmk2_OutErr( hbmk2, hb_StrFormat( "Warning: HB_WITH_QT points to incomplete QT installation. '%1$s' executable not found.", cName ) )
cBIN := ""
ENDIF
IF GetEnv( "HB_W_ITH_QT" ) == "no"
/* Return silently. It shall fail at dependency detection inside hbmk2 */
RETURN NIL
ELSE
IF ! hb_FileExists( cBIN := hbmk2_PathNormalize( GetEnv( "HB_WITH_QT" ) + "\..\bin\" + cName + ".exe" ) )
hbmk2_OutErr( hbmk2, hb_StrFormat( "Warning: HB_WITH_QT points to incomplete QT installation. '%1$s' executable not found.", cName ) )
cBIN := ""
ENDIF
ENDIF
ENDIF
IF Empty( cBIN )
cBIN := hbmk2_FindInPath( cName, GetEnv( "PATH" ) + hb_osPathListSeparator() + "/opt/qtsdk/qt/bin" )
IF Empty( cBIN )
hbmk2_OutErr( hbmk2, hb_StrFormat( "%1$s not set, could not autodetect '%2$s' executable", hbmk2_ArrayToList( aEnvList, ", " ), cName ) )
RETURN NIL
ELSE
cBIN := hbmk2_DirAddPathSep( hb_DirBase() ) + cName + ".exe"
IF ! hb_FileExists( cBIN )
cBIN := ""
ENDIF
ENDIF
ENDIF
IF hbmk2[ "lINFO" ]
hbmk2_OutStd( hbmk2, hb_StrFormat( "Using QT '%1$s' executable: %2$s (autodetected)", cName, cBIN ) )
ENDIF
ELSE
/* kept for compatibility */
IF hb_FileExists( GetEnv( cEnvHB ) )
cBIN := GetEnv( cEnvHB )
IF hbmk2[ "lINFO" ]
hbmk2_OutStd( hbmk2, hb_StrFormat( "Using QT '%1$s' executable: %2$s", cName, cBIN ) )
IF Empty( cBIN )
cBIN := hbmk2_FindInPath( cName, GetEnv( "PATH" ) + hb_osPathListSeparator() + "/opt/qtsdk/qt/bin" )
IF Empty( cBIN )
hbmk2_OutErr( hbmk2, hb_StrFormat( "%1$s not set, could not autodetect '%2$s' executable", hbmk2_ArrayToList( aEnvList, ", " ), cName ) )
RETURN NIL
ENDIF
ELSE
hbmk2_OutErr( hbmk2, hb_StrFormat( "%1$s points to non-existent file. Make sure to set it to full path and filename of '%2$s' executable.", cEnvHB, cName ) )
RETURN NIL
ENDIF
ENDIF
IF hbmk2[ "lINFO" ]
hbmk2_OutStd( hbmk2, hb_StrFormat( "Using QT '%1$s' executable: %2$s (autodetected)", cName, cBIN ) )
ENDIF
ENDIF
RETURN cBIN

View File

@@ -78,8 +78,12 @@ xcopy /y "%HB_WITH_QT%\..\bin\mingwm10.dll"
xcopy /y "%HB_WITH_QT%\..\bin\QtCore4.dll" %HB_ABSROOT%bin\
xcopy /y "%HB_WITH_QT%\..\bin\QtGui4.dll" %HB_ABSROOT%bin\
xcopy /y "%HB_WITH_QT%\..\bin\QtNetwork4.dll" %HB_ABSROOT%bin\
copy /y "%HB_WITH_QT%\..\LICENSE.LGPL" %HB_ABSROOT%bin\Qt_LICENSE.txt
copy /y "%HB_WITH_QT%\..\LGPL_EXCEPTION.txt" %HB_ABSROOT%bin\Qt_LICENSE_EXCEPTION.txt
xcopy /y "%HB_WITH_QT%\..\lib\libQtCore4.a" %HB_ABSROOT%lib\win\mingw\
xcopy /y "%HB_WITH_QT%\..\lib\libQtGui4.a" %HB_ABSROOT%lib\win\mingw\
xcopy /y "%HB_WITH_QT%\..\lib\libQtUiTools.a" %HB_ABSROOT%lib\win\mingw\
xcopy /y "%HB_WITH_QT%\..\lib\libQtNetwork4.a" %HB_ABSROOT%lib\win\mingw\
copy /y "%HB_WITH_QT%\..\LICENSE.LGPL" %HB_ABSROOT%bin\Qt_LICENSE_LGPL.txt
copy /y "%HB_WITH_QT%\..\LGPL_EXCEPTION.txt" %HB_ABSROOT%bin\Qt_LICENSE_LGPL_EXCEPTION.txt
pushd
@@ -125,15 +129,17 @@ echo "%HB_DR%bin\hbrun.exe" >> _hbfiles
echo "%HB_DR%bin\hbtest.exe" >> _hbfiles
echo "%HB_DR%bin\hbformat.exe" >> _hbfiles
echo "%HB_DR%bin\hbnetio.exe" >> _hbfiles
if exist "%HB_DR%bin\hbide.exe" echo "%HB_DR%bin\hbide.exe" >> _hbfiles
if exist "%HB_DR%bin\libgcc_s_dw2-1.dll" echo "%HB_DR%bin\libgcc_s_dw2-1.dll" >> _hbfiles
if exist "%HB_DR%bin\mingwm10.dll" echo "%HB_DR%bin\mingwm10.dll" >> _hbfiles
if exist "%HB_DR%bin\QtCore4.dll" echo "%HB_DR%bin\QtCore4.dll" >> _hbfiles
if exist "%HB_DR%bin\QtGui4.dll" echo "%HB_DR%bin\QtGui4.dll" >> _hbfiles
if exist "%HB_DR%bin\QtNetwork4.dll" echo "%HB_DR%bin\QtNetwork4.dll" >> _hbfiles
if exist "%HB_DR%bin\Qt_LICENSE.txt" echo "%HB_DR%bin\Qt_LICENSE.txt" >> _hbfiles
if exist "%HB_DR%bin\Qt_LICENSE_EXCEPTION.txt" echo "%HB_DR%bin\Qt_LICENSE_EXCEPTION.txt" >> _hbfiles
if exist "%HB_DR%bin\hbmk.hbc" echo "%HB_DR%bin\hbmk.hbc" >> _hbfiles
if exist "%HB_DR%bin\hbide.exe" echo "%HB_DR%bin\hbide.exe" >> _hbfiles
if exist "%HB_DR%bin\libgcc_s_dw2-1.dll" echo "%HB_DR%bin\libgcc_s_dw2-1.dll" >> _hbfiles
if exist "%HB_DR%bin\mingwm10.dll" echo "%HB_DR%bin\mingwm10.dll" >> _hbfiles
if exist "%HB_DR%bin\QtCore4.dll" echo "%HB_DR%bin\QtCore4.dll" >> _hbfiles
if exist "%HB_DR%bin\QtGui4.dll" echo "%HB_DR%bin\QtGui4.dll" >> _hbfiles
if exist "%HB_DR%bin\QtNetwork4.dll" echo "%HB_DR%bin\QtNetwork4.dll" >> _hbfiles
if exist "%HB_DR%bin\uic.exe" echo "%HB_DR%bin\uic.exe" >> _hbfiles
if exist "%HB_DR%bin\rcc.exe" echo "%HB_DR%bin\rcc.exe" >> _hbfiles
if exist "%HB_DR%bin\Qt_LICENSE_LGPL.txt" echo "%HB_DR%bin\Qt_LICENSE_LGPL.txt" >> _hbfiles
if exist "%HB_DR%bin\Qt_LICENSE_LGPL_EXCEPTION.txt" echo "%HB_DR%bin\Qt_LICENSE_LGPL_EXCEPTION.txt" >> _hbfiles
if exist "%HB_DR%bin\hbmk.hbc" echo "%HB_DR%bin\hbmk.hbc" >> _hbfiles
echo "%HB_DR%bin\upx*.*" >> _hbfiles
echo "%HB_DR%include\*.*" >> _hbfiles
echo "%HB_DR%bin\harbour-x64.exe" >> _hbfiles

View File

@@ -150,8 +150,8 @@ Section /o "IDE" hb_ide
File "$%HB_ABSROOT%bin\QtCore4.dll"
File "$%HB_ABSROOT%bin\QtGui4.dll"
File "$%HB_ABSROOT%bin\QtNetwork4.dll"
File "$%HB_ABSROOT%bin\Qt_LICENSE.txt"
File "$%HB_ABSROOT%bin\Qt_LICENSE_EXCEPTION.txt"
File "$%HB_ABSROOT%bin\Qt_LICENSE_LGPL.txt"
File "$%HB_ABSROOT%bin\Qt_LICENSE_LGPL_EXCEPTION.txt"
SectionEnd
!endif