Or alternatively I use the directory structure

CommonProjectFiles\MainForm.pas
                \OtherForm.pas
                \CommonUnit.pas

ClientProjects\Client1\UserSettings.pas 
                \Client1\Project.dpr
                \Client1\Project.exe

                \Client2\UserSettings.pas
                \Client2\Project.dpr
                \Client2Project.exe

If necessary you can put any other client specific units in their own 
directory.

I use this method to maintain 30 different versions of the one 
application and find it really convenient.  Once you've loaded the 
particular client's project (from their subdirectory) you don't have to 
remember to set anything special before building their exe.

If you do want to use conditional defines, I've found that you need to set 
them in the Project Options in the IDE and do a rebuild each time to get 
them to work reliably.

HTH

Mark
        

On 16 Jan 2003 at 19:50, John wrote:

> Hi Ross,
> 
> What I use for several clients is an include file for each client. The
> code in the main program is as below and only the line without the
> space (making it a valid {$INCLUDE) is included in the project. The
> Client Specific Constants files can have anything you like in it.
> Obviously the "AAA, BBB, CCC", ect are a short for the associated
> client names.
> 
>      {$INCLUDE 'c:\Projects\RELACS\Constants\CSC_TEST.pas'}
>      { $INCLUDE 'c:\Projects\RELACS\Constants\CSC_AAA.pas'}
>      { $INCLUDE 'c:\Projects\RELACS\Constants\CSC_BBB.pas'}
>      { $INCLUDE 'c:\Projects\RELACS\Constants\CSC_CCC.pas'}
>      { $INCLUDE 'c:\Projects\RELACS\Constants\CSC_DDD.pas'}
>      { $INCLUDE 'c:\Projects\RELACS\Constants\CSC_EEE.pas'}
> 
> Cheers,
> John.
> 
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Ross Levis Sent:
> > Thursday, 16 January 2003 17:22 To: Multiple recipients of list
> > delphi Subject: [DUG]: defines
> >
> >
> > I have an application for which I want to split into 2 separate
> > brand names with a different application title, splash screen &
> > about form, and some small differences in code.  What would be the
> > easiest way to go about it so I don't have to maintain 2 sets of
> > code.
> >
> > Do {$Defines} in the mainform work in all other forms?  Do defines
> > work in dpr files?  I tried putting a define in the dpr and using it
> > in the mainform but this doesn't work.  Should I use 2 separate dpr
> > files?  Any suggestions.
> >
> > Thanks,
> > Ross Levis.
> >
> > ------------------------------------------------------------------
> > ---------
> >     New Zealand Delphi Users group - Delphi List -
> >     [EMAIL PROTECTED]
> >                   Website: http://www.delphi.org.nz
> > To UnSub, send email to: [EMAIL PROTECTED]
> > with body of "unsubscribe delphi"
> > Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
> >
> >
> 
> ----------------------------------------------------------------------
> -----
>     New Zealand Delphi Users group - Delphi List -
>     [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED] 
> with body of "unsubscribe delphi"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
> 


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to