Glenn, you are absolutely right, I did not notice that the user should make the selection.
Dimitris Botsis Glenn B. Lawler wrote: > The compiler directive approach is a good one for including > or excluding features from a program at compile time. > I use it to produce entirely different programs from the same > project. For example, a lite version of a program versus a > professional version. > > But Marcus was asking how the _user_ can configure the > program. What I do in that situation is use an INI file to > store configuration information. I usually make a menu > selection "File / Setup..." which opens a dialog containing > all the configuration settings. While you could store this > information in the registry, I would not recommend it. The > INI file is much more convenient. They can be read or > written with another program and easily copied from one > machine to another or even accessed from a shared > drive on a network. > > Another way to do this kind of thing if you have few > configuration settings is to use the command line. Users > can then setup a shortcut to the program containing a > command line that specifies the settings. > > Glenn Lawler > www.incodesystems.com > > -----Original Message----- > From: Dimitris Botsis [SMTP:[EMAIL PROTECTED] > Sent: Friday, October 05, 2007 1:14 AM > To: advanced_delphi@yahoogroups.com > Subject: Re: [advanced_delphi] Configuring a delphi app... > > Use compiler directives in your source code so that you can define that > when compiler directive "A" is active then it's for your first client > and when you compile with B active then it's for customer B. > For example : > {$define customer_a} //enables customer A > {$define __customer_b} // using something like __ to disable customer B > ... > ... > {$ifdef customer_a} > ... > ... > ... > {$else} > ... > ... > ... > {$endif} > > Check delphi manual for more info. > > This way you can have one set of source code and changing only the > compiler directives (setting active or not), compiles the application > for every circumstance. > > Regards, > Dimitris Botsis > > > marcus_fen1x wrote: >> Hi all, >> >> I was writting a delphi application for one customer and now I've found >> another customer with very little change in requirements, now I know i >> can do it easily, but my question is how come i do it with one single >> executable like any user before installation can do something and >> select the version he wants. All i want to do is to avoid double code- >> base for these two similar applications,there should be something like >> a config file where user can choice which things he wants from my >> application and what he doesn't. how can i do that? any thoughts ? >> >> Thanks in anticipation. >> Marcus >> >> >> >> >> Yahoo! Groups Links >> >> >> >> > > > > > Yahoo! Groups Links > > > > > > > Yahoo! Groups Links > > > >