Page 1 of 2

FWH 8.09 for MinGW - beta 1 ready

PostPosted: Fri Sep 19, 2008 8:00 am
by Antonio Linares
FWH 8.09 beta 1 built using MinGW (GNU C compiler) is ready! :-)

FWH 8.09 users, interested in testing it, please send me an email. Thanks,

PostPosted: Fri Sep 19, 2008 1:39 pm
by Antonio Linares
We want to publically thanks all the FWH for MinGW beta testers that have started using it :-)

Many thanks!

PostPosted: Fri Sep 19, 2008 1:45 pm
by Antonio Linares
The GNU gcc compiler is available for Windows, Windows Mobile, Linux, Mac, iPhone, etc.

So when you learn gcc, you are learning to use gcc for all those operating systems :-)

No other C compiler provides this power :-)

PostPosted: Sat Sep 20, 2008 8:07 am
by Antonio Linares
For beta-testers only:

Please make this change in buildg.bat:

if exist %1.rc %mingw%\bin\windres -D__FLAT__ -DDIALOG=DIALOGEX -i%1.rc -o_%1.o

Now you can use your existing RC dialogs :-)

PostPosted: Sat Sep 20, 2008 8:48 am
by Antonio Linares
Also please add this line at the top of the RC files:

#include "c:\fwh\include\WinApi.ch"

PostPosted: Sat Sep 20, 2008 9:00 am
by Antonio Linares
Here you have FWH\samples\TestXBrw.prg built using FWH 8.09 and MinGW gcc !!! :-)

http://rapidshare.com/files/146803868/testxbrw.zip.html

We just need to find the way to remove the console window that appears in the background.

Testing

PostPosted: Sat Sep 20, 2008 1:40 pm
by ukoenig
Antonio,

I arranged everything for testing.
It works fine and no errors or problems inside the prg's,
but impossible, to add the borland RC-file.

Message :

Brwtools.rc : 51 : syntax error // the 1. source line
invalid argument

I included your changes in BUILDG.bat

Code: Select all  Expand view

if A%1 == A GOTO :SINTAX
if NOT EXIST %1.prg GOTO :NOEXIST

ECHO Compiling...

set hdir=d:\harbour
set hdirc=%hdir%\mingw32\harbour.exe
set hlibs=d:\harbour\mingw32
if "%fwh%" == "" set fwh=d:\fwh
set mingw=d:\mingw

%hdirc% %1 /n /i%fwh%\include;%hdir%\include /w /p %2 %3 > clip.log
IF ERRORLEVEL 1 GOTO COMPILEERROR
@type clip.log

%mingw%\bin\gcc -c %1.c -o%1.o -I%hdir%\include -I%mingw%\include -Wall
IF ERRORLEVEL 1 GOTO COMPILEERROR

if exist %1.rc %mingw%\bin\windres -D__FLAT__ -DFW=%fwh% -i%1.rc -o_%1.o
IF ERRORLEVEL 1 GOTO RESOURCESERROR



I think, the error comes from there, is there anything wrong ?

Regards
Uwe :lol:

PostPosted: Sat Sep 20, 2008 1:44 pm
by Antonio Linares
Uwe,

Please add this include at the beginning of the RC file:

#include "c:\fwh\include\winapi.ch"

also all files names (icons, cursors, bitmaps, etc.) must be between quotes: "filename...."

Also change this line in buildg.bat:

if exist %1.rc %mingw%\bin\windres -D__FLAT__ -DDIALOG=DIALOGEX -i%1.rc -o_%1.o

Test

PostPosted: Sat Sep 20, 2008 2:19 pm
by ukoenig
Antonio,

i deleted for control all BMP-entrys
a return-test in the original directory was ok.

[code]
The first lines of the BAT-file :
// ---------------------------------

if A%1 == A GOTO :SINTAX
if NOT EXIST %1.prg GOTO :NOEXIST

ECHO Compiling...

set hdir=d:\harbour
set hdirc=%hdir%\mingw32\harbour.exe
set hlibs=d:\harbour\mingw32
if "%fwh%" == "" set fwh=d:\fwh
set mingw=d:\mingw

%hdirc% %1 /n /i%fwh%\include;%hdir%\include /w /p %2 %3 > clip.log
IF ERRORLEVEL 1 GOTO COMPILEERROR
@type clip.log

%mingw%\bin\gcc -c %1.c -o%1.o -I%hdir%\include -I%mingw%\include -Wall
IF ERRORLEVEL 1 GOTO COMPILEERROR

if exist %1.rc %mingw%\bin\windres -D__FLAT__ -DDIALOG=DIALOGEX -i%1.rc -o_%1.o
IF ERRORLEVEL 1 GOTO RESOURCESERROR

// The first lines of the RC-file :
// ---------------------------------

#include "d:\fwh\include\winapi.ch"

#ifdef __FLAT__
1 24 "WindowsXP.Manifest"
#endif

#define BITMAP_10 10
#define DIALOG_11 11
#define DIALOG_10 10
#define BITMAP_9 9
#define BITMAP_8 8
#define IDC_CTEXT1 13
#define IDC_CTEXT2 15
#define DIALOG_9 9
#define IDC_PUSHBUTTON6 11
#define DIALOG_8 8
#define BITMAP_7 7
#define DIALOG_7 7
#define DIALOG_6 6
#define BITMAP_6 6
#define BITMAP_5 5
#define BITMAP_4 4
#define BITMAP_3 3
#define DIALOG_5 5
#define DIALOG_1 1
#define BITMAP_2 2
#define BITMAP_1 1

#define ES_AUTOVSCROLL 0x0040

#define DIALOG_4 4
#define DIALOG_3 3
#define DIALOG_2 2

// !!!!! The error starts at begin of the first resource => DIALOG DIALOG -129, 19, 459, 297

The DOS-error-message :
Syntax error BRWTOOLS.RC:0: fatal error whwn writing output to : invalid argument compilation terminated
*resources* error
That means: the error doesn't come from the BMP-files
This RC-file works ok, when compiled with Borland.

DIALOG DIALOG -129, 19, 459, 297
STYLE DS_MODALFRAME | 0x4L | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Dialog de prueba - posibles bugs"
FONT 11, "Arial"
{
CONTROL "", 110, FOLDER32, 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 141, 2, 315, 292
EDITTEXT 300, 3, 138, 134, 156, ES_MULTILINE | ES_AUTOVSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
PUSHBUTTON "Header / Footer", 500, 3, 123, 134, 13
PUSHBUTTON "XBrowse-Preview", 210, 3, 1, 134, 13
CONTROL "", 200, "TXBrowse", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 3, 16, 134, 105
}

[code]

I tested without RC-files, to see if i get a EXE-file
There was a error :
MULTIPLE definition of HB_FUN_MESSAGEBOX
....

Is it possible, to save a error-message to a txt-file from inside the DOS-window ?
it makes it better, to explain.

Regards
Uwe :lol:

PostPosted: Sat Sep 20, 2008 2:26 pm
by Rossine
Antonio,

Algumas observações sobre o seu exemplo "TESTXBRW.EXE":

Tamanho: 1.772.544
Tamanho usando upx: 477.184

... e usando o meu compilador:

Tamanho: 2.004.992
Tamanho usando upx: 592.384

Gostei disto pois o .EXE fica em média 12% menor e usando o UPX em média 20% :)

Perguntas:

1) Porque ao executar o seu exemplo, é aberta uma preta "Prompt MS-DOS" antes do programa ser executado ?

2) Com este novo compilador o sistema rodará mais rápido ?

Obrigado e parabéns por mais esta ferramenta :D

Gracias Maestro,

Rossine.

PostPosted: Sat Sep 20, 2008 2:45 pm
by Antonio Linares
Uwe,

>
There was a error :
MULTIPLE definition of HB_FUN_MESSAGEBOX
>

We email you a new beta that we are testing here :-)

Its the one that we have used for TestXBrw.exe

PostPosted: Sat Sep 20, 2008 2:48 pm
by Antonio Linares
Rossine,

>
1) Porque ao executar o seu exemplo, é aberta uma preta "Prompt MS-DOS" antes do programa ser executado ?
>

We believe it is a harbour issue related to the GT driver. We are doing more tests.

> 2) Com este novo compilador o sistema rodará mais rápido ?

We don't know it yet, but it may be similar, probably. The Windows speed limit is imposed but the Windows GUI not by the used C compiler.

Screensaver

PostPosted: Sat Sep 20, 2008 3:01 pm
by ukoenig
Hello,
I found a printscreen-tool to include a DOS-box

PRG
Image

Resource
Image

Regards
Uwe :lol:

PostPosted: Sat Sep 20, 2008 3:20 pm
by Antonio Linares
Uwe,

We have emailed you a new beta that solves the HB_FUN_MESSAGEBOX error :-)

PostPosted: Sat Sep 20, 2008 3:21 pm
by Antonio Linares
Uwe,

Please change this:

DIALOG DIALOG -129, 19, 459, 297

into

DIALOG DIALOGEX -129, 19, 459, 297