Page 1 of 1

How to add 2 rc file to xBuilder?

Posted: Thu Jun 05, 2008 6:58 pm
by dutch
Dear all,

I use xHb.com + FWH 8.04. The problem is my .RC file is too big and I split to 2 files. How can I add 2 files to xBuilder?

My big problem now.

Regards,
Dutch

Join RC-files

Posted: Thu Jun 05, 2008 7:25 pm
by ukoenig
Hello Dutch,

after my RC-File was to big like yours ( memory-problem )
with Borland's resource workshop,
I work with 3 RC-files

1. PART1.RC = Bitmaps and icons
2. PART2.RC = main dialogs
3. PART3.RC = the rest

Before i want to compile the prg's with the make-file,
i use just a simple editor and create a empty file : MASKEN32.RC

I import File No. 1, go to the end of file and import File No. 2
and so on. Then i save them as 1 file with the name MASKEN32.RC

Thats all. The res.-editor is not used.

It is much better to handle, because with the Res.-editor
you need just to load the res.-file-part, where you have
to change a resource.

2 month ago, i changed to < resource-builder >
with this program, i don't have a limit anymore and
can use jpg and 32 Bit BMP's.


Here is my makefile as a sample :

Code: Select all

#Borland make sample, (c) FiveTech Software 2005

HBDIR=d:\xharbour
BCDIR=d:\bcc55
FWDIR=d:\fwh

# change path if needed
# --------------------------

.path.OBJ = .\obj
.path.PRG = .\
.path.CH  = $(FWDIR)\include;$(HBDIR)\include
.path.C   = .\
.path.rc  = .\

# PRG-Files

PRG = \
bos32.PRG \
...
...
...

fwcalen.PRG \
tcalenda.PRG 

# C-files
# C =          \
# two.C                 

PROJECT    : Bos32.exe

Bos32.exe  : $(PRG:.PRG=.OBJ) $(C:.C=.OBJ) Masken32.res
   echo off
   echo $(BCDIR)\bin\c0w32.obj + > b32.bc

  # OBJ-Liste
   # -------------
   echo obj\bos32.obj \
  ....
  ....
         obj\errsysw.obj \
         obj\fwcalen.obj \
         obj\tcalenda.obj, + >> b32.bc 
 
   echo Bos32.exe, + >> b32.bc
   echo Bos32.map, + >> b32.bc

   # Fivewin Lib`s für xHARBOUR
   # --------------------------------------

   echo $(FWDIR)\lib\Fivehx.lib $(FWDIR)\lib\FiveHC.lib + >> b32.bc
   
   # xHARBOUR-Lib`s
   # -----------------------

   echo $(HBDIR)\lib\rtl.lib + >> b32.bc
   echo $(HBDIR)\lib\vm.lib + >> b32.bc
   echo $(HBDIR)\lib\gtgui.lib + >> b32.bc
   echo $(HBDIR)\lib\lang.lib + >> b32.bc
   echo $(HBDIR)\lib\macro.lib + >> b32.bc
   echo $(HBDIR)\lib\rdd.lib + >> b32.bc
   echo $(HBDIR)\lib\dbfntx.lib + >> b32.bc
   echo $(HBDIR)\lib\dbfcdx.lib + >> b32.bc
   echo $(HBDIR)\lib\dbffpt.lib + >> b32.bc
   echo $(HBDIR)\lib\hbsix.lib + >> b32.bc
   echo $(HBDIR)\lib\debug.lib + >> b32.bc
   echo $(HBDIR)\lib\common.lib + >> b32.bc
   echo $(HBDIR)\lib\pp.lib + >> b32.bc
   echo $(HBDIR)\lib\codepage.lib + >> b32.bc
   echo $(HBDIR)\lib\pcrepos.lib + >> b32.bc

   # Uncomment these two lines to use Advantage RDD
   # echo $(HBDIR)\lib\rddads.lib + >> b32.bc
   # echo $(HBDIR)\lib\Ace32.lib + >> b32.bc

   echo $(BCDIR)\lib\cw32.lib + >> b32.bc
   echo $(BCDIR)\lib\import32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\odbc32.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\nddeapi.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\iphlpapi.lib + >> b32.bc
   echo $(BCDIR)\lib\psdk\rasapi32.lib, >> b32.bc

  
   IF EXIST Masken32.res echo Masken32.res >> b32.bc
     $(BCDIR)\bin\ilink32 -Gn -aa -Tpe -s -v @b32.bc
   del b32.bc

.PRG.OBJ:
  $(HBDIR)\bin\harbour $< /N /W /Oobj\ /I$(FWDIR)\include;$(HBDIR)\include > clip.log
  $(BCDIR)\bin\bcc32 -c -tWM -I$(HBDIR)\include -oobj\$& obj\$&.c

.C.OBJ:
  echo -c -tWM -D__HARBOUR__ -DHB_API_MACROS > tmp
  echo -I$(HBDIR)\include;$(FWDIR)\include >> tmp
  $(BCDIR)\bin\bcc32 -oobj\$& @tmp $&.c
  del tmp

Masken32.res : Masken32.rc
  $(BCDIR)\bin\brc32.exe -r Masken32.rc

Maybe it helps

Best regards

Uwe :lol:

Posted: Thu Jun 05, 2008 8:19 pm
by driessen
Hello Dutch,

I have 6 RC-files in my application.

To build 1 RES-file which I add to xBuilder, I use a small BAT-command with these instructions :
COPY FILE1.RC+FILE2.RC+FILE3.RC+FILE4.RC+FILE5.RC+FILE6.RC+MANIFEST.RC RESOURCE.RC

C:\PROGRA~1\BORLAND\BCC55\BIN\BRC32.EXE -R RESOURCE.RC
FILE1.RC till FILE6.RC are my RC-files, made by Resource Builder.

MANIFEST.RC just contains these lines :
#ifdef __FLAT__
1 24 "WindowsXP.Manifest"
#endif
After having executed my BAT-file, it results into 1 RES-file calles RESOURCE.RES. This is the file I add to xBuilder.

It works very easy. Until now no restrictions in size or number or RC-files. It's also quite easy to handle.

I hope this can help you.

Good luck.

Regards.

Posted: Thu Jun 05, 2008 10:48 pm
by Colin Wisbey
Dutch,

I use 2 RC files for each app - 1 contains stuff specific to the particular app, the other contains general stuff that is used by all my apps.

In Builder (Step 3, RC files), I just include both RC files. Works fine.

HTH.

Colin

Posted: Fri Jun 06, 2008 5:33 am
by dutch
Thanks for all, I will try.

Dear Colin,
I seperate 2 rc, 1 for bitmap and another 1 for the rest. I try as your recommend but the bitmap doesn't show anywhere.

Regards,
Dutch
Colin Wisbey wrote:Dutch,

I use 2 RC files for each app - 1 contains stuff specific to the particular app, the other contains general stuff that is used by all my apps.

In Builder (Step 3, RC files), I just include both RC files. Works fine.

HTH.

Colin

Posted: Fri Jun 06, 2008 5:42 am
by dutch
Dear Driessen,

It works perfect as your recommend and I have another help.

I've not success with Resource Builder. I bought but cannot build with xBuilder. I show the error .RC file from xBuilder. I can use Resource Builder to open .RC from BRW but when I save. xBuilder cannot compile it.
It's warning on this line 10 Begin keyword expected

Code: Select all

/*********************************************
File: D:\V5\EZ4FO\EZ4FO.RC
Generated by Resource Builder (2.6.4.1).
*********************************************/
/*
OutputExt=res
*/
EASYFO ICON
MOVEABLE PURE LOADONCALL DISCARDABLE
LANGUAGE LANG_NEUTRAL, 0  <- this line
Can you help me?
driessen wrote:Hello Dutch,
FILE1.RC till FILE6.RC are my RC-files, made by Resource Builder.
Regards,
Dutch

Posted: Tue Jun 10, 2008 12:13 am
by Colin Wisbey
Dutch,

I use BRW and most of my 2nd RC contents are bitmaps.

Perhaps the resaon it works fine for me is that I tell xBuilder to compile with Borland, not Pelles.

If you can get it working, then using multiple RCs is something I have found very useful. Even if your RC is not too large for one RC file, the ability to have one RC for all bitmaps and dialogs that are common to all your apps and another RC unique to each app means you don't have to duplicate common bitmaps and dialogs in every app's RC. (eg If you decide to go with a better looking bitmap, you only have to put it in one RC).

Good luck.
Colin

Col

Posted: Tue Jun 10, 2008 2:19 pm
by driessen
Dutch,

I use Resource Workshop to build my RC-files.

Maybe that might be a solution to your problem ?

Good luck.

Regards.