Page 1 of 1

Improvements of bakefile scripts

Posted: Mon Sep 21, 2009 2:47 pm
by Vadim
I have modified build system of mmex.
mmex.bkl moved to mmex/build/bakefiles. README.TXT updated and includes all necessary information how to build sources step by step. I have tested new build scripts on Fedora-11.

Now we can use MinGW to build mmex on Windows. But I didn't completed this task. I have some problems with generated makefile for gcc. bakefile will generate scripts in mmex/build/msw. But currently you should move scripts to mmex directory due to invalid paths to source files in makefile. MinGW gcc perfectly compiles mmex sources but could not link mmex.exe due to problems in wxWidgets libraries. I didn't resolved these errors yet.

Re: Improvements of bakefile scripts

Posted: Tue Sep 22, 2009 2:51 pm
by Vadim
Bakefile script now correctly generates makefile for MinGW. Anyone can run
cd trunk/mmex/build/msw
mingw32-make -f makefile.gcc

But linking error still remains :-(

Re: Improvements of bakefile scripts

Posted: Tue Sep 22, 2009 4:03 pm
by Nikolay
I have the error:
.......
windres --use-temp-file -i../../resources/mmex.rc -ommex_mmex_rc.o --define HAV
E_W32API_H --define __WXDEBUG__ --define __WXMSW__ --include-dir \lib\gcc_lib\m
swd --include-dir /include --include-dir ../../include --include-dir ../../sqlit
e
../../resources/mmex.rc:2:24: wx/msw/wx.rc: No such file or directory
windres: gcc exited with status 1
mingw32-make.EXE: *** [mmex_mmex_rc.o] Error 1

Re: Improvements of bakefile scripts

Posted: Wed Sep 23, 2009 6:34 am
by Vadim
May be you did not compile wxWidgets with MinGW. Firstly anyone should build wxWidgets, next try to compile mmex.

Re: Improvements of bakefile scripts

Posted: Wed Sep 23, 2009 7:31 am
by Nikolay

Re: Improvements of bakefile scripts

Posted: Wed Sep 23, 2009 8:34 am
by Vadim
I have successfuly built mmex using MinGW :-)
Instructions:

1.Modify wxWidgets\include\wx\msw\setup.h
wxUSE_TAB_DIALOG 1
wxUSE_UNICODE 1

2.Modify wxWidgets\build\msw\config.gcc
UNICODE ?= 1
MONOLITHIC ?= 1

3.Build library
cd wxWidgets\build\msw
mingw32-make -f makefile.gcc %* 2> mingw.log

4. Modify mmex\build\msw\config.gcc for mmex
WX_UNICODE ?= 1
WX_MONOLITHIC ?= 1

5. Build mmex
cd mmex\build\msw
mingw32-make -f makefile.gcc %* 2> mingw.log

Re: Improvements of bakefile scripts

Posted: Wed Sep 23, 2009 8:40 am
by Vadim
You do not need MSYS to build wxWidgets. It is not necessary.
OMG! :o The debug version of mmex.exe is 56 MB, release is 22 Mb!!!
Welcome to MONOLITHIC build of library! It's terrible size :-(

Re: Improvements of bakefile scripts

Posted: Wed Sep 23, 2009 9:22 am
by Nikolay
Hi again.

It does not work for me.

mingw32-make.EXE: *** No rule to make target `%*'. Stop.

or

process_begin: CreateProcess(NULL, -c "if not exist gcc_mswud mkdir gcc_mswud",
...) failed.
make (e=2): Не удается найти указанный файл.♪
mingw32-make.EXE: [gcc_mswud] Error 2 (ignored)
process_begin: CreateProcess(NULL, -c "if not exist ..\..\lib\gcc_lib\mswud mkdi
r ..\..\lib\gcc_lib\mswud", ...) failed.
make (e=2): Не удается найти указанный файл.♪
mingw32-make.EXE: *** [..\..\lib\gcc_lib\mswud] Error 2

Re: Improvements of bakefile scripts

Posted: Wed Sep 23, 2009 9:36 am
by Vadim
Sorry, "%*" came from my .bat file. Create in build/msw file mingw.bat with this contents

set PATH=C:\bin\MinGW\bin;C:\bin\MinGW\lib;%PATH%
mingw32-make -f makefile.gcc %* 2> mingw.log

And compile sources using command "mingw.bat". To clean use "mingw.bat clean" and so on.

P.S. You should modify path to MinGW in one differs.

Re: Improvements of bakefile scripts

Posted: Mon Sep 28, 2009 7:30 am
by Vadim
The release build of mmex.exe now is 10 MB, so everyone can freely use MinGW to build mmex. UPX compresses mmex.exe to 4.5 Mb.