2009-04-07 10:48 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* contrib/hbqt/generator/qt45.qtp
* contrib/hbqt/generator/hbqtgen.prg
* contrib/hbqt/generator/rebuild_hbqt.bat
* Changed to create files directly in live source dir.
(can be overridden using cmdline switches)
* qt45.qtp will be picked automatically if no project
file is passed and the file exists.
! Fixed default paths for all platforms.
+ Added feedback when creating files.
! Fixed one FCreate() session which always failed.
! Fixed generation of Makefile_gen to always have two
closing empty lines to make GNU Make happy. Otherwise
it failed when assembling the lib with MinGW/msys.
% Commented output of source parts.
; This means that the .bat file is no more necessary.
Please use: 'hbmk2 hbqtgen.prg -run' command to generate
hbqt sources.
This commit is contained in:
@@ -8,6 +8,25 @@
|
||||
2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
|
||||
*/
|
||||
|
||||
2009-04-07 10:48 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
|
||||
* contrib/hbqt/generator/qt45.qtp
|
||||
* contrib/hbqt/generator/hbqtgen.prg
|
||||
* contrib/hbqt/generator/rebuild_hbqt.bat
|
||||
* Changed to create files directly in live source dir.
|
||||
(can be overridden using cmdline switches)
|
||||
* qt45.qtp will be picked automatically if no project
|
||||
file is passed and the file exists.
|
||||
! Fixed default paths for all platforms.
|
||||
+ Added feedback when creating files.
|
||||
! Fixed one FCreate() session which always failed.
|
||||
! Fixed generation of Makefile_gen to always have two
|
||||
closing empty lines to make GNU Make happy. Otherwise
|
||||
it failed when assembling the lib with MinGW/msys.
|
||||
% Commented output of source parts.
|
||||
; This means that the .bat file is no more necessary.
|
||||
Please use: 'hbmk2 hbqtgen.prg -run' command to generate
|
||||
hbqt sources.
|
||||
|
||||
2009-04-07 09:29 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
|
||||
- contrib/hbqt/tests/Vou.ICO
|
||||
+ contrib/hbqt/tests/test.ico
|
||||
|
||||
@@ -72,11 +72,6 @@ FUNCTION Main( ... )
|
||||
|
||||
DispLogo()
|
||||
|
||||
IF PCount() == 0
|
||||
DispHelp()
|
||||
RETURN nil
|
||||
ENDIF
|
||||
|
||||
aParam := hb_AParams()
|
||||
|
||||
FOR EACH cParam IN aParam
|
||||
@@ -99,13 +94,13 @@ FUNCTION Main( ... )
|
||||
aadd( aProFiles, cParam )
|
||||
|
||||
CASE left( cParam,2 ) == '-O'
|
||||
cPathOut := substr( cParam,3 )
|
||||
cPathOut := substr( cParam, 3 )
|
||||
|
||||
CASE left( cParam,2 ) == '-I'
|
||||
cPathIn := substr( cParam,3 )
|
||||
cPathIn := substr( cParam, 3 )
|
||||
|
||||
CASE left( cParam,2 ) == '-D'
|
||||
cPathDoc := substr( cParam,3 )
|
||||
cPathDoc := substr( cParam, 3 )
|
||||
|
||||
CASE cParam == '-c'
|
||||
|
||||
@@ -116,20 +111,32 @@ FUNCTION Main( ... )
|
||||
ENDCASE
|
||||
NEXT
|
||||
|
||||
IF empty( aPrjFiles ) .and. hb_fileExists( "qt45.qtp" )
|
||||
aadd( aPrjFiles, "qt45.qtp" )
|
||||
ENDIF
|
||||
|
||||
IF empty( aPrjFiles ) .and. empty( aProFiles )
|
||||
DispHelp()
|
||||
RETURN nil
|
||||
ENDIF
|
||||
|
||||
/* Please fix for Linux */
|
||||
IF empty( cPathOut )
|
||||
cPathOut := DiskName() +':'+ s_PathSep + CurDir()
|
||||
cPathOut := hb_dirBase()
|
||||
ENDIF
|
||||
IF empty( cPathIn )
|
||||
cPathIn := DiskName() +':'+ s_PathSep + CurDir()
|
||||
cPathIn := hb_dirBase()
|
||||
ENDIF
|
||||
IF empty( cPathDoc )
|
||||
cPathDoc := DiskName() +':'+ s_PathSep + CurDir()
|
||||
cPathDoc := hb_dirBase()
|
||||
ENDIF
|
||||
IF Right( cPathOut, 1 ) == s_PathSep
|
||||
cPathOut := hb_StrShrink( cPathOut, 1 )
|
||||
ENDIF
|
||||
IF Right( cPathIn, 1 ) == s_PathSep
|
||||
cPathIn := hb_StrShrink( cPathIn, 1 )
|
||||
ENDIF
|
||||
IF Right( cPathDoc, 1 ) == s_PathSep
|
||||
cPathDoc := hb_StrShrink( cPathDoc, 1 )
|
||||
ENDIF
|
||||
|
||||
/* Manage Project File */
|
||||
@@ -170,7 +177,7 @@ STATIC FUNCTION ManageProject( cProFile, cPathIn, cPathOut, cPathDoc )
|
||||
cpp_:={}
|
||||
prg_:={}
|
||||
|
||||
OutStd( cFile + s_NewLine )
|
||||
OutStd( "Processing: " + cFile + s_NewLine )
|
||||
|
||||
cPrj := memoread( cFile )
|
||||
|
||||
@@ -290,7 +297,7 @@ STATIC FUNCTION GenSource( cProFile, cPathIn, cPathOut, cPathDoc )
|
||||
RETURN nil
|
||||
ENDIF
|
||||
|
||||
OutStd( cFile + s_NewLine )
|
||||
OutStd( "Processing: " + cFile + s_NewLine )
|
||||
|
||||
/* Prepare to be parsed properly */
|
||||
cQth := strtran( cQth, s_NewLine , _EOL )
|
||||
@@ -410,14 +417,6 @@ STATIC FUNCTION GenSource( cProFile, cPathIn, cPathOut, cPathDoc )
|
||||
/* Footer */
|
||||
BuildFooter( @cpp_ )
|
||||
|
||||
/* And create .cpp source */
|
||||
hHandle := fcreate( cFileCpp )
|
||||
IF hHandle != -1
|
||||
aeval( cpp_, { |e| fWrite( hHandle, e + s_NewLine, len( e ) + len( s_NewLine ) ) } )
|
||||
|
||||
fClose( hHandle )
|
||||
ENDIF
|
||||
|
||||
/* Build Document File */
|
||||
IF !empty( doc_ )
|
||||
BuildDocument( cWidget, doc_, cPathDoc )
|
||||
@@ -859,7 +858,7 @@ STATIC FUNCTION ParseProto( cProto, cWidget, txt_, doc_, aEnum, func_ )
|
||||
|
||||
IF !empty( cCmd )
|
||||
cCmd := strtran( cCmd, '( )', '()' ) +';'
|
||||
OutStd( cCmd + s_NewLine )
|
||||
//OutStd( cCmd + s_NewLine )
|
||||
ENDIF
|
||||
ENDIF
|
||||
ENDIF
|
||||
@@ -1060,6 +1059,8 @@ STATIC FUNCTION BuildDocument( cWidget, doc_, cPathDoc )
|
||||
|
||||
cFile := cPathDoc + s_PathSep + cWidget +'.txt'
|
||||
|
||||
OutStd( "Creating: " + cFile + hb_osNewLine() )
|
||||
|
||||
hHandle := fcreate( cFile )
|
||||
IF hHandle != -1
|
||||
aeval( dcc_, { |e| fWrite( hHandle, e + s_NewLine, len( e ) + len( s_NewLine ) ) } )
|
||||
@@ -1073,6 +1074,8 @@ STATIC FUNCTION BuildDocument( cWidget, doc_, cPathDoc )
|
||||
STATIC FUNCTION CreateTarget( cFile, txt_ )
|
||||
LOCAL hHandle := fcreate( cFile )
|
||||
|
||||
OutStd( "Creating: " + cFile + hb_osNewLine() )
|
||||
|
||||
/* Truncate entries */
|
||||
aeval( txt_, {|e,i| txt_[ i ] := trim( e ) } )
|
||||
|
||||
@@ -1194,6 +1197,7 @@ STATIC FUNCTION Build_MakeFile( cpp_, prg_, cPathOut )
|
||||
NEXT
|
||||
ENDIF
|
||||
aadd( txt_, " " )
|
||||
aadd( txt_, " " )
|
||||
|
||||
RETURN CreateTarget( cFile, txt_ )
|
||||
|
||||
@@ -2394,4 +2398,3 @@ STATIC FUNCTION Build_Demo()
|
||||
RETURN CreateTarget( cFile, txt_ )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
;
|
||||
;
|
||||
; Harbour Source Wrapper Generator's Project File for QT v4.5
|
||||
;
|
||||
; Pritpal Bedi <pritpal@vouchcac.com>
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
-I=..\qth
|
||||
|
||||
-O=..\gensource
|
||||
-O=..
|
||||
|
||||
-D=..\doc
|
||||
|
||||
@@ -123,4 +123,3 @@ QWebView.qth
|
||||
QWindowsStyle.qth
|
||||
QWindowsXPStyle.qth
|
||||
QWizard.qth
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ del ..\doc\*.txt > nul
|
||||
echo. done
|
||||
echo.
|
||||
echo. Generating gensource and doc files
|
||||
hbqtgen.exe qt45.qtp > hbqtgen.log 2>&1
|
||||
hbqtgen.exe > hbqtgen.log 2>&1
|
||||
IF ERRORLEVEL 1 GOTO SHOW_ERROR
|
||||
echo. done
|
||||
echo.
|
||||
|
||||
Reference in New Issue
Block a user