Board index » delphi » How to build 16- & 32-bit .exe's from the same source?

How to build 16- & 32-bit .exe's from the same source?

        I have a project that I would like to build both 16-bit
        (Delphi 1.02) and 32-bit (Delphi 3) versions of.  I have
        been able to build both using the same source files in
        different directories, using $IFDEFs where necessary.
        I would rather not have to have two almost completely
        identical projects.  I'd rather build both executables
        from the same source.

        Since the files are the same, I saved the project file
        in the 16-bit directory and modified it to build the
        32-bit version.  It seemed to build OK, but when it
        ran, I had no data for my reports.  Is there an additional
        step I need to perform to build two separate versions
        from the same source files?

        Thanks in advance.

        Tim

--
Tim Dietz
Digital Equipment Corporation
t...@rbc.dec.com

 

Re:How to build 16- & 32-bit .exe's from the same source?


Tim Dietz schrieb in Nachricht <6cda2v$83...@kelly.rbc.dec.com>...

Quote

> I have a project that I would like to build both 16-bit
> (Delphi 1.02) and 32-bit (Delphi 3) versions of.  I have
> been able to build both using the same source files in
> different directories, using $IFDEFs where necessary.
> I would rather not have to have two almost completely
> identical projects.  I'd rather build both executables
> from the same source.

> Since the files are the same, I saved the project file
> in the 16-bit directory and modified it to build the
> 32-bit version.  It seemed to build OK, but when it
> ran, I had no data for my reports.  Is there an additional
> step I need to perform to build two separate versions
> from the same source files?

> Thanks in advance.

> Tim

>--
>Tim Dietz
>Digital Equipment Corporation
>t...@rbc.dec.com

1st use IFDEF VER80 (Delphi1) or VER90 (D2) or VER100 (D3)
or WIN32 (D2,D3).
What it meens report, if you use Quickreport, look for version 2.0x,
available for both D1 and D2/D3 (99$).
Use to version files e.g. string.rc and string32.rc (a little batch
programming to compile both).
DON'T use D3 for developing new forms or saving forms because D3 has new
properties for forms that can't read in D1 or D2.
Before you compile in D3 backup your files.

Heiko

Re:How to build 16- & 32-bit .exe's from the same source?


In article <34eb134...@news.CS.Uni-Magdeburg.De> "Heiko Lttge"

Quote
<luet...@sunpool.cs.uni-magdeburg.de> writes:>> I have a project that I would

like to build both 16-bit>> (Delphi 1.02) and 32-bit (Delphi 3) versions of.  
I have>> been able to build both using the same source files in

Quote
>> different directories, using $IFDEFs where necessary.
>> I would rather not have to have two almost completely
>> identical projects.  I'd rather build both executables
>> from the same source.

>> Since the files are the same, I saved the project file
>> in the 16-bit directory and modified it to build the
>> 32-bit version.  It seemed to build OK, but when it
>> ran, I had no data for my reports.  Is there an additional
>> step I need to perform to build two separate versions
>> from the same source files?

You will, indeed, have separate DPRs although they can both include the same
units.  The DPR will need to include references to the appropriate $R resource
files (16 vs. 32-bit versions) and may have different USEs.

$IFDEF is the method you must use to block out different sections of code and
to handle occasional implementation-differences between the 16 and 32-bit VCLs.

As noted, Delphi-3 has some new properties that must be excised from
form-files using "View as Text" before they will be acceptable to D1.  

You might find Delphi-2 considerably easier to use for that reason.

Our ChimneySweep 16 and 32-bit versions are built from the same source files
with appropriate $IFDEFs.

Other Threads