FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Resource compiler for 32 bit .bmp
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Resource compiler for 32 bit .bmp
Posted: Thu Aug 11, 2011 06:19 PM
To All

I have run into a wall on trying to compile a .rc file to .res that contains all my application icons and bitmap files.

BRW will only import up to 24 bit images so I downloaded Resedit to test the ability to import a 32 bit .bmp which was successful.

Borland 5.5 can only compile a .rc that has up to 24 bit resolution bitmaps and errors on the compile ..

Here is my revised rc2dll32.bat file and the .rc resulting compile.. does anyone have advice on a resource compiler that will compile .rc to .res ? .. and I imagine if I do get a .res file to compile, I bet the resulting .exe will be corrupt ?

Rick Lipkin

Code (fw): Select all Collapse
rem RC file to 32 bits resources DLL
rem syntax: rc2dll32.bat Your_rc_file  !!! without the .RC extension

DEL WEBCRAWL.RES
DEL WEBCRAWL.RC

COPY *.RC WEBCRAWL.RC

C:\BORLAND\BCC55\BIN\bcc32 -c c:\fwh910\dll\screen32.c
C:\BORLAND\BCC55\BIN\brc32 -r %1.rc


REM C:\BORLAND\BCC55\BIN\ilink32 /Tpd c:\borland\bcc55\lib\c0d32.obj screen32.obj, %1.dll,,c:\borland\bcc55\lib\cw32.lib c:\borland\bcc55\lib\import32.lib,, %1.res

del *.iL?
del *.map
del *.obj
:del *.res
del *.tds
del *.~??
echo done!


Code (fw): Select all Collapse
C:\Fox\WebCrawlSave 6-21-11>rem syntax: rc2dll32.bat Your_rc_file  !!! without the .RC extension 

C:\Fox\WebCrawlSave 6-21-11>DEL WEBCRAWL.RES 

C:\Fox\WebCrawlSave 6-21-11>DEL WEBCRAWL.RC 

C:\Fox\WebCrawlSave 6-21-11>COPY *.RC WEBCRAWL.RC 
ICONS.RC
IMAGE.RC
LINKINSP.RC
LOGIN.RC
LOGVIEW.RC
RESULTS.RC
SCRAPE_H.RC
SCRAPE_T.RC
SEARCH.RC
URLTEST.RC
USERBROW.RC
USERVIEW.RC
UTILMENU.RC
VENDOR.RC
WEBBROW.RC
WEBVIEW.RC
        1 file(s) copied.

C:\Fox\WebCrawlSave 6-21-11>C:\BORLAND\BCC55\BIN\bcc32 -c c:\fwh910\dll\screen32.c 
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
c:\fwh910\dll\screen32.c:

C:\Fox\WebCrawlSave 6-21-11>C:\BORLAND\BCC55\BIN\brc32 -r WEBCRAWL.rc 
Borland Resource Compiler  Version 5.40
Copyright (c) 1990, 1999 Inprise Corporation.  All rights reserved.

Error WEBCRAWL.rc 41 35: Invalid bitmap format

C:\Fox\WebCrawlSave 6-21-11>REM C:\BORLAND\BCC55\BIN\ilink32 /Tpd c:\borland\bcc55\lib\c0d32.obj screen32.obj, WEBCRAWL.dll,,c:\borland\bcc55\lib\cw32.lib c:\borland\bcc55\lib\import32.lib,, WEBCRAWL.res 

C:\Fox\WebCrawlSave 6-21-11>del *.iL? 

C:\Fox\WebCrawlSave 6-21-11>del *.map 

C:\Fox\WebCrawlSave 6-21-11>del *.obj 

C:\Fox\WebCrawlSave 6-21-11>del *.tds 

C:\Fox\WebCrawlSave 6-21-11>del *.~?? 

C:\Fox\WebCrawlSave 6-21-11>echo done! 
done!
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Resource compiler for 32 bit .bmp
Posted: Thu Aug 11, 2011 07:01 PM

Rick,

have you tried to use free PellesC built in resource editor ? Please give it a try :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: Resource compiler for 32 bit .bmp
Posted: Thu Aug 11, 2011 08:05 PM

Antonio

Does PellsC have a resource compiler ?? ( I am sure they do ) What I am doing is creating a .rc with BRW .. or PellsC would be fine .. then I compile the .rc's into a single .res then compile my .prg+res into a monolithic .exe

Can I mix the two and use the PellsC resource editor\compiler to create my .res and then use Borland to do the final compile and link ?

If I recall .. does PellsC use the Microsoft libs ? .. or should I just forget Borland all together and try to do the resource building and final compile and link with PellsC?

Thanks
Rick

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Resource compiler for 32 bit .bmp
Posted: Thu Aug 11, 2011 08:17 PM

I use Pelles C only for its resource editor. If the rc file contains 32 bit bitmaps etc. I compile and save as .res files.

I use xmate which can link any number or rc or res files.

Regards



G. N. Rao.

Hyderabad, India
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: Resource compiler for 32 bit .bmp
Posted: Thu Aug 11, 2011 08:24 PM
Rao

Thanks for the answer .. I would probably do the same thing and just use the resource editor to create my .rc and compile to .res.

Can you tell me what needs to be changed ( brc32 line ) and the flags for the PellsC resource compiler .. here is the snipit from my xMate environment ..

Thanks
Rick

Code (fw): Select all Collapse
[C]
C_INSTALL=C:\Borland\BCC55
C_COMP_COMMAND=%C_BIN_INSTALL%\Bcc32.Exe -M -c -O2  -tW -v- -X %CRLF%-DHB_OS_WIN_32 %CRLF%-I%C_INC_INSTALL%;%HB_INC_INSTALL%  -n%HOME%\Obj %C%
C_LIB_COMMAND=%C_BIN_INSTALL%\TLib.Exe %LIB% /P512 @%RSP% , %LST%
C_LINK_COMMAND=%C_BIN_INSTALL%\iLink32.Exe -Gn -M -m -s -Tpe -aa @%LNK%
C_RC_COMMAND=%C_BIN_INSTALL%\Brc32.Exe -r  -fo%RES%  %RC%
C_DLL_COMMAND=
Option prefix=-
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Resource compiler for 32 bit .bmp
Posted: Thu Aug 11, 2011 08:27 PM

You do not have to change anything in xmate environment.

Use Pelles C IDE to create your rc file. Save As res file in your project folder.
In xMate just include the res file directly as one of the resource files. xMate does not have to know anything about Pelles C.

Regards



G. N. Rao.

Hyderabad, India
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: Resource compiler for 32 bit .bmp
Posted: Thu Aug 11, 2011 08:39 PM

Rao

That makes sense ..

Thanks
Rick

Posts: 1789
Joined: Tue Oct 11, 2005 05:01 PM
Re: Resource compiler for 32 bit .bmp
Posted: Fri Aug 12, 2011 02:18 AM

I use resedit four build rc file and rc.exe from microsoft c compiler with out problems.

Salu2

Carlos Vargas

Desde Managua, Nicaragua (CA)
Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
Re: Resource compiler for 32 bit .bmp
Posted: Fri Aug 12, 2011 04:16 AM
Me too use PellesC as my resource compiler
Rick Lipkin wrote:Can you tell me what needs to be changed ( brc32 line ) and the flags for the PellsC resource compiler


If you are using a .rmk file then, in your .rmk file
Code (fw): Select all Collapse
CStock.res : CStock.rc
  D:\PellesC\Bin\PORC.EXE CStock.rc   /I D:\pellesc\include /I D:\pellesc\include\win


The same commands can be used in xMate's Environment file. In your xMate's environment file, you may replace the lines calling Borland Resource compiler with the above commands.
OR
You can manipulate your xMate's environment file to use PellesC as you resource compiler by providing the following line in xMate's GUI
Code (fw): Select all Collapse
D:\PellesC\Bin\PORC.EXE CStock.rc   /I D:\pellesc\include /I D:\pellesc\include\win


Regards
Anser

Continue the discussion